Skip to content

Commit

Permalink
[CI] Remove MariaDB specific init-container. (spring-cloud#5635)
Browse files Browse the repository at this point in the history
  • Loading branch information
corneil authored Jan 24, 2024
1 parent fdc0a94 commit d6fc1df
Show file tree
Hide file tree
Showing 6 changed files with 3 additions and 41 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1158,6 +1158,6 @@ The following example shows how you can configure additional containers for an a
====
[source,options=nowrap]
----
deployer.<application>.kubernetes.additionalContainers=[{name: 'c1', image: 'busybox:latest', command: ['sh', '-c', 'echo hello1'], volumeMounts: [{name: 'test-volume', mountPath: '/tmp', readOnly: true}]},{name: 'c2', image: 'busybox:1.26.1', command: ['sh', '-c', 'echo hello2']}]
deployer.<application>.kubernetes.additionalContainers=[{name: 'c1', image: 'busybox:1', command: ['sh', '-c', 'echo hello1'], volumeMounts: [{name: 'test-volume', mountPath: '/tmp', readOnly: true}]},{name: 'c2', image: 'busybox:1.26.1', command: ['sh', '-c', 'echo hello2']}]
----
====
Original file line number Diff line number Diff line change
Expand Up @@ -399,11 +399,11 @@ These properties are also used when configuring the <<configuration-kubernetes-t
|<none>

|initContainer
|An Init Container expressed in YAML format to be applied to a pod. e.g. ```{containerName: 'test', imageName: 'busybox:latest', commands: ['sh', '-c', 'echo hello']}```
|An Init Container expressed in YAML format to be applied to a pod. e.g. ```{containerName: 'test', imageName: 'busybox:1', commands: ['sh', '-c', 'echo hello']}```
|<none>

|additionalContainers
|Additional containers expressed in YAML format to be applied to a pod. e.g. ```[{name: 'c1', image: 'busybox:latest', command: ['sh', '-c', 'echo hello1'], volumeMounts: [{name: 'test-volume', mountPath: '/tmp', readOnly: true}]}, {name: 'c2', image: 'busybox:1.26.1', command: ['sh', '-c', 'echo hello2']}]```
|Additional containers expressed in YAML format to be applied to a pod. e.g. ```[{name: 'c1', image: 'busybox:1', command: ['sh', '-c', 'echo hello1'], volumeMounts: [{name: 'test-volume', mountPath: '/tmp', readOnly: true}]}, {name: 'c2', image: 'busybox:1.26.1', command: ['sh', '-c', 'echo hello2']}]```
|<none>
|===

Expand Down
5 changes: 0 additions & 5 deletions src/kubernetes/server/server-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,6 @@ spec:
# Provide the Skipper service location
- name: SPRING_CLOUD_SKIPPER_CLIENT_SERVER_URI
value: 'http://${SKIPPER_SERVICE_HOST}:${SKIPPER_SERVICE_PORT}/api'
initContainers:
- name: init-mariadb-wait
image: busybox:1
imagePullPolicy: IfNotPresent
command: ['sh', '-c', 'until nc -w3 -z mariadb 3306; do echo waiting for mariadb; sleep 3; done;']
serviceAccountName: scdf-sa
volumes:
- name: config
Expand Down
14 changes: 0 additions & 14 deletions src/kubernetes/skipper/skipper-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,20 +69,6 @@ spec:
value: 'false'
- name: SPRING_CLOUD_KUBERNETES_SECRETS_PATHS
value: /etc/secrets
initContainers:
- name: init-mariadb-wait
image: busybox:1
imagePullPolicy: IfNotPresent
command: ['sh', '-c', 'until nc -w3 -z mariadb 3306; do echo waiting for mariadb; sleep 3; done;']
- name: init-mariadb-database
image: mariadb:10.4
env:
- name: MARIADB_PWD
valueFrom:
secretKeyRef:
name: mariadb
key: database-password
command: ['sh', '-c', 'mariadb -h mariadb -u root --password=$MARIADB_PWD -e "CREATE DATABASE IF NOT EXISTS skipper;"']
serviceAccountName: scdf-sa
volumes:
- name: config
Expand Down
5 changes: 0 additions & 5 deletions src/templates/kubernetes/server/server-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,6 @@ spec:
# Provide the Skipper service location
- name: SPRING_CLOUD_SKIPPER_CLIENT_SERVER_URI
value: 'http://${SKIPPER_SERVICE_HOST}:${SKIPPER_SERVICE_PORT}/api'
initContainers:
- name: init-mariadb-wait
image: busybox:1
imagePullPolicy: IfNotPresent
command: ['sh', '-c', 'until nc -w3 -z mariadb 3306; do echo waiting for mariadb; sleep 3; done;']
serviceAccountName: scdf-sa
volumes:
- name: config
Expand Down
14 changes: 0 additions & 14 deletions src/templates/kubernetes/skipper/skipper-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,20 +70,6 @@ spec:
value: 'false'
- name: SPRING_CLOUD_KUBERNETES_SECRETS_PATHS
value: /etc/secrets
initContainers:
- name: init-mariadb-wait
image: busybox:1
imagePullPolicy: IfNotPresent
command: ['sh', '-c', 'until nc -w3 -z mariadb 3306; do echo waiting for mariadb; sleep 3; done;']
- name: init-mariadb-database
image: mariadb:10.4
env:
- name: MARIADB_PWD
valueFrom:
secretKeyRef:
name: mariadb
key: database-password
command: ['sh', '-c', 'mariadb -h mariadb -u root --password=$MARIADB_PWD -e "CREATE DATABASE IF NOT EXISTS skipper;"']
serviceAccountName: scdf-sa
volumes:
- name: config
Expand Down

0 comments on commit d6fc1df

Please sign in to comment.