[Controller] Ensure configuration changes are applied appropriately
Summary
Context: !372 (comment 831338422)
While testing the MR above, I changed one of the values to confirm the new settings were applied to the objects.
I noticed the error regarding volumes. It appeared that the volume mount and probe definitions were merged improperly. In this case the old definitions should have been removed to follow the new definitions provided by the helm template. I expect that our merge functionality appended them instead, but will need to investigate further.
Steps to reproduce
Deploy with gitlab.gitlab-shell.sshDaemon=openssh
and then gitlab.gitlab-shell.sshDaemon=gitlab-sshd
and observe errors in the GitLab controller logs.
Configuration used
gitlab:
gitlab-shell:
sshDaemon: openssh # and then 'gitlab-sshd'
Current behavior
Controller error during reconcile due to merging previous and existing definitions.
Expected behavior
No controller error during reconcile, properly overriding old definitions with new definitions.
Relevant logs
* spec.template.spec.volumes\[1\].projected: Forbidden: may not specify more than 1 volume type
* spec.template.spec.volumes\[2\].projected: Forbidden: may not specify more than 1 volume type
* spec.template.spec.containers\[0\].livenessProbe.httpGet: Forbidden: may not specify more than 1 handler type
* spec.template.spec.containers\[0\].readinessProbe.tcpSocket: Forbidden: may not specify more than 1 handler type
* spec.template.spec.containers\[0\].volumeMounts\[2\].name: Not found: "sshd-config"
* spec.template.spec.initContainers\[0\].volumeMounts\[0\].name: Not found: "etc-ssl-certs"
* spec.template.spec.initContainers\[1\].volumeMounts\[1\].name: Not found: "shell-init-secrets"