Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions apps/charts/webapp1/.helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*.orig
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/
24 changes: 24 additions & 0 deletions apps/charts/webapp1/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
apiVersion: v2
name: webapp1
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"
4 changes: 4 additions & 0 deletions apps/charts/webapp1/templates/NOTES.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Accessing it
```
minikube tunnel {{ .Values.namespace }}
```
9 changes: 9 additions & 0 deletions apps/charts/webapp1/templates/configmap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
kind: ConfigMap
apiVersion: v1
metadata:
name: {{ .Values.configmap.name }}
namespace: {{ .Values.namespace }}
data:
BG_COLOR: '#12181b'
FONT_COLOR: '#FFFFFF'
CUSTOM_HEADER: {{ .Values.configmap.data.CUSTOM_HEADER }}
34 changes: 34 additions & 0 deletions apps/charts/webapp1/templates/deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ .Values.appName }}
namespace: {{ .Values.namespace }}
labels:
app: {{ .Values.appName }}
spec:
replicas: {{ .Values.spec.replicas }}
selector:
matchLabels:
app: {{ .Values.appName }}
tier: frontend
template:
metadata:
labels:
app: {{ .Values.appName }}
tier: frontend
spec: # Pod spec
containers:
- name: mycontainer
image: "{{ .Values.image.name }}:{{ .Values.image.tag }}"
ports:
- containerPort: 80
envFrom:
- configMapRef:
name: {{ .Values.configmap.name }}
resources:
requests:
memory: "16Mi"
cpu: "50m" # 50 milli cores (1/20 CPU)
limits:
memory: "128Mi" # 128 mebibytes
cpu: "100m"
16 changes: 16 additions & 0 deletions apps/charts/webapp1/templates/service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
apiVersion: v1
kind: Service
metadata:
name: {{ .Values.appName }}
namespace: {{ .Values.namespace }}
labels:
app: {{ .Values.appName }}
spec:
ports:
- port: 80
protocol: TCP
name: flask
selector:
app: {{ .Values.appName }}
tier: frontend
type: NodePort
8 changes: 8 additions & 0 deletions apps/charts/webapp1/values-dev.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
namespace: dev

configmap:
data:
CUSTOM_HEADER: "Welcome to DEV"

spec:
replicas: 2
6 changes: 6 additions & 0 deletions apps/charts/webapp1/values-prod.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
namespace: prod

configmap:
data:
CUSTOM_HEADER: "Welcome to PROD"

15 changes: 15 additions & 0 deletions apps/charts/webapp1/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
appName: myhelmapp

namespace: default

configmap:
name: helmappconfigmapv1.1
data:
CUSTOM_HEADER: "This app was deployed with HELM!"

image:
name: devopsjourney1/mywebapp
tag: latest

spec:
replicas: 2
23 changes: 23 additions & 0 deletions apps/charts/webapp2/.helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*.orig
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/
24 changes: 24 additions & 0 deletions apps/charts/webapp2/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
apiVersion: v2
name: webapp1
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"
4 changes: 4 additions & 0 deletions apps/charts/webapp2/templates/NOTES.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Accessing it
```
minikube tunnel {{ .Values.namespace }}
```
9 changes: 9 additions & 0 deletions apps/charts/webapp2/templates/configmap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
kind: ConfigMap
apiVersion: v1
metadata:
name: {{ .Values.configmap.name }}
namespace: {{ .Values.namespace }}
data:
BG_COLOR: '#12181b'
FONT_COLOR: '#FFFFFF'
CUSTOM_HEADER: {{ .Values.configmap.data.CUSTOM_HEADER }}
34 changes: 34 additions & 0 deletions apps/charts/webapp2/templates/deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ .Values.appName }}
namespace: {{ .Values.namespace }}
labels:
app: {{ .Values.appName }}
spec:
replicas: {{ .Values.spec.replicas }}
selector:
matchLabels:
app: {{ .Values.appName }}
tier: frontend
template:
metadata:
labels:
app: {{ .Values.appName }}
tier: frontend
spec: # Pod spec
containers:
- name: mycontainer
image: "{{ .Values.image.name }}:{{ .Values.image.tag }}"
ports:
- containerPort: 80
envFrom:
- configMapRef:
name: {{ .Values.configmap.name }}
resources:
requests:
memory: "16Mi"
cpu: "50m" # 50 milli cores (1/20 CPU)
limits:
memory: "128Mi" # 128 mebibytes
cpu: "100m"
16 changes: 16 additions & 0 deletions apps/charts/webapp2/templates/service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
apiVersion: v1
kind: Service
metadata:
name: {{ .Values.appName }}
namespace: {{ .Values.namespace }}
labels:
app: {{ .Values.appName }}
spec:
ports:
- port: 8080
protocol: TCP
name: flask
selector:
app: {{ .Values.appName }}
tier: frontend
type: NodePort
8 changes: 8 additions & 0 deletions apps/charts/webapp2/values-dev.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
namespace: dev

configmap:
data:
CUSTOM_HEADER: "Welcome to DEV"

spec:
replicas: 2
6 changes: 6 additions & 0 deletions apps/charts/webapp2/values-prod.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
namespace: prod

configmap:
data:
CUSTOM_HEADER: "Welcome to PROD"

15 changes: 15 additions & 0 deletions apps/charts/webapp2/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
appName: myhelmapp

namespace: default

configmap:
name: helmappconfigmapv1.1
data:
CUSTOM_HEADER: "This app was deployed with HELM!"

image:
name: devopsjourney1/mywebapp
tag: latest

spec:
replicas: 2
20 changes: 20 additions & 0 deletions apps/webapps-platform.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: webapp-app
namespace: argocd
spec:
project: default
source:
repoURL: https://github.com/rowdenb/helm-webapp.git
targetRevision: main
path: apps
directory:
recurse: true
destination:
server: https://kubernetes.default.svc
namespace: argocd
syncPolicy:
automated:
prune: false
selfHeal: false
24 changes: 24 additions & 0 deletions apps/webapps-webapp1.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: datahub-prerequisites
namespace: argocd
spec:
project: default
source:
repoURL: https://github.com/rowdenb/helm-webapp.git
targetRevision: main
path: charts/webapp1
helm:
valueFiles:
- values.yaml # or values/dev.yaml etc. if using environments
destination:
server: https://kubernetes.default.svc
namespace: webappns
syncPolicy:
automated:
selfHeal: false
prune: false
syncOptions:
- CreateNamespace=true
syncWave: "0"
24 changes: 24 additions & 0 deletions apps/webapps-webapp2.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: datahub
namespace: argocd
spec:
project: default
source:
repoURL: https://git.datalab.thsd.health.qld.gov.au/repo.git
targetRevision: main
path: charts/webapp2
helm:
valueFiles:
- values.yaml # or values/dev.yaml if using per-environment overrides
destination:
server: https://kubernetes.default.svc
namespace: webappns
syncPolicy:
automated:
selfHeal: false
prune: false
syncOptions:
- CreateNamespace=true
syncWave: "1"