This repository was archived by the owner on Aug 15, 2022. It is now read-only.
Repository navigation
Service installation for Kubernetes #11338
Merged
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
8b78abb
kubernetes: initial version
mertaytore dcf069d
health check: replacement for hardcoded sleep calls
mertaytore 593a428
backend pod: health & connectivity check tunings
mertaytore 48a3640
backend pod: remove image pull dependency
mertaytore ab41fe0
generateRunFile: additions for aws stack development
mertaytore fc804f9
namespace definition: added namespace.yaml
mertaytore 141bf95
generateRunFile: sed command for hostname & pod naming change
mertaytore e8ae117
pods: added backend and client pod templates for envsubst
mertaytore 5c77120
generateRunFile: error handling for resource creation
mertaytore 6ac993d
gitignore: generated k8s container definitions added
mertaytore File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| export KONFIG_PROJECTROOT=/opt/koding | ||
|
|
||
| export KONFIG_MONGO=$BACKEND_POD_IP:27017/koding | ||
|
|
||
| export KONFIG_MQ_LOGIN=test | ||
| export KONFIG_MQ_PASSWORD=test | ||
| export KONFIG_MQ_APIPORT=15672 | ||
|
|
||
| export KONFIG_REDIS_HOST=$BACKEND_POD_IP | ||
| export KONFIG_REDIS_PORT=6379 | ||
|
|
||
| export KONFIG_POSTGRES_HOST=$BACKEND_POD_IP | ||
| export KONFIG_POSTGRES_PORT=5432 | ||
| export KONFIG_POSTGRES_DBNAME=social | ||
| export KONFIG_POSTGRES_USERNAME=socialapplication |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,8 @@ | ||
| selenium-debug.log | ||
| nginx.conf | ||
| nginx.pid | ||
| containers.yaml | ||
| client-containers.yaml | ||
| *.test | ||
| *.dump | ||
| *.orig | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
93 changes: 93 additions & 0 deletions
93
deployment/kubernetes/backend-pod/containers.yaml.template
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,93 @@ | ||
| apiVersion: v1 | ||
| kind: Pod | ||
| metadata: | ||
| name: backend | ||
| namespace: koding | ||
| spec: | ||
| restartPolicy: Never | ||
| containers: | ||
| - name: backend | ||
| image: koding/base | ||
| workingDir: /opt/koding | ||
| env: | ||
| - name: POD_IP | ||
| valueFrom: | ||
| fieldRef: | ||
| fieldPath: status.podIP | ||
| - name: KONFIG_PROJECTROOT | ||
| value: /opt/koding | ||
| - name: KONFIG_MONGO | ||
| value: $(POD_IP):27017/koding | ||
| - name: KONFIG_MQ_LOGIN | ||
| value: test | ||
| - name: KONFIG_MQ_PASSWORD | ||
| value: test | ||
| - name: KONFIG_MQ_APIPORT | ||
| value: "15672" | ||
| - name: KONFIG_MQ_HOST | ||
| value: $(POD_IP) | ||
| - name: KONFIG_POSTGRES_HOST | ||
| value: $(POD_IP) | ||
| - name: KONFIG_POSTGRES_PORT | ||
| value: "5432" | ||
| - name: KONFIG_POSTGRES_DBNAME | ||
| value: social | ||
| - name: KONFIG_POSTGRES_USERNAME | ||
| value: socialapplication | ||
| - name: KONFIG_REDIS_HOST | ||
| value: $(POD_IP) | ||
| - name: KONFIG_REDIS_PORT | ||
| value: "6379" | ||
| - name: GOPATH | ||
| value: $(KONFIG_PROJECTROOT)/go | ||
| - name: GOBIN | ||
| value: $(GOPATH)/bin | ||
| command: [ "scripts/bootstrap-container", "--config", "dev", "--projectRoot", "/opt/koding", "--publicPort", "8090", "--host", "${KONFIG_DOMAINS_BASE}:${KONFIG_PUBLICPORT}", "--hostname", "${KONFIG_DOMAINS_BASE}" ] | ||
| ports: | ||
| - containerPort: 8090 | ||
| hostPort: 8090 | ||
| volumeMounts: | ||
| - mountPath: /opt/koding | ||
| name: koding-working-tree | ||
|
|
||
| - name: mongo | ||
| image: mongo:3.2.8 | ||
| workingDir: /opt/koding | ||
| args: [ "--nojournal", "--noprealloc", "--smallfiles" ] | ||
| ports: | ||
| - containerPort: 27017 | ||
| hostPort: 27017 | ||
|
|
||
| - name: postgres | ||
| image: koding/postgres | ||
| workingDir: /opt/koding | ||
| ports: | ||
| - containerPort: 5432 | ||
| hostPort: 5432 | ||
|
|
||
| # Countly is a TODO for now. | ||
| - name: countly | ||
| image: koding/countly-server:latest | ||
| workingDir: /opt/koding | ||
| ports: | ||
| - containerPort: 32768 | ||
| hostPort: 32768 | ||
|
|
||
| - name: rabbitmq | ||
| image: rabbitmq:3-management | ||
| workingDir: /opt/koding | ||
| ports: | ||
| - containerPort: 5672 | ||
| hostPort: 5672 | ||
|
|
||
| - name: redis | ||
| image: redis | ||
| workingDir: /opt/koding | ||
| ports: | ||
| - containerPort: 6379 | ||
| hostPort: 6379 | ||
|
|
||
| volumes: | ||
| - name: koding-working-tree | ||
| hostPath: | ||
| path: ${PWD} |
28 changes: 28 additions & 0 deletions
28
deployment/kubernetes/frontend-pod/client-containers.yaml.template
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| apiVersion: v1 | ||
| kind: Pod | ||
| metadata: | ||
| name: frontend | ||
| namespace: koding | ||
| spec: | ||
| restartPolicy: Never | ||
| containers: | ||
| - name: landing | ||
| image: koding/base | ||
| workingDir: /opt/koding | ||
| command: [ "make", "--directory", "client/landing", "dev" ] | ||
| volumeMounts: | ||
| - mountPath: /opt/koding | ||
| name: koding-working-tree | ||
|
|
||
| - name: client | ||
| image: koding/base | ||
| workingDir: /opt/koding | ||
| command: [ "make", "--directory", "client", "development" ] | ||
| volumeMounts: | ||
| - mountPath: /opt/koding | ||
| name: koding-working-tree | ||
|
|
||
| volumes: | ||
| - name: koding-working-tree | ||
| hostPath: | ||
| path: ${PWD} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| apiVersion: v1 | ||
| kind: Namespace | ||
| metadata: | ||
| name: koding |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 is a very big block. Let's split it into a function.