Open swdee opened 5 years ago
Looks like this might be a similar issue to https://github.com/helm/charts/pull/14006/files we should try moving update strategy to be outside of the pod spec.
Yeah I found that issue also and tried it, but it gives error;
Error: validation failed: error validating "": error validating data: ValidationError(Deployment.spec): unknown field "updateStrategy" in io.k8s.api.apps.v1beta2.DeploymentSpec
I would think the solution is to remove from deployment.yaml and create a new template statefulset.yaml and have the updateStrategy placed in there, like how its done on the NATS Helm charts https://github.com/helm/charts/tree/master/stable/nats/templates
Thoughts?
Note that by removing the following lines from deployment.yaml, nats-operator installs fine.
updateStrategy:
type: {{ .Values.updateStrategy }}
{{- if .Values.rollingUpdatePartition }}
rollingUpdate:
partition: {{ .Values.rollingUpdatePartition }}
{{- end }}
updateStrategy is a field as apart of StatefulSet, but the templates have nats-operator configured as a Deployment. It seems that the charts have been copied over from the NATS charts where NATS is configured as a StatefulSet so these additional fields have been copied across in error.
Either nats-operator is left to be configured as a k8s Deployment and the above updateStrategy fields removed along with definitions in values.yaml https://github.com/nats-io/nats-operator/blob/7ecd1fc69f0afcc65ea183db1d7bd0a99e7242d5/helm/nats-operator/values.yaml#L68 Or signification changes are made to the templates to install nats-operator as a StatefulSet?
Trying to deploy NATS operator using Helm on a Digital Ocean k8s instance using the following command;
This fails with error
Which corresponds with the deployment template here https://github.com/nats-io/nats-operator/blob/7ecd1fc69f0afcc65ea183db1d7bd0a99e7242d5/helm/nats-operator/templates/deployment.yaml#L29
Helm and k8s versions used;
The issue is field updateStrategy is apart of the StatefulSet and not the Pod spec so the deployment.yaml template needs modification?