mirror of https://github.com/helm/helm
Merge d43aaa4b15
into 3a94215585
commit
cdf749a8c5
@ -0,0 +1,48 @@
|
||||
---
|
||||
# Source: chart-with-subchart-global/charts/dep1/templates/ingress.yaml
|
||||
apiVersion: networking.k8s.io/v1beta1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: RELEASE-NAME-dep1
|
||||
labels:
|
||||
helm.sh/chart: dep1-0.1.0
|
||||
app.kubernetes.io/name: dep1
|
||||
app.kubernetes.io/instance: RELEASE-NAME
|
||||
app.kubernetes.io/version: "1.16.0"
|
||||
app.kubernetes.io/managed-by: Helm
|
||||
annotations:
|
||||
some-annotation: dep1
|
||||
test: global
|
||||
spec:
|
||||
rules:
|
||||
- host: "localhost1"
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
backend:
|
||||
serviceName: RELEASE-NAME-dep1
|
||||
servicePort: 80
|
||||
---
|
||||
# Source: chart-with-subchart-global/charts/dep2/templates/ingress.yaml
|
||||
apiVersion: networking.k8s.io/v1beta1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: RELEASE-NAME-dep2
|
||||
labels:
|
||||
helm.sh/chart: dep2-0.1.0
|
||||
app.kubernetes.io/name: dep2
|
||||
app.kubernetes.io/instance: RELEASE-NAME
|
||||
app.kubernetes.io/version: "1.16.0"
|
||||
app.kubernetes.io/managed-by: Helm
|
||||
annotations:
|
||||
some-annotation: dep2
|
||||
test: global
|
||||
spec:
|
||||
rules:
|
||||
- host: "localhost2"
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
backend:
|
||||
serviceName: RELEASE-NAME-dep2
|
||||
servicePort: 80
|
@ -0,0 +1,9 @@
|
||||
dependencies:
|
||||
- name: dep1
|
||||
repository: file://../dep1
|
||||
version: 0.1.0
|
||||
- name: dep2
|
||||
repository: file://../dep2
|
||||
version: 0.1.0
|
||||
digest: sha256:3278a7071cc4f6cecc966ec807fd378018d2f7f07f5f136b538596c1d9066c51
|
||||
generated: "2020-08-03T18:59:45.008862+03:00"
|
@ -0,0 +1,15 @@
|
||||
apiVersion: v2
|
||||
name: chart-with-subchart-global
|
||||
description: A Helm chart for Kubernetes
|
||||
type: application
|
||||
version: 0.1.0
|
||||
appVersion: 1.16.0
|
||||
|
||||
dependencies:
|
||||
- name: dep1
|
||||
version: 0.1.0
|
||||
repository: file://./dep1
|
||||
- name: dep2
|
||||
version: 0.1.0
|
||||
repository: file://./dep2
|
||||
|
Binary file not shown.
Binary file not shown.
@ -0,0 +1,23 @@
|
||||
apiVersion: v2
|
||||
name: dep1
|
||||
description: A Helm chart for Kubernetes
|
||||
|
||||
# A chart can be either an 'application' or a 'library' chart.
|
||||
#
|
||||
# Application charts are a collection of templates that can be packaged into versioned archives
|
||||
# to be deployed.
|
||||
#
|
||||
# Library charts provide useful utilities or functions for the chart developer. They're included as
|
||||
# a dependency of application charts to inject those utilities and functions into the rendering
|
||||
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
|
||||
type: application
|
||||
|
||||
# This is the chart version. This version number should be incremented each time you make changes
|
||||
# to the chart and its templates, including the app version.
|
||||
# Versions are expected to follow Semantic Versioning (https://semver.org/)
|
||||
version: 0.1.0
|
||||
|
||||
# This is the version number of the application being deployed. This version number should be
|
||||
# incremented each time you make changes to the application. Versions are not expected to
|
||||
# follow Semantic Versioning. They should reflect the version the application is using.
|
||||
appVersion: 1.16.0
|
@ -0,0 +1,42 @@
|
||||
{{- if .Values.ingress.enabled -}}
|
||||
{{- $fullName := include "dep1.fullname" . -}}
|
||||
{{- $svcPort := .Values.service.port -}}
|
||||
{{- if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}}
|
||||
apiVersion: networking.k8s.io/v1beta1
|
||||
{{- else -}}
|
||||
apiVersion: extensions/v1beta1
|
||||
{{- end }}
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: {{ $fullName }}
|
||||
labels:
|
||||
{{- include "dep1.labels" . | nindent 4 }}
|
||||
{{/* // Here I'm try to merge global & unique for chart annotations*/}}
|
||||
{{- with merge .Values.global.ingress.annotations .Values.ingress.annotations }}
|
||||
annotations:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- if .Values.ingress.tls }}
|
||||
tls:
|
||||
{{- range .Values.ingress.tls }}
|
||||
- hosts:
|
||||
{{- range .hosts }}
|
||||
- {{ . | quote }}
|
||||
{{- end }}
|
||||
secretName: {{ .secretName }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
rules:
|
||||
{{- range .Values.ingress.hosts }}
|
||||
- host: {{ .host | quote }}
|
||||
http:
|
||||
paths:
|
||||
{{- range .paths }}
|
||||
- path: {{ . }}
|
||||
backend:
|
||||
serviceName: {{ $fullName }}
|
||||
servicePort: {{ $svcPort }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
@ -0,0 +1,23 @@
|
||||
|
||||
|
||||
imagePullSecrets: []
|
||||
nameOverride: ""
|
||||
fullnameOverride: ""
|
||||
|
||||
|
||||
service:
|
||||
type: ClusterIP
|
||||
port: 80
|
||||
|
||||
ingress:
|
||||
enabled: true
|
||||
annotations: {}
|
||||
# kubernetes.io/ingress.class: nginx
|
||||
# kubernetes.io/tls-acme: "true"
|
||||
hosts:
|
||||
- host: chart-example.local
|
||||
paths: []
|
||||
tls: []
|
||||
# - secretName: chart-example-tls
|
||||
# hosts:
|
||||
# - chart-example.local
|
@ -0,0 +1,23 @@
|
||||
apiVersion: v2
|
||||
name: dep2
|
||||
description: A Helm chart for Kubernetes
|
||||
|
||||
# A chart can be either an 'application' or a 'library' chart.
|
||||
#
|
||||
# Application charts are a collection of templates that can be packaged into versioned archives
|
||||
# to be deployed.
|
||||
#
|
||||
# Library charts provide useful utilities or functions for the chart developer. They're included as
|
||||
# a dependency of application charts to inject those utilities and functions into the rendering
|
||||
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
|
||||
type: application
|
||||
|
||||
# This is the chart version. This version number should be incremented each time you make changes
|
||||
# to the chart and its templates, including the app version.
|
||||
# Versions are expected to follow Semantic Versioning (https://semver.org/)
|
||||
version: 0.1.0
|
||||
|
||||
# This is the version number of the application being deployed. This version number should be
|
||||
# incremented each time you make changes to the application. Versions are not expected to
|
||||
# follow Semantic Versioning. They should reflect the version the application is using.
|
||||
appVersion: 1.16.0
|
@ -0,0 +1,42 @@
|
||||
{{- if .Values.ingress.enabled -}}
|
||||
{{- $fullName := include "dep2.fullname" . -}}
|
||||
{{- $svcPort := .Values.service.port -}}
|
||||
{{- if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}}
|
||||
apiVersion: networking.k8s.io/v1beta1
|
||||
{{- else -}}
|
||||
apiVersion: extensions/v1beta1
|
||||
{{- end }}
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: {{ $fullName }}
|
||||
labels:
|
||||
{{- include "dep2.labels" . | nindent 4 }}
|
||||
{{/* // Here I'm try to merge global & unique for chart annotations*/}}
|
||||
{{- with merge .Values.global.ingress.annotations .Values.ingress.annotations }}
|
||||
annotations:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- if .Values.ingress.tls }}
|
||||
tls:
|
||||
{{- range .Values.ingress.tls }}
|
||||
- hosts:
|
||||
{{- range .hosts }}
|
||||
- {{ . | quote }}
|
||||
{{- end }}
|
||||
secretName: {{ .secretName }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
rules:
|
||||
{{- range .Values.ingress.hosts }}
|
||||
- host: {{ .host | quote }}
|
||||
http:
|
||||
paths:
|
||||
{{- range .paths }}
|
||||
- path: {{ . }}
|
||||
backend:
|
||||
serviceName: {{ $fullName }}
|
||||
servicePort: {{ $svcPort }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
@ -0,0 +1,24 @@
|
||||
|
||||
|
||||
|
||||
imagePullSecrets: []
|
||||
nameOverride: ""
|
||||
fullnameOverride: ""
|
||||
|
||||
|
||||
service:
|
||||
type: ClusterIP
|
||||
port: 80
|
||||
|
||||
ingress:
|
||||
enabled: true
|
||||
annotations: {}
|
||||
# kubernetes.io/ingress.class: nginx
|
||||
# kubernetes.io/tls-acme: "true"
|
||||
hosts:
|
||||
- host: chart-example.local
|
||||
paths: []
|
||||
tls: []
|
||||
# - secretName: chart-example-tls
|
||||
# hosts:
|
||||
# - chart-example.local
|
@ -0,0 +1,22 @@
|
||||
global:
|
||||
ingress:
|
||||
annotations: {}
|
||||
|
||||
dep1:
|
||||
ingress:
|
||||
enabled: true
|
||||
annotations:
|
||||
"some-annotation": "dep1"
|
||||
hosts:
|
||||
- host: localhost1
|
||||
paths:
|
||||
- /
|
||||
dep2:
|
||||
ingress:
|
||||
enabled: true
|
||||
annotations:
|
||||
"some-annotation": "dep2"
|
||||
hosts:
|
||||
- host: localhost2
|
||||
paths:
|
||||
- /
|
Loading…
Reference in new issue