Skip to content

Commit

Permalink
iec-flow
Browse files Browse the repository at this point in the history
  • Loading branch information
leaddevops committed Oct 10, 2023
1 parent baa5eb4 commit 63c0f47
Show file tree
Hide file tree
Showing 10 changed files with 124 additions and 1 deletion.
2 changes: 1 addition & 1 deletion 05-create-helm-charts/07-flow-control/iechart1/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# place the below content inside the Chart.yaml
apiVersion: v2
type: application
name: iec1
name: app
version: "0.1.0" # recomended to follow version as "MAJOR-Version.MINOR-Version.PATCH-Version" always
description: "A Helm chart to deploy all required kubernetes resources"
appVersion: "1.0.0" # your application version / release version
Expand Down
8 changes: 8 additions & 0 deletions 05-create-helm-charts/07-flow-control/iechart2/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# place the below content inside the Chart.yaml
apiVersion: v2
type: application
name: app
version: "0.1.0" # recomended to follow version as "MAJOR-Version.MINOR-Version.PATCH-Version" always
description: "A Helm chart to deploy all required kubernetes resources"
appVersion: "1.0.0" # your application version / release version
# save the file with the above data
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ .Release.Name }}-{{ .Chart.Name }}
labels:
app: nginx
spec:
{{- if and .Values.iecapp.enabled (eq .Values.iecapp.env "prod") }}
replicas: 6
{{- else if eq .Values.iecapp.env "prod" }}
replicas: 4
{{- else if eq .Values.iecapp.env "qa" }}
replicas: 2
{{- else }}
replicas: 1
{{- end }}
selector:
matchLabels:
app: nginx
template:
metadata:
labels:
app: nginx
spec:
containers:
- name: nginx
image: {{ .Values.image.repo }}:{{.Values.image.tag }}
ports:
- containerPort: 80
6 changes: 6 additions & 0 deletions 05-create-helm-charts/07-flow-control/iechart2/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
iecapp:
env: prod
enabled: ""
image:
repo: docker.io/lerndevops/samples
tag: pyapp-v2
8 changes: 8 additions & 0 deletions 05-create-helm-charts/07-flow-control/iechart3/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# place the below content inside the Chart.yaml
apiVersion: v2
type: application
name: app
version: "0.1.0" # recomended to follow version as "MAJOR-Version.MINOR-Version.PATCH-Version" always
description: "A Helm chart to deploy all required kubernetes resources"
appVersion: "1.0.0" # your application version / release version
# save the file with the above data
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ .Release.Name }}-{{ .Chart.Name }}
labels:
app: nginx
spec:
{{- if or (eq .Values.iecapp.env "prod") (eq .Values.iecapp.env "uat") }}
replicas: 6
{{- else if eq .Values.iecapp.env "qa" }}
replicas: 2
{{- else }}
replicas: 1
{{- end }}
selector:
matchLabels:
app: nginx
template:
metadata:
labels:
app: nginx
spec:
containers:
- name: nginx
image: {{ .Values.image.repo }}:{{ .Values.image.tag }}
ports:
- containerPort: 3000
6 changes: 6 additions & 0 deletions 05-create-helm-charts/07-flow-control/iechart3/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
iecapp:
env: prod
enabled: ""
image:
repo: docker.io/lerndevops/samples
tag: pyapp-v2
8 changes: 8 additions & 0 deletions 05-create-helm-charts/07-flow-control/iechart4/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# place the below content inside the Chart.yaml
apiVersion: v2
type: application
name: app
version: "0.1.0" # recomended to follow version as "MAJOR-Version.MINOR-Version.PATCH-Version" always
description: "A Helm chart to deploy all required kubernetes resources"
appVersion: "1.0.0" # your application version / release version
# save the file with the above data
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ .Release.Name }}-{{ .Chart.Name }}
labels:
app: nginx
spec:
{{- if not (eq .Values.iecapp.env "prod") }}
replicas: 1
{{- else }}
replicas: 4
{{- end }}
selector:
matchLabels:
app: nginx
template:
metadata:
labels:
app: nginx
spec:
containers:
- name: nginx
image: {{ .Values.image.repo }}:{{ .Values.image.tag }}
ports:
- containerPort: 3000
6 changes: 6 additions & 0 deletions 05-create-helm-charts/07-flow-control/iechart4/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
iecapp:
env: prod
enabled: ""
image:
repo: docker.io/lerndevops/samples
tag: pyapp-v2

0 comments on commit 63c0f47

Please sign in to comment.