We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
In the values.yaml file, we could specify several sites:
values.yaml
sites: - name: foo source: "foo.com" - name: bar source: "bar.com - name: baz source: "baz.com
Then the chart would generate three deployments and three services, one for each site.
Then we could add an ingress that includes each of the services:
spec: rules: - host: hello-world.com http: paths: - backend: service: name: foo port: name: http path: /foo pathType: Prefix - backend: service: name: bar port: name: http path: /bar pathType: Prefix - backend: service: name: baz port: name: http path: /baz pathType: Prefix
Then each site would be accessible via the following URLs:
The text was updated successfully, but these errors were encountered:
I created a new chart:
helm create hello-world-multiple cd hello-world-multiple helm template hello-world .
Here is the modified template/deployment.yaml file:
template/deployment.yaml
{{- range $key, $value := .Values.repositories }} --- apiVersion: apps/v1 kind: Deployment metadata: name: {{ $value.name }} labels: {{- include "hello-world-multiple.labels" $ | nindent 4 }} spec: {{- if not $.Values.autoscaling.enabled }} replicas: {{ $.Values.replicaCount }} {{- end }} selector: matchLabels: {{- include "hello-world-multiple.selectorLabels" $ | nindent 6 }} template: metadata: {{- with $.Values.podAnnotations }} annotations: {{- toYaml $ | nindent 8 }} {{- end }} labels: {{- include "hello-world-multiple.selectorLabels" $ | nindent 8 }} spec: {{- with $.Values.imagePullSecrets }} imagePullSecrets: {{- toYaml $ | nindent 8 }} {{- end }} serviceAccountName: {{ include "hello-world-multiple.serviceAccountName" $ }} securityContext: {{- toYaml $.Values.podSecurityContext | nindent 8 }} containers: - name: hello-world securityContext: {{- toYaml $.Values.securityContext | nindent 12 }} image: "{{ $.Values.image.repository }}:{{ $.Values.image.tag | default $.Chart.AppVersion }}" imagePullPolicy: {{ $.Values.image.pullPolicy }} {{- end }}
Sorry, something went wrong.
Reference(s):
No branches or pull requests
In the
values.yaml
file, we could specify several sites:Then the chart would generate three deployments and three services, one for each site.
Then we could add an ingress that includes each of the services:
Then each site would be accessible via the following URLs:
The text was updated successfully, but these errors were encountered: