Skip to content
This repository has been archived by the owner on Oct 11, 2024. It is now read-only.

Helm chart is ignoring the imagePullSecrets configuration #563

Closed
FAntonescu opened this issue Jan 17, 2023 · 5 comments · Fixed by #655
Closed

Helm chart is ignoring the imagePullSecrets configuration #563

FAntonescu opened this issue Jan 17, 2023 · 5 comments · Fixed by #655

Comments

@FAntonescu
Copy link

The Helm chart tyk-operator version v0.13.0 ignores the imagePullSecrets configuration.

Steps to reproduce the issue:

  1. Create a file values.yaml with the imagePullSecrets configuration.
  2. install the Helm chart of the tyk-operator, by passing the previous values.yaml file

Expected behavior:

The Kubernetes deployment should contain the configuration for the imagePullSecrets

Actual behavior:

The Kubernetes deployment does not contain the imagePullSecrets configuration, causing the pod to remain stuck with a status of 'cannot pull Docker image'.

Additional information:

This happens to both versions v0.12 and v0.13 of the Helm chart.
I am using Helm version v3.10.3 and Kubernetes v1.24

Please let me know if there's any other information you would like me to include.

@FAntonescu FAntonescu changed the title Helm chart ignoring the imagePullSecrets Helm chart is ignoring the imagePullSecrets configuration Jan 17, 2023
@buraksekili
Copy link
Collaborator

thanks @FAntonescu for raising this one. I will raise an internal ticket regarding this issue and hope it'll be fixed in the next releases. in the meantime, if you would like to contribute, we always welcome PRs and I am happy to help if you need. again, thank you

@FAntonescu
Copy link
Author

@buraksekili I am happy to contribute the fix, however my GitHub user is not authorized to push to this repository.

Please see attached the fix for adding the imagePullSecrets to the service account

Subject: [PATCH] add the imagePullSecrets to the service account template see https://github.com/TykTechnologies/tyk-operator/issues/563
---
Index: helm/templates/all.yaml
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/helm/templates/all.yaml b/helm/templates/all.yaml
--- a/helm/templates/all.yaml	(revision 5a54f30d1e0df4268cb4bffa817c6a8c3d225652)
+++ b/helm/templates/all.yaml	(revision 00dfbe25c88666d32082c1d38f21a387bf7a88ab)
@@ -4,6 +4,10 @@
 metadata:
   name: {{ include "tyk-operator-helm.fullname" . }}-controller-manager
   namespace: {{ .Release.Namespace }}
+{{ with  .Values.imagePullSecrets }}
+imagePullSecrets:
+  {{- toYaml . | nindent 2 }}
+{{ end }}
 ---
 apiVersion: rbac.authorization.k8s.io/v1
 kind: Role
Index: helm/values.yaml
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/helm/values.yaml b/helm/values.yaml
--- a/helm/values.yaml	(revision 5a54f30d1e0df4268cb4bffa817c6a8c3d225652)
+++ b/helm/values.yaml	(revision 00dfbe25c88666d32082c1d38f21a387bf7a88ab)
@@ -12,7 +12,9 @@
   repository: tykio/tyk-operator
   pullPolicy: IfNotPresent
   tag: "v0.13.0"
+# specify the necessary image pull secrets, if any
 imagePullSecrets: []
+# - name: registry_secret
 nameOverride: ""
 fullnameOverride: ""
 annotations: {}

@buraksekili
Copy link
Collaborator

thanks for the suggested changes @FAntonescu

actually, you can still contribute to the project if you wish :) I just wanted to let you know that you just need to fork our project and push your changes to your fork instead of the original project repository. then, you can create a pull request from your own fork to our project repository.

For reference:
https://docs.github.com/en/get-started/quickstart/fork-a-repo
https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request-from-a-fork

@FAntonescu
Copy link
Author

@buraksekili I created a pull request for this fix
#564

@buraksekili
Copy link
Collaborator

wonderful, thank you @FAntonescu 🙏 i'll review it as soon as I can. in the meantime, can you please review my comment here? We use an automated script if you changed manifests directly, the automated script which runs kustomize might override your changes.

# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants