Skip to content

Commit 478ba83

Browse files
authored
Update deployment.yaml
Add comments to deployment.yaml explaining the most important operator-specific properties
1 parent 3a7380a commit 478ba83

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

samples/mysql-schema/k8s/deployment.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ spec:
1212
selector:
1313
matchLabels:
1414
app: mysql-schema-operator
15-
replicas: 1
15+
replicas: 1 # we always run a single replica of the operator to avoid duplicate handling of events
1616
strategy:
17-
type: Recreate
17+
type: Recreate # during an upgrade the operator will shut down before the new version comes up to prevent two instances running at the same time
1818
template:
1919
metadata:
2020
labels:
@@ -29,20 +29,20 @@ spec:
2929
- containerPort: 80
3030
env:
3131
- name: MYSQL_HOST
32-
value: mysql.mysql
32+
value: mysql.mysql # assuming the MySQL server runs in a namespace called "mysql" on Kubernetes
3333
- name: MYSQL_USER
3434
value: root
3535
- name: MYSQL_PASSWORD
36-
value: password
36+
value: password # sample-level security
3737
readinessProbe:
3838
httpGet:
39-
path: /health
39+
path: /health # when this returns 200 the operator is considered up and running
4040
port: 8080
4141
initialDelaySeconds: 1
4242
timeoutSeconds: 1
4343
livenessProbe:
4444
httpGet:
45-
path: /health
45+
path: /health # when this endpoint doesn't return 200 the operator is considered broken and get's restarted
4646
port: 8080
4747
initialDelaySeconds: 30
48-
timeoutSeconds: 1
48+
timeoutSeconds: 1

0 commit comments

Comments
 (0)