Use ApplyObject function for creating and updating objects
This MR re-implements GitLabReconciler
's createOrPatch
function with ApplyObject
, which imitates kubectl apply
. It requires this function that is implemented in !476 (merged).
This MR also removes the unused return boolean argument of createOrPatch
function.
Testing
-
Deploy the Operator with latest image of this branch:
helm upgrade \ --install \ gitlab-operator deploy/chart \ --set image.tag=581-fix-apply-config-change@sha256:7513eda8ed6740b916ee8fe951ca63997ec143a7191e41bbf45287fbc648f3db
-
Deploy a GitLab instance with:
# example-gitlab.yaml apiVersion: apps.gitlab.com/v1beta1 kind: GitLab metadata: name: example spec: chart: version: "6.1.0" values: global: hosts: domain: issue-581.h.k8s-ft.win certmanager-issuer: email: me@example.com gitlab: gitlab-shell: sshDaemon: openssh
and then:
kubectl apply -f example-gitlab.yaml
-
Wait until the instance id deployed.
-
Change
gitlab.gitlab-shell.sshDaemon
fromopenssh
togitlab-sshd
and update the instance. -
You should see that
gitlab-shell
Deployment is updated successfully with the new changes.
Closes #581 (closed)
Closes #574 (closed)
Closes #683 (closed)
Closes #697 (closed)
Closes #698 (closed)
Edited by Mitchell Nielsen