-
Notifications
You must be signed in to change notification settings - Fork 40
Conversation
examples/gitlab/gitlab.yml
Outdated
containers: | ||
- image: sameersbn/gitlab:8.16.3 | ||
volumeMounts: | ||
- name: db |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
data
or gitData
might be better name here
examples/gitlab/gitlab.yml
Outdated
value: "false" | ||
volumes: | ||
- name: db | ||
emptyDir: {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will lose data if the container is moved to another node.
emptyDir
dir shouldn't be used here.
examples/gitlab/gitlab.yml
Outdated
emptyDir: {} | ||
services: | ||
- name: gitlab | ||
type: NodePort |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would rather use LoadBalancer
here.
examples/gitlab/postgres.yml
Outdated
- port: 5432 | ||
volumes: | ||
- name: db | ||
emptyDir: {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will lose data if the container is moved to another node.
emptyDir
dir shouldn't be used here.
examples/gitlab/redis.yml
Outdated
- port: 6379 | ||
volumes: | ||
- name: db | ||
emptyDir: {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will lose data if the container is moved to another node.
emptyDir
dir shouldn't be used here.
examples/gitlab/redis.yml
Outdated
containers: | ||
- image: redis:3.2.4 | ||
volumeMounts: | ||
- name: db |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
redisData
might be better name
examples/gitlab/postgres.yml
Outdated
containers: | ||
- image: sameersbn/postgresql:9.5-3 | ||
volumeMounts: | ||
- name: db |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
postresqlData
might be better name
examples/gitlab/postgres.yml
Outdated
- name: db | ||
mountPath: /var/lib/postgresql | ||
env: | ||
- name: DB_USER |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
variables like DB_USER, DB_PASS and DB_NAME are shared with gitlab container.
It might be better to use ConfigMap for those.
examples/gitlab/README.md
Outdated
|
||
### Example Reference | ||
|
||
https://github.com/lwolf/kubernetes-gitlab/tree/master/gitlab |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
link tag [ ]( )
examples/gitlab/gitlab.yml
Outdated
@@ -0,0 +1,105 @@ | |||
name: gitlab | |||
containers: | |||
- image: sameersbn/gitlab:8.16.3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: this is valid indentation, but we can get rid of two extra spaces like the following:
containers:
- image: sameersbn/gitlab:8.16.3
volumeMounts:
- name: db
mountPath: /home/git/data
env:
- name: DEBUG
value: "false"
- name: DB_TYPE
value: postgres
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I personally prefer indentations as @surajnarwade did it.
@kadel we also decided to segregate the examples directory based on features and on real world examples, so how are we doing that? Because this is adding to that mix, where all the examples are feature based? |
That is separate issue and we should take care of it in another PR |
ping @surajnarwade |
Hey @surajnarwade I previously pointed you towards the official GitLab Kubernetes artifacts before you added this example. Why not use those instead? https://gitlab.com/charts/charts.gitlab.io/tree/master/charts |
@cdrage, same example we have used for kompose. so I picked this one |
@surajnarwade I know, but https://gitlab.com/charts/charts.gitlab.io/tree/master/charts is the official one and would gather more adoption. Yes, the one on Kompose needs to be updated too... |
@cdrage 👍 |
@surajnarwade What is the status on this? No update in 13 days. |
1ac07ff
to
49489a7
Compare
@pradeepto updated with new official gitlab example :) |
examples/gitlab/gitlab.yml
Outdated
app: gitlab | ||
replicas: 1 | ||
containers: | ||
- name: gitlab |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you adjust indentation to 2 spaces in this section, similar to the way you have done in section of services
?
### Generating artifacts | ||
|
||
``` | ||
$ kedge generate -f gitlab.yml -f redis.yml -f postgres.yml |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can also give
kedge create -f .
dot being current directory so it will take all the YAML files
examples/gitlab/gitlab.yml
Outdated
secretKeyRef: | ||
name: gitlab | ||
key: redis-password | ||
ports: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can reduce the file size, by removing the ports
section, from under pods.
so added following changes
diff --git a/examples/gitlab/gitlab.yml b/examples/gitlab/gitlab.yml
index 4164541..fe798e6 100644
--- a/examples/gitlab/gitlab.yml
+++ b/examples/gitlab/gitlab.yml
@@ -46,17 +46,10 @@ containers:
secretKeyRef:
name: gitlab
key: redis-password
- ports:
- - name: ssh
- containerPort: 22
- - name: http
- containerPort: 80
- - name: https
- containerPort: 443
livenessProbe:
httpGet:
path: /help
- port: http
+ port: 80
# This pod takes a very long time to start up. Be cautious when
# lowering this value to avoid Pod death during startup.
initialDelaySeconds: 200
@@ -67,7 +60,7 @@ containers:
readinessProbe:
httpGet:
path: /help
- port: http
+ port: 80
initialDelaySeconds: 30
timeoutSeconds: 1
periodSeconds: 10
@@ -94,13 +87,13 @@ services:
ports:
- name: ssh
port: 22
- targetPort: ssh
+ targetPort: 22
- name: http
port: 80
- targetPort: http
+ targetPort: 80
- name: https
port: 443
- targetPort: https
+ targetPort: 443
volumeClaims:
- name: gitlab-data
diff --git a/examples/gitlab/postgres.yml b/examples/gitlab/postgres.yml
index 7e20906..b4ff9ee 100644
--- a/examples/gitlab/postgres.yml
+++ b/examples/gitlab/postgres.yml
@@ -22,9 +22,6 @@ containers:
key: postgres-password
- name: POD_IP
valueFrom: { fieldRef: { fieldPath: status.podIP } }
- ports:
- - name: postgresql
- containerPort: 5432
livenessProbe:
exec:
command:
@@ -60,7 +57,7 @@ services:
ports:
- name: postgresql
port: 5432
- targetPort: postgresql
+ targetPort: 5432
volumeClaims:
- name: data
diff --git a/examples/gitlab/redis.yml b/examples/gitlab/redis.yml
index ac9a87c..4465f15 100644
--- a/examples/gitlab/redis.yml
+++ b/examples/gitlab/redis.yml
@@ -11,9 +11,6 @@ containers:
secretKeyRef:
name: redis
key: redis-password
- ports:
- - name: redis
- containerPort: 6379
livenessProbe:
exec:
command:
@@ -43,7 +40,7 @@ services:
ports:
- name: redis
port: 6379
- targetPort: redis
+ targetPort: 6379
volumeClaims:
- name: redis-data
Apart from those minor changes, the example worked for me! |
49489a7
to
be1d87f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
examples/gitlab/gitlab.yml
Outdated
livenessProbe: | ||
httpGet: | ||
path: /help | ||
port: http |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
port needs to change to 80
examples/gitlab/gitlab.yml
Outdated
readinessProbe: | ||
httpGet: | ||
path: /help | ||
port: http |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also here port needs to be 80
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Like it was shown in the diff here: #170 (comment)
Added working gitlab example for kedge.
be1d87f
to
1495259
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! WFM now!
Added working gitlab example for kedge.