Skip to content

Commit

Permalink
added new child chart
Browse files Browse the repository at this point in the history
  • Loading branch information
bitthalpatidar committed Feb 13, 2025
1 parent 7ed3e62 commit 62c3968
Show file tree
Hide file tree
Showing 37 changed files with 717 additions and 3 deletions.
22 changes: 22 additions & 0 deletions child-apps/chart1/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
apiVersion: v2
name: chart1
description: A Helm chart for Kubernetes

# 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.
# It is recommended to use it with quotes.
appVersion: "1.16.0"
16 changes: 16 additions & 0 deletions child-apps/chart1/templates/configmap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ .Chart.Name }}-index-html-configmap
labels:
app: {{ .Values.env.name }}-nginx
app.kubernetes.io/instance: {{ .Chart.Name }}
namespace: {{ .Release.Namespace }}
#namespace: {{ .Chart.Name }}-{{ .Values.namespace }}
data:
index.html: |
<html>
<h1>Welcome</h1>
</br>
<h1>Hi! I got deployed from {{ .Values.env.name }} app using Helm Chart </h1>
</html
38 changes: 38 additions & 0 deletions child-apps/chart1/templates/deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ .Chart.Name }}-nginx
#namespace: {{ .Chart.Name }}-{{ .Values.namespace }}
labels:
app: {{ .Values.env.name }}-nginx
app.kubernetes.io/instance: {{ .Chart.Name }}
namespace: {{ .Release.Namespace }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
app: {{ .Values.env.name }}-nginx
app.kubernetes.io/instance: {{ .Chart.Name }}
namespace: {{ .Release.Namespace }}
template:
metadata:
labels:
app: {{ .Values.env.name }}-nginx
app.kubernetes.io/instance: {{ .Chart.Name }}
namespace: {{ .Release.Namespace }}
spec:
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
ports:
- name: http
containerPort: 80
protocol: TCP
volumeMounts:
- name: nginx-index-file
mountPath: /usr/share/nginx/html/
volumes:
- name: nginx-index-file
configMap:
name: {{ .Chart.Name }}-index-html-configmap
15 changes: 15 additions & 0 deletions child-apps/chart1/templates/service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
apiVersion: v1
kind: Service
metadata:
name: {{ .Chart.Name }}-service
#namespace: {{ .Chart.Name }}-{{ .Values.namespace }}
spec:
selector:
app.kubernetes.io/instance: {{ .Chart.Name }}
app: {{ .Values.env.name }}-nginx
namespace: {{ .Release.Namespace }}
type: {{ .Values.service.type }}
ports:
- protocol: {{ .Values.service.protocol | default "TCP" }}
port: {{ .Values.service.port }}
targetPort: {{ .Values.service.targetPort }}
22 changes: 22 additions & 0 deletions child-apps/chart1/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Default values for test-app.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.

#namespace: default
replicaCount: 1

image:
repository: nginx
pullPolicy: IfNotPresent
# Overrides the image tag whose default is the chart appVersion.
tag: "1.16.0"

imagePullSecrets: []
service:
name: nginx-service
type: ClusterIP
port: 80
targetPort: 80

env:
name: chart1
24 changes: 24 additions & 0 deletions child-apps/chart2/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
apiVersion: v2
name: chart2
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.
# It is recommended to use it with quotes.
appVersion: "1.16.0"
12 changes: 12 additions & 0 deletions child-apps/chart2/templates/configmap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ .Chart.Name }}-index-html-configmap
#namespace: {{ .Chart.Name }}-{{ .Values.namespace }}
data:
index.html: |
<html>
<h1>Welcome</h1>
</br>
<h1>Hi! I got deployed from {{ .Values.env.name }} app using Helm Chart </h1>
</html
35 changes: 35 additions & 0 deletions child-apps/chart2/templates/deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ .Chart.Name }}-nginx
#namespace: {{ .Chart.Name }}-{{ .Values.namespace }}
labels:
app: {{ .Values.env.name }}-nginx
app.kubernetes.io/instance: {{ .Chart.Name }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
app: {{ .Values.env.name }}-nginx
app.kubernetes.io/instance: {{ .Chart.Name }}
template:
metadata:
labels:
app: {{ .Values.env.name }}-nginx
app.kubernetes.io/instance: {{ .Chart.Name }}
spec:
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
ports:
- name: http
containerPort: 80
protocol: TCP
volumeMounts:
- name: nginx-index-file
mountPath: /usr/share/nginx/html/
volumes:
- name: nginx-index-file
configMap:
name: {{ .Chart.Name }}-index-html-configmap
14 changes: 14 additions & 0 deletions child-apps/chart2/templates/service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
apiVersion: v1
kind: Service
metadata:
name: {{ .Chart.Name }}-service
#namespace: {{ .Chart.Name }}-{{ .Values.namespace }}
spec:
selector:
app.kubernetes.io/instance: {{ .Chart.Name }}
app: {{ .Values.env.name }}-nginx
type: {{ .Values.service.type }}
ports:
- protocol: {{ .Values.service.protocol | default "TCP" }}
port: {{ .Values.service.port }}
targetPort: {{ .Values.service.targetPort }}
22 changes: 22 additions & 0 deletions child-apps/chart2/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Default values for test-app.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.

#namespace: default
replicaCount: 1

image:
repository: nginx
pullPolicy: IfNotPresent
# Overrides the image tag whose default is the chart appVersion.
tag: "1.16.0"

imagePullSecrets: []
service:
name: nginx-service
type: ClusterIP
port: 80
targetPort: 80

env:
name: chart2
24 changes: 24 additions & 0 deletions child-apps/chart3/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
apiVersion: v2
name: chart3
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.
# It is recommended to use it with quotes.
appVersion: "1.16.0"
12 changes: 12 additions & 0 deletions child-apps/chart3/templates/configmap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ .Chart.Name }}-index-html-configmap
#namespace: {{ .Chart.Name }}-{{ .Values.namespace }}
data:
index.html: |
<html>
<h1>Welcome</h1>
</br>
<h1>Hi! I got deployed from {{ .Values.env.name }} app using Helm Chart </h1>
</html
35 changes: 35 additions & 0 deletions child-apps/chart3/templates/deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ .Chart.Name }}-nginx
#namespace: {{ .Chart.Name }}-{{ .Values.namespace }}
labels:
app: {{ .Values.env.name }}-nginx
app.kubernetes.io/instance: {{ .Chart.Name }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
app: {{ .Values.env.name }}-nginx
app.kubernetes.io/instance: {{ .Chart.Name }}
template:
metadata:
labels:
app: {{ .Values.env.name }}-nginx
app.kubernetes.io/instance: {{ .Chart.Name }}
spec:
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
ports:
- name: http
containerPort: 80
protocol: TCP
volumeMounts:
- name: nginx-index-file
mountPath: /usr/share/nginx/html/
volumes:
- name: nginx-index-file
configMap:
name: {{ .Chart.Name }}-index-html-configmap
14 changes: 14 additions & 0 deletions child-apps/chart3/templates/service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
apiVersion: v1
kind: Service
metadata:
name: {{ .Chart.Name }}-service
#namespace: {{ .Chart.Name }}-{{ .Values.namespace }}
spec:
selector:
app.kubernetes.io/instance: {{ .Chart.Name }}
app: {{ .Values.env.name }}-nginx
type: {{ .Values.service.type }}
ports:
- protocol: {{ .Values.service.protocol | default "TCP" }}
port: {{ .Values.service.port }}
targetPort: {{ .Values.service.targetPort }}
22 changes: 22 additions & 0 deletions child-apps/chart3/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Default values for test-app.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.

#namespace: default
replicaCount: 1

image:
repository: nginx
pullPolicy: IfNotPresent
# Overrides the image tag whose default is the chart appVersion.
tag: "1.16.0"

imagePullSecrets: []
service:
name: nginx-service
type: ClusterIP
port: 80
targetPort: 80

env:
name: chart3
24 changes: 24 additions & 0 deletions child-apps/chart4/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
apiVersion: v2
name: chart4
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.
# It is recommended to use it with quotes.
appVersion: "1.16.0"
12 changes: 12 additions & 0 deletions child-apps/chart4/templates/configmap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ .Chart.Name }}-index-html-configmap
#namespace: {{ .Chart.Name }}-{{ .Values.namespace }}
data:
index.html: |
<html>
<h1>Welcome</h1>
</br>
<h1>Hi! I got deployed from {{ .Values.env.name }} app using Helm Chart </h1>
</html
Loading

0 comments on commit 62c3968

Please sign in to comment.