-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: datastore resource object hook #39
Conversation
version: 0.3.0 | ||
version: 0.4.0 |
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.
A minor change is required since the Datastore
manifest will be part of the managed resources, as the opposite for the RBAC-related one (Role, Rolebinding, ServiceAccount).
annotations: | ||
"helm.sh/hook": pre-install | ||
"helm.sh/hook-weight": "5" |
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.
The ConfigMap containing the CSR data is required only upon installation.
annotations: | ||
"helm.sh/hook": post-install,post-upgrade,post-rollback | ||
"helm.sh/hook-weight": "5" |
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.
To avoid the Datastore from being delete upon every upgrade, or rollback, the hooks must be removed.
4975628
to
2717fbc
Compare
kubectl --namespace={{ .Release.Namespace }} create secret tls {{ include "etcd.clientSecretName" . }} --key=/certs/root-client-key.pem --cert=/certs/root-client.pem && | ||
kubectl --namespace={{ .Release.Namespace }} rollout status sts/{{ include "etcd.stsName" . }} --timeout=300s | ||
kubectl --namespace={{ .Release.Namespace }} create secret tls {{ include "etcd.clientSecretName" . }} --key=/certs/root-client-key.pem --cert=/certs/root-client.pem |
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.
Statefulset rollout check has been moved to the etcd_job_preinstall_2.yaml
job since the StatefulSet resource will be created once the pre-install phase has been completed.
@@ -24,7 +24,6 @@ spec: | |||
{{- toYaml .Values.podAnnotations | nindent 8 }} | |||
{{- end }} | |||
spec: | |||
serviceAccountName: {{ include "etcd.serviceAccountName" . }} |
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.
The etcd cluster didn't ever need a SA since there's no interaction with the Kubernetes API Server.
Fixes #38.
The hook list was wrong, causing a deletion of the DataStore upon an update, or a rollback.