Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow for specifying podTemplateSpec when using the helm chart #1255

Closed
davidkarlsen opened this issue Oct 25, 2019 · 5 comments
Closed

Allow for specifying podTemplateSpec when using the helm chart #1255

davidkarlsen opened this issue Oct 25, 2019 · 5 comments

Comments

@davidkarlsen
Copy link
Contributor

The helm chart defines apprepositories through initialRepos - allow for adding syncJobPodTemplate section as described in "modifying the synchronization job" as in https://github.com/kubeapps/kubeapps/blob/master/docs/user/private-app-repository.md

@andresmgot
Copy link
Contributor

Hi @davidkarlsen, that field is usually used to set the environment variables to set an HTTP proxy (in case the repository is running behind a corporate proxy). At least that's the only use case I've heard about. If that's your case too you can set these properties in the apprepository section of the values:

  initialReposProxy: 
    enabled: false
#    http_proxy: "http://yourproxy:3128"
#    https_proxy: "http://yourproxy:3128"
#    no_proxy: "0.0.0.0/0"

If that's not your case, it would require changes in the chart.

@davidkarlsen
Copy link
Contributor Author

@andresmgot My use-case is to add nodeSelector to the cronjob.

@andresmgot
Copy link
Contributor

I see, then yes, it's not covered. I think that due to the current structure, it's easier to follow the same approach than the HTTP proxy to set that (even though it may not be ideal). We could do something like:

+{{- if or $.Values.securityContext.enabled $.Values.apprepository.initialReposProxy.enabled .nodeSelector}}
  syncJobPodTemplate:
    spec:
  {{- if $.Values.apprepository.initialReposProxy.enabled }}
      containers:
      - env:
          - name: https_proxy
            value: {{ $.Values.apprepository.initialReposProxy.https_proxy }}
          - name: http_proxy
            value: {{ $.Values.apprepository.initialReposProxy.http_proxy }}
          - name: no_proxy
            value: {{ $.Values.apprepository.initialReposProxy.no_proxy }}
  {{- end }}
  {{- if $.Values.securityContext.enabled }}
        securityContext:
        runAsUser: {{ $.Values.securityContext.runAsUser }}
  {{- end }}
+  {{- if .nodeSelector }}
+  (whatever is needed here)
+  {{- end }}
{{- end }}

WDYT? Maybe you are able to try it and send a PR to add support for that in the chart?

@andresmgot
Copy link
Contributor

hey @davidkarlsen, can you confirm if that would fix your issue?

@davidkarlsen
Copy link
Contributor Author

@andresmgot Hi - sorry for the silence - I'll try to get a PR done during the week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants