diff --git a/acceptance/deploy.sh b/acceptance/deploy.sh index 7beb5338..9400bda5 100755 --- a/acceptance/deploy.sh +++ b/acceptance/deploy.sh @@ -41,6 +41,13 @@ TEST_ID=${TEST_ID:-default} if [ "${tool}" == "helm" ]; then set -v + flags=() + if [ "${IMAGE_PULL_SECRET}" != "" ]; then + flags+=( --set imagePullSecrets[0].name=${IMAGE_PULL_SECRET}) + flags+=( --set image.actionsRunnerImagePullSecrets[0].name=${IMAGE_PULL_SECRET}) + flags+=( --set githubWebhookServer.imagePullSecrets[0].name=${IMAGE_PULL_SECRET}) + fi + set -vx helm upgrade --install actions-runner-controller \ charts/actions-runner-controller \ -n actions-runner-system \ @@ -51,10 +58,7 @@ if [ "${tool}" == "helm" ]; then --set image.tag=${VERSION} \ --set podAnnotations.test-id=${TEST_ID} \ --set githubWebhookServer.podAnnotations.test-id=${TEST_ID} \ - --set imagePullSecrets[0].name=${IMAGE_PULL_SECRET} \ - --set image.actionsRunnerImagePullSecrets[0].name=${IMAGE_PULL_SECRET} \ - --set githubWebhookServer.imagePullSecrets[0].name=${IMAGE_PULL_SECRET} \ - --set image.imagePullPolicy=${IMAGE_PULL_POLICY} \ + ${flags[@]} --set image.imagePullPolicy=${IMAGE_PULL_POLICY} \ -f ${VALUES_FILE} set +v # To prevent `CustomResourceDefinition.apiextensions.k8s.io "runners.actions.summerwind.dev" is invalid: metadata.annotations: Too long: must have at most 262144 bytes` diff --git a/acceptance/values.yaml b/acceptance/values.yaml index 95b1c8a9..3c970774 100644 --- a/acceptance/values.yaml +++ b/acceptance/values.yaml @@ -1,18 +1,18 @@ # Set actions-runner-controller settings for testing logLevel: "-4" -imagePullSecrets: -- name: +imagePullSecrets: [] image: - actionsRunnerImagePullSecrets: - - name: + # This needs to be an empty array rather than a single-item array with empty name. + # Otherwise you end up with the following error on helm-upgrade: + # Error: UPGRADE FAILED: failed to create patch: map: map[] does not contain declared merge key: name && failed to create patch: map: map[] does not contain declared merge key: name + actionsRunnerImagePullSecrets: [] runner: statusUpdateHook: enabled: true rbac: allowGrantingKubernetesContainerModePermissions: true githubWebhookServer: - imagePullSecrets: - - name: + imagePullSecrets: [] logLevel: "-4" enabled: true labels: {}