├── .DS_Store ├── 01-Install-Docker-Desktop-and-HelmCLI ├── README.md └── kube-manifests │ ├── deployment.yaml │ └── service.yaml ├── 02-Helm-Install └── README.md ├── 03-Helm-Upgrade-with-set-option └── README.md ├── 04-Helm-Upgrade-with-Chart-Versions └── README.md ├── 05-Helm-Uninstall-Keep-History └── README.md ├── 06-Helm-Install-Generated-Name └── README.md ├── 07-Helm-Install-Atomic └── README.md ├── 08-Helm-with-Namespaces └── README.md ├── 09-Helm-Override-Values ├── README.md └── myvalues.yaml ├── 10-Helm-Chart-Structure ├── README.md └── basechart │ ├── .helmignore │ ├── Chart.yaml │ ├── templates │ ├── NOTES.txt │ ├── _helpers.tpl │ ├── deployment.yaml │ ├── hpa.yaml │ ├── ingress.yaml │ ├── service.yaml │ ├── serviceaccount.yaml │ └── tests │ │ └── test-connection.yaml │ └── values.yaml ├── 11-Helm-Dev-BuiltIn-Objects ├── README.md ├── builtinobjects │ ├── .helmignore │ ├── Chart.yaml │ ├── config-files │ │ ├── myconfig2.toml │ │ └── myconfig3.toml │ ├── myconfig1.toml │ ├── templates │ │ ├── NOTES.txt │ │ ├── _helpers.tpl │ │ ├── deployment.yaml │ │ ├── hpa.yaml │ │ ├── ingress.yaml │ │ ├── service.yaml │ │ ├── serviceaccount.yaml │ │ └── tests │ │ │ └── test-connection.yaml │ └── values.yaml ├── files-demo │ ├── config-files │ │ ├── myconfig2.toml │ │ └── myconfig3.toml │ └── myconfig1.toml └── root-object-content.txt ├── 12-Helm-Dev-Basics ├── README.md ├── backup-files │ ├── final-deployment-file │ │ ├── Chart.yaml │ │ ├── deployment.yaml │ │ └── values.yaml │ └── helmbasics │ │ ├── .helmignore │ │ ├── Chart.yaml │ │ ├── templates │ │ ├── NOTES.txt │ │ └── deployment.yaml │ │ └── values.yaml ├── deployment-file │ └── deployment.yaml └── helmbasics │ ├── .helmignore │ ├── Chart.yaml │ ├── templates │ ├── NOTES.txt │ └── deployment.yaml │ └── values.yaml ├── 13-Helm-Dev-If-Else-EQ ├── README.md ├── backupfiles │ └── deployment.yaml └── helmbasics │ ├── .helmignore │ ├── Chart.yaml │ ├── templates │ ├── NOTES.txt │ └── deployment.yaml │ └── values.yaml ├── 14-Helm-Dev-If-Else-AND-BOOLEAN ├── README.md ├── backupfiles │ └── deployment.yaml └── helmbasics │ ├── .helmignore │ ├── Chart.yaml │ ├── templates │ ├── NOTES.txt │ └── deployment.yaml │ └── values.yaml ├── 15-Helm-Dev-If-Else-OR ├── README.md ├── backupfiles │ └── deployment.yaml └── helmbasics │ ├── .helmignore │ ├── Chart.yaml │ ├── templates │ ├── NOTES.txt │ └── deployment.yaml │ └── values.yaml ├── 16-Helm-Dev-If-Else-NOT ├── README.md ├── backupfiles │ └── deployment.yaml └── helmbasics │ ├── .helmignore │ ├── Chart.yaml │ ├── templates │ ├── NOTES.txt │ └── deployment.yaml │ └── values.yaml ├── 17-Helm-Dev-WITH ├── README.md ├── backupfiles │ ├── configmap.yaml │ ├── deployment.yaml │ └── values.yaml └── helmbasics │ ├── .helmignore │ ├── Chart.yaml │ ├── templates │ ├── NOTES.txt │ ├── configmap.yaml │ └── deployment.yaml │ └── values.yaml ├── 18-Helm-Dev-WITH-If-Else ├── README.md ├── backupfiles │ └── deployment.yaml └── helmbasics │ ├── .helmignore │ ├── Chart.yaml │ ├── templates │ ├── NOTES.txt │ └── deployment.yaml │ └── values.yaml ├── 19-Helm-Dev-Variables ├── README.md ├── backupfiles │ └── deployment.yaml └── helmbasics │ ├── .helmignore │ ├── Chart.yaml │ ├── templates │ ├── NOTES.txt │ └── deployment.yaml │ └── values.yaml ├── 20-Helm-Dev-Range-List ├── README.md ├── backupfiles │ ├── namespace-with-variable.yaml │ └── namespace.yaml └── helmbasics │ ├── .helmignore │ ├── Chart.yaml │ ├── templates │ ├── NOTES.txt │ ├── namespace-with-variable.yaml │ └── namespace.yaml │ └── values.yaml ├── 21-Helm-Dev-Range-Dict ├── README.md ├── backupfiles │ ├── configmap-with-variable.yaml │ └── configmap.yaml └── helmbasics │ ├── .helmignore │ ├── Chart.yaml │ ├── templates │ ├── NOTES.txt │ ├── configmap-with-variable.yaml │ └── configmap.yaml │ └── values.yaml ├── 22-Helm-Dev-Named-Templates ├── README.md ├── backupfiles │ ├── _helpers.tpl │ └── deployment.yaml └── helmbasics │ ├── .helmignore │ ├── Chart.yaml │ ├── templates │ ├── NOTES.txt │ ├── _helpers.tpl │ └── deployment.yaml │ └── values.yaml ├── 23-Helm-Dev-Printf-Function ├── README.md ├── backupfiles │ ├── _helpers.tpl │ └── deployment.yaml └── helmbasics │ ├── .helmignore │ ├── Chart.yaml │ ├── templates │ ├── NOTES.txt │ ├── _helpers.tpl │ └── deployment.yaml │ └── values.yaml ├── 24-Helm-Dev-call-template-in-template ├── README.md ├── backupfiles │ ├── _helpers.tpl │ └── deployment.yaml └── helmbasics │ ├── .helmignore │ ├── Chart.yaml │ ├── templates │ ├── NOTES.txt │ ├── _helpers.tpl │ └── deployment.yaml │ └── values.yaml ├── 25-Helm-Create-and-Package-Chart ├── README.md ├── myfirstchart │ ├── .helmignore │ ├── Chart.yaml │ ├── templates │ │ ├── NOTES.txt │ │ ├── _helpers.tpl │ │ ├── deployment.yaml │ │ ├── hpa.yaml │ │ ├── ingress.yaml │ │ ├── service.yaml │ │ ├── serviceaccount.yaml │ │ └── tests │ │ │ └── test-connection.yaml │ └── values.yaml └── packages │ ├── myfirstchart-1.0.0.tgz │ ├── myfirstchart-2.0.0.tgz │ └── myfirstchart-3.0.0.tgz ├── 26-Helm-Dependency ├── README.md ├── backupfiles │ └── parentchart │ │ ├── .helmignore │ │ ├── Chart.lock │ │ ├── Chart.yaml │ │ ├── charts │ │ ├── mychart1-0.1.0.tgz │ │ ├── mychart2-0.4.0.tgz │ │ └── mysql-9.11.0.tgz │ │ ├── templates │ │ ├── NOTES.txt │ │ ├── _helpers.tpl │ │ ├── deployment.yaml │ │ ├── hpa.yaml │ │ ├── ingress.yaml │ │ ├── service.yaml │ │ ├── serviceaccount.yaml │ │ └── tests │ │ │ └── test-connection.yaml │ │ └── values.yaml └── parentchart │ ├── .helmignore │ ├── Chart.yaml │ ├── templates │ ├── NOTES.txt │ ├── _helpers.tpl │ ├── deployment.yaml │ ├── hpa.yaml │ ├── ingress.yaml │ ├── service.yaml │ ├── serviceaccount.yaml │ └── tests │ │ └── test-connection.yaml │ └── values.yaml ├── 27-Helm-Dependency-Alias ├── README.md └── parentchart │ ├── .helmignore │ ├── Chart.lock │ ├── Chart.yaml │ ├── charts │ ├── mychart2-0.4.0.tgz │ └── mychart4-0.1.0.tgz │ ├── templates │ ├── NOTES.txt │ ├── _helpers.tpl │ ├── deployment.yaml │ ├── hpa.yaml │ ├── ingress.yaml │ ├── service.yaml │ ├── serviceaccount.yaml │ └── tests │ │ └── test-connection.yaml │ └── values.yaml ├── 28-Helm-Dependency-Condition ├── README.md └── parentchart │ ├── .helmignore │ ├── Chart.lock │ ├── Chart.yaml │ ├── charts │ ├── mychart2-0.4.0.tgz │ └── mychart4-0.1.0.tgz │ ├── templates │ ├── NOTES.txt │ ├── _helpers.tpl │ ├── deployment.yaml │ ├── hpa.yaml │ ├── ingress.yaml │ ├── service.yaml │ ├── serviceaccount.yaml │ └── tests │ │ └── test-connection.yaml │ └── values.yaml ├── 29-Helm-Dependency-Condition-Alias ├── README.md └── parentchart │ ├── .helmignore │ ├── Chart.lock │ ├── Chart.yaml │ ├── charts │ ├── mychart2-0.4.0.tgz │ └── mychart4-0.1.0.tgz │ ├── templates │ ├── NOTES.txt │ ├── _helpers.tpl │ ├── deployment.yaml │ ├── hpa.yaml │ ├── ingress.yaml │ ├── service.yaml │ ├── serviceaccount.yaml │ └── tests │ │ └── test-connection.yaml │ └── values.yaml ├── 30-Helm-Dependency-Tags ├── README.md └── parentchart │ ├── .helmignore │ ├── Chart.lock │ ├── Chart.yaml │ ├── charts │ ├── mychart2-0.4.0.tgz │ └── mychart4-0.1.0.tgz │ ├── templates │ ├── NOTES.txt │ ├── _helpers.tpl │ ├── deployment.yaml │ ├── hpa.yaml │ ├── ingress.yaml │ ├── service.yaml │ ├── serviceaccount.yaml │ └── tests │ │ └── test-connection.yaml │ └── values.yaml ├── 31-Helm-Dependency-Override-Subchart-Values ├── README.md └── parentchart │ ├── .helmignore │ ├── Chart.lock │ ├── Chart.yaml │ ├── charts │ ├── mychart2-0.4.0.tgz │ └── mychart4-0.1.0.tgz │ ├── templates │ ├── NOTES.txt │ ├── _helpers.tpl │ ├── deployment.yaml │ ├── hpa.yaml │ ├── ingress.yaml │ ├── service.yaml │ ├── serviceaccount.yaml │ └── tests │ │ └── test-connection.yaml │ └── values.yaml ├── 32-Helm-SubChart-Global-Values ├── README.md └── parentchart │ ├── .helmignore │ ├── Chart.lock │ ├── Chart.yaml │ ├── charts │ ├── mychart2 │ │ ├── .helmignore │ │ ├── Chart.yaml │ │ ├── README.md │ │ ├── templates │ │ │ ├── NOTES.txt │ │ │ ├── _helpers.tpl │ │ │ ├── deployment.yaml │ │ │ ├── service.yaml │ │ │ └── tests │ │ │ │ └── test-connection.yaml │ │ └── values.yaml │ └── mychart4 │ │ ├── .helmignore │ │ ├── Chart.yaml │ │ ├── README.md │ │ ├── templates │ │ ├── NOTES.txt │ │ ├── _helpers.tpl │ │ ├── deployment.yaml │ │ ├── service.yaml │ │ └── tests │ │ │ └── test-connection.yaml │ │ └── values.yaml │ ├── templates │ ├── NOTES.txt │ ├── _helpers.tpl │ ├── deployment.yaml │ ├── hpa.yaml │ ├── ingress.yaml │ ├── service.yaml │ ├── serviceaccount.yaml │ └── tests │ │ └── test-connection.yaml │ └── values.yaml ├── 33-Helm-Dependency-Import-Values-Explicit ├── README.md └── parentchart │ ├── .helmignore │ ├── Chart.lock │ ├── Chart.yaml │ ├── charts │ ├── mychart1 │ │ ├── .helmignore │ │ ├── Chart.yaml │ │ ├── README.md │ │ ├── templates │ │ │ ├── NOTES.txt │ │ │ ├── _helpers.tpl │ │ │ ├── deployment.yaml │ │ │ ├── service.yaml │ │ │ └── tests │ │ │ │ └── test-connection.yaml │ │ └── values.yaml │ └── mychart2 │ │ ├── .helmignore │ │ ├── Chart.yaml │ │ ├── README.md │ │ ├── templates │ │ ├── NOTES.txt │ │ ├── _helpers.tpl │ │ ├── deployment.yaml │ │ ├── service.yaml │ │ └── tests │ │ │ └── test-connection.yaml │ │ └── values.yaml │ ├── templates │ ├── NOTES.txt │ ├── _helpers.tpl │ ├── configmap.yaml │ ├── deployment.yaml │ ├── hpa.yaml │ ├── ingress.yaml │ ├── service.yaml │ ├── serviceaccount.yaml │ └── tests │ │ └── test-connection.yaml │ └── values.yaml ├── 34-Helm-Dependency-Import-Values-Implicit ├── README.md └── parentchart │ ├── .helmignore │ ├── Chart.lock │ ├── Chart.yaml │ ├── charts │ ├── mychart1-0.1.0.tgz │ ├── mychart1 │ │ ├── .helmignore │ │ ├── Chart.yaml │ │ ├── README.md │ │ ├── templates │ │ │ ├── NOTES.txt │ │ │ ├── _helpers.tpl │ │ │ ├── deployment.yaml │ │ │ ├── service.yaml │ │ │ └── tests │ │ │ │ └── test-connection.yaml │ │ └── values.yaml │ ├── mychart2-0.4.0.tgz │ └── mychart2 │ │ ├── .helmignore │ │ ├── Chart.yaml │ │ ├── README.md │ │ ├── templates │ │ ├── NOTES.txt │ │ ├── _helpers.tpl │ │ ├── deployment.yaml │ │ ├── service.yaml │ │ └── tests │ │ │ └── test-connection.yaml │ │ └── values.yaml │ ├── templates │ ├── NOTES.txt │ ├── _helpers.tpl │ ├── configmap.yaml │ ├── deployment.yaml │ ├── hpa.yaml │ ├── ingress.yaml │ ├── service.yaml │ ├── serviceaccount.yaml │ └── tests │ │ └── test-connection.yaml │ └── values.yaml ├── 35-Helm-Starters ├── MYCHARTS │ └── mychart9 │ │ ├── .helmignore │ │ ├── Chart.yaml │ │ ├── charts │ │ └── mychart4-0.1.0.tgz │ │ ├── templates │ │ ├── NOTES.txt │ │ ├── _helpers.tpl │ │ ├── deployment.yaml │ │ └── service.yaml │ │ └── values.yaml ├── README.md └── mystarterchart │ ├── .helmignore │ ├── Chart.yaml │ ├── charts │ └── mychart4 │ │ ├── .helmignore │ │ ├── Chart.yaml │ │ ├── README.md │ │ ├── templates │ │ ├── NOTES.txt │ │ ├── _helpers.tpl │ │ ├── deployment.yaml │ │ ├── service.yaml │ │ └── tests │ │ │ └── test-connection.yaml │ │ └── values.yaml │ ├── templates │ ├── NOTES.txt │ ├── _helpers.tpl │ ├── deployment.yaml │ └── service.yaml │ └── values.yaml ├── 36-Helm-Plugins └── README.md ├── 37-Helm-Plugins-Build ├── README.md ├── myplugin1 │ └── plugin.yaml ├── myplugin2 │ └── plugin.yaml └── myplugin3 │ ├── app.sh │ └── plugin.yaml ├── 38-Helm-Hooks ├── README.md └── hooksdemo1 │ ├── .helmignore │ ├── Chart.yaml │ ├── templates │ ├── NOTES.txt │ ├── _helpers.tpl │ ├── deployment.yaml │ ├── postdelete-hookpod.yaml │ ├── preinstall-hookpod.yaml │ ├── preupgrade-hookpod.yaml │ └── service.yaml │ └── values.yaml ├── 39-Helm-Hooks-Delete-Policy ├── README.md └── hooksdemo1 │ ├── .helmignore │ ├── Chart.yaml │ ├── templates │ ├── NOTES.txt │ ├── _helpers.tpl │ ├── deployment.yaml │ ├── postdelete-hookpod.yaml │ ├── preinstall-hookpod.yaml │ ├── preupgrade-hookpod.yaml │ └── service.yaml │ └── values.yaml ├── 40-Helm-Hook-Weights ├── README.md └── hooksdemo1 │ ├── .helmignore │ ├── Chart.yaml │ ├── templates │ ├── NOTES.txt │ ├── _helpers.tpl │ ├── deployment.yaml │ ├── preinstall-hookpod1.yaml │ ├── preinstall-hookpod2.yaml │ ├── preinstall-hookpod3.yaml │ └── service.yaml │ └── values.yaml ├── 41-Helm-Tests ├── README.md └── mydemoapp │ ├── .helmignore │ ├── Chart.yaml │ ├── templates │ ├── NOTES.txt │ ├── _helpers.tpl │ ├── deployment.yaml │ ├── hpa.yaml │ ├── ingress.yaml │ ├── service.yaml │ ├── serviceaccount.yaml │ └── tests │ │ └── test-connection.yaml │ └── values.yaml ├── 42-Helm-Resource-Policy ├── README.md └── respolicytest │ ├── .helmignore │ ├── Chart.yaml │ ├── templates │ ├── NOTES.txt │ ├── _helpers.tpl │ ├── deployment.yaml │ ├── hpa.yaml │ ├── ingress.yaml │ ├── service.yaml │ ├── serviceaccount.yaml │ └── tests │ │ └── test-connection.yaml │ └── values.yaml ├── 43-Helm-Sign-and-Verify-Charts ├── README.md └── myhelmcharts │ ├── myfirstchart-0.1.0.tgz │ ├── myfirstchart-0.1.0.tgz.prov │ ├── myfirstchart │ ├── .helmignore │ ├── Chart.yaml │ ├── templates │ │ ├── NOTES.txt │ │ ├── _helpers.tpl │ │ ├── deployment.yaml │ │ └── service.yaml │ └── values.yaml │ ├── private-key │ └── helmsigndemo1-secring-privatekey.gpg │ └── public-key │ ├── dummy-publickey.gpg │ └── helmsigndemo1-publickey.gpg ├── 44-Helm-Repo-on-GitHub ├── README.md └── gitrepo-content │ ├── .github │ └── workflows │ │ └── release.yml │ └── charts │ └── myfirstchart │ ├── .helmignore │ ├── Chart.yaml │ ├── templates │ ├── NOTES.txt │ ├── _helpers.tpl │ ├── deployment.yaml │ └── service.yaml │ └── values.yaml ├── 45-Integrate-with-ArtifactHub ├── README.md └── artifacthub-repo.yml ├── 46-Helm-Values-Validate-with-JSON-Schema ├── README.md └── helmbasics │ ├── .helmignore │ ├── Chart.yaml │ ├── templates │ ├── NOTES.txt │ └── deployment.yaml │ ├── values.schema.json │ └── values.yaml ├── 47-Helm-Use-OCI-based-Registries ├── README.md ├── backupfiles │ └── myocidemo │ │ ├── .helmignore │ │ ├── Chart.yaml │ │ ├── templates │ │ ├── NOTES.txt │ │ ├── _helpers.tpl │ │ ├── deployment.yaml │ │ ├── hpa.yaml │ │ ├── ingress.yaml │ │ ├── service.yaml │ │ ├── serviceaccount.yaml │ │ └── tests │ │ │ └── test-connection.yaml │ │ └── values.yaml ├── migrate │ ├── myfirstchart-0.1.0.tgz │ └── myfirstchart-0.2.0.tgz ├── myocidemo-0.1.0.tgz ├── myocidemo-0.2.0.tgz ├── myocidemo │ ├── .helmignore │ ├── Chart.yaml │ ├── templates │ │ ├── NOTES.txt │ │ ├── _helpers.tpl │ │ ├── deployment.yaml │ │ ├── hpa.yaml │ │ ├── ingress.yaml │ │ ├── service.yaml │ │ ├── serviceaccount.yaml │ │ └── tests │ │ │ └── test-connection.yaml │ └── values.yaml └── mypackages │ ├── myocidemo-0.1.0.tgz │ └── myocidemo-0.2.0.tgz ├── README.md ├── course-presentation ├── .DS_Store └── Helm-Masterclass-v3.pptx ├── git-deploy.sh └── images ├── helm-highest-rated.png └── helm-masterclass.png /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stacksimplify/helm-masterclass/2c76ce8db38dc5c901b4c1901707987c1e0413c1/.DS_Store -------------------------------------------------------------------------------- /01-Install-Docker-Desktop-and-HelmCLI/kube-manifests/deployment.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: apps/v1 2 | kind: Deployment 3 | metadata: #Dictionary 4 | name: myapp1-deployment 5 | spec: # Dictionary 6 | replicas: 2 7 | selector: 8 | matchLabels: 9 | app: myapp1 10 | template: 11 | metadata: # Dictionary 12 | name: myapp1-pod 13 | labels: # Dictionary 14 | app: myapp1 # Key value pairs 15 | spec: 16 | containers: # List 17 | - name: myapp1-container 18 | image: ghcr.io/stacksimplify/kubenginxhelm:0.1.0 19 | ports: 20 | - containerPort: 80 21 | -------------------------------------------------------------------------------- /01-Install-Docker-Desktop-and-HelmCLI/kube-manifests/service.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: myapp1-nodeport-service 5 | spec: 6 | type: NodePort # ClusterIp, # NodePort 7 | selector: 8 | app: myapp1 9 | ports: 10 | - name: http 11 | port: 80 # Service Port 12 | targetPort: 80 # Container Port 13 | nodePort: 31300 # Node Port -------------------------------------------------------------------------------- /06-Helm-Install-Generated-Name/README.md: -------------------------------------------------------------------------------- 1 | # Helm Install with Generate Name Flag 2 | 3 | ## Step-01: Introduction 4 | - `--generate-name` flag for `helm install` is very very important option 5 | - This is one of the good to know option from `helm install` perspective 6 | - When we are implementing DevOps Pipelines, if we want to generate the names of our releases without throwing duplicate release errors we can use this setting. 7 | 8 | ## Step-02: Install helm with --generate-name flag 9 | ```t 10 | # Install helm with --generate-name flag 11 | helm install --generate-name 12 | helm install stacksimplify/mychart1 --generate-name 13 | 14 | # List Helm Releases 15 | helm list 16 | helm list --output=yaml 17 | Observation: 18 | We can see the name as "name: mychart1-1689683948" some auto-generated number 19 | 20 | # Helm Status 21 | helm status mychart1-1689683948 22 | helm status mychart1-1689683948 --show-resources 23 | 24 | # Access Application 25 | http://localhost:31231 26 | ``` 27 | ## Step-03: Uninstall Helm Release 28 | ```t 29 | # Uninstall Helm Release 30 | helm uninstall 31 | helm uninstall mychart1-1689683948 32 | ``` 33 | 34 | -------------------------------------------------------------------------------- /09-Helm-Override-Values/myvalues.yaml: -------------------------------------------------------------------------------- 1 | # Change-1: change replicas from 1 to 2 2 | replicaCount: 2 3 | 4 | # Change-2: Add tag as "2.0.0" which will override the default appversion "1.0.0" from our mychart1 5 | image: 6 | repository: ghcr.io/stacksimplify/kubenginx 7 | pullPolicy: IfNotPresent 8 | # Overrides the image tag whose default is the chart appVersion. 9 | tag: "2.0.0" 10 | 11 | # Change-3: Change nodePort from 31240 to 31250 12 | service: 13 | type: NodePort 14 | port: 80 15 | nodePort: 31250 -------------------------------------------------------------------------------- /10-Helm-Chart-Structure/README.md: -------------------------------------------------------------------------------- 1 | # Understand Helm Chart Folder Structure 2 | 3 | ## Step-01: Introduction 4 | - Understand Helm Chart Folder Structure 5 | 6 | ## Step-02: Helm Create Chart 7 | ```t 8 | # Helm Create Chart 9 | helm create 10 | helm create basechart 11 | Observation: 12 | 1. It will create a Helm Chart template 13 | 2. We can call it like a helm chart created from a default starter chart 14 | ``` 15 | 16 | ## Step-03: Helm Chart Structure 17 | ``` 18 | └── basechart 19 | ├── .helmignore 20 | ├── Chart.yaml 21 | ├── LICENSE 22 | ├── README.md 23 | ├── charts 24 | ├── templates 25 | │   ├── NOTES.txt 26 | │   ├── _helpers.tpl 27 | │   ├── deployment.yaml 28 | │   ├── hpa.yaml 29 | │   ├── ingress.yaml 30 | │   ├── service.yaml 31 | │   ├── serviceaccount.yaml 32 | │   └── tests 33 | │   └── test-connection.yaml 34 | └── values.yaml 35 | ``` 36 | 37 | -------------------------------------------------------------------------------- /10-Helm-Chart-Structure/basechart/.helmignore: -------------------------------------------------------------------------------- 1 | # Patterns to ignore when building packages. 2 | # This supports shell glob matching, relative path matching, and 3 | # negation (prefixed with !). Only one pattern per line. 4 | .DS_Store 5 | # Common VCS dirs 6 | .git/ 7 | .gitignore 8 | .bzr/ 9 | .bzrignore 10 | .hg/ 11 | .hgignore 12 | .svn/ 13 | # Common backup files 14 | *.swp 15 | *.bak 16 | *.tmp 17 | *.orig 18 | *~ 19 | # Various IDEs 20 | .project 21 | .idea/ 22 | *.tmproj 23 | .vscode/ 24 | -------------------------------------------------------------------------------- /10-Helm-Chart-Structure/basechart/Chart.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v2 2 | name: basechart 3 | description: A Helm chart for Kubernetes 4 | 5 | # A chart can be either an 'application' or a 'library' chart. 6 | # 7 | # Application charts are a collection of templates that can be packaged into versioned archives 8 | # to be deployed. 9 | # 10 | # Library charts provide useful utilities or functions for the chart developer. They're included as 11 | # a dependency of application charts to inject those utilities and functions into the rendering 12 | # pipeline. Library charts do not define any templates and therefore cannot be deployed. 13 | type: application 14 | 15 | # This is the chart version. This version number should be incremented each time you make changes 16 | # to the chart and its templates, including the app version. 17 | # Versions are expected to follow Semantic Versioning (https://semver.org/) 18 | version: 0.1.0 19 | 20 | # This is the version number of the application being deployed. This version number should be 21 | # incremented each time you make changes to the application. Versions are not expected to 22 | # follow Semantic Versioning. They should reflect the version the application is using. 23 | # It is recommended to use it with quotes. 24 | appVersion: "1.16.0" 25 | -------------------------------------------------------------------------------- /10-Helm-Chart-Structure/basechart/templates/hpa.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.autoscaling.enabled }} 2 | apiVersion: autoscaling/v2 3 | kind: HorizontalPodAutoscaler 4 | metadata: 5 | name: {{ include "basechart.fullname" . }} 6 | labels: 7 | {{- include "basechart.labels" . | nindent 4 }} 8 | spec: 9 | scaleTargetRef: 10 | apiVersion: apps/v1 11 | kind: Deployment 12 | name: {{ include "basechart.fullname" . }} 13 | minReplicas: {{ .Values.autoscaling.minReplicas }} 14 | maxReplicas: {{ .Values.autoscaling.maxReplicas }} 15 | metrics: 16 | {{- if .Values.autoscaling.targetCPUUtilizationPercentage }} 17 | - type: Resource 18 | resource: 19 | name: cpu 20 | target: 21 | type: Utilization 22 | averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} 23 | {{- end }} 24 | {{- if .Values.autoscaling.targetMemoryUtilizationPercentage }} 25 | - type: Resource 26 | resource: 27 | name: memory 28 | target: 29 | type: Utilization 30 | averageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }} 31 | {{- end }} 32 | {{- end }} 33 | -------------------------------------------------------------------------------- /10-Helm-Chart-Structure/basechart/templates/service.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: {{ include "basechart.fullname" . }} 5 | labels: 6 | {{- include "basechart.labels" . | nindent 4 }} 7 | spec: 8 | type: {{ .Values.service.type }} 9 | ports: 10 | - port: {{ .Values.service.port }} 11 | targetPort: http 12 | protocol: TCP 13 | name: http 14 | selector: 15 | {{- include "basechart.selectorLabels" . | nindent 4 }} 16 | -------------------------------------------------------------------------------- /10-Helm-Chart-Structure/basechart/templates/serviceaccount.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.serviceAccount.create -}} 2 | apiVersion: v1 3 | kind: ServiceAccount 4 | metadata: 5 | name: {{ include "basechart.serviceAccountName" . }} 6 | labels: 7 | {{- include "basechart.labels" . | nindent 4 }} 8 | {{- with .Values.serviceAccount.annotations }} 9 | annotations: 10 | {{- toYaml . | nindent 4 }} 11 | {{- end }} 12 | {{- end }} 13 | -------------------------------------------------------------------------------- /10-Helm-Chart-Structure/basechart/templates/tests/test-connection.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Pod 3 | metadata: 4 | name: "{{ include "basechart.fullname" . }}-test-connection" 5 | labels: 6 | {{- include "basechart.labels" . | nindent 4 }} 7 | annotations: 8 | "helm.sh/hook": test 9 | spec: 10 | containers: 11 | - name: wget 12 | image: busybox 13 | command: ['wget'] 14 | args: ['{{ include "basechart.fullname" . }}:{{ .Values.service.port }}'] 15 | restartPolicy: Never 16 | -------------------------------------------------------------------------------- /11-Helm-Dev-BuiltIn-Objects/builtinobjects/.helmignore: -------------------------------------------------------------------------------- 1 | # Patterns to ignore when building packages. 2 | # This supports shell glob matching, relative path matching, and 3 | # negation (prefixed with !). Only one pattern per line. 4 | .DS_Store 5 | # Common VCS dirs 6 | .git/ 7 | .gitignore 8 | .bzr/ 9 | .bzrignore 10 | .hg/ 11 | .hgignore 12 | .svn/ 13 | # Common backup files 14 | *.swp 15 | *.bak 16 | *.tmp 17 | *.orig 18 | *~ 19 | # Various IDEs 20 | .project 21 | .idea/ 22 | *.tmproj 23 | .vscode/ 24 | -------------------------------------------------------------------------------- /11-Helm-Dev-BuiltIn-Objects/builtinobjects/Chart.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v2 2 | name: builtinobjects 3 | description: A Helm chart for Kubernetes 4 | 5 | # A chart can be either an 'application' or a 'library' chart. 6 | # 7 | # Application charts are a collection of templates that can be packaged into versioned archives 8 | # to be deployed. 9 | # 10 | # Library charts provide useful utilities or functions for the chart developer. They're included as 11 | # a dependency of application charts to inject those utilities and functions into the rendering 12 | # pipeline. Library charts do not define any templates and therefore cannot be deployed. 13 | type: application 14 | 15 | # This is the chart version. This version number should be incremented each time you make changes 16 | # to the chart and its templates, including the app version. 17 | # Versions are expected to follow Semantic Versioning (https://semver.org/) 18 | version: 0.1.0 19 | 20 | # This is the version number of the application being deployed. This version number should be 21 | # incremented each time you make changes to the application. Versions are not expected to 22 | # follow Semantic Versioning. They should reflect the version the application is using. 23 | # It is recommended to use it with quotes. 24 | appVersion: "1.16.0" 25 | -------------------------------------------------------------------------------- /11-Helm-Dev-BuiltIn-Objects/builtinobjects/config-files/myconfig2.toml: -------------------------------------------------------------------------------- 1 | appName: myapp2 2 | appType: db 3 | appConfigEnable: true -------------------------------------------------------------------------------- /11-Helm-Dev-BuiltIn-Objects/builtinobjects/config-files/myconfig3.toml: -------------------------------------------------------------------------------- 1 | appName: myapp3 2 | appType: app 3 | appConfigEnable: false -------------------------------------------------------------------------------- /11-Helm-Dev-BuiltIn-Objects/builtinobjects/myconfig1.toml: -------------------------------------------------------------------------------- 1 | message1 = Hello from config 1 line1 2 | message2 = Hello from config 1 line2 3 | message3 = Hello from config 1 line3 4 | -------------------------------------------------------------------------------- /11-Helm-Dev-BuiltIn-Objects/builtinobjects/templates/hpa.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.autoscaling.enabled }} 2 | apiVersion: autoscaling/v2 3 | kind: HorizontalPodAutoscaler 4 | metadata: 5 | name: {{ include "builtinobjects.fullname" . }} 6 | labels: 7 | {{- include "builtinobjects.labels" . | nindent 4 }} 8 | spec: 9 | scaleTargetRef: 10 | apiVersion: apps/v1 11 | kind: Deployment 12 | name: {{ include "builtinobjects.fullname" . }} 13 | minReplicas: {{ .Values.autoscaling.minReplicas }} 14 | maxReplicas: {{ .Values.autoscaling.maxReplicas }} 15 | metrics: 16 | {{- if .Values.autoscaling.targetCPUUtilizationPercentage }} 17 | - type: Resource 18 | resource: 19 | name: cpu 20 | target: 21 | type: Utilization 22 | averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} 23 | {{- end }} 24 | {{- if .Values.autoscaling.targetMemoryUtilizationPercentage }} 25 | - type: Resource 26 | resource: 27 | name: memory 28 | target: 29 | type: Utilization 30 | averageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }} 31 | {{- end }} 32 | {{- end }} 33 | -------------------------------------------------------------------------------- /11-Helm-Dev-BuiltIn-Objects/builtinobjects/templates/service.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: {{ include "builtinobjects.fullname" . }} 5 | labels: 6 | {{- include "builtinobjects.labels" . | nindent 4 }} 7 | spec: 8 | type: {{ .Values.service.type }} 9 | ports: 10 | - port: {{ .Values.service.port }} 11 | targetPort: http 12 | protocol: TCP 13 | name: http 14 | selector: 15 | {{- include "builtinobjects.selectorLabels" . | nindent 4 }} 16 | -------------------------------------------------------------------------------- /11-Helm-Dev-BuiltIn-Objects/builtinobjects/templates/serviceaccount.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.serviceAccount.create -}} 2 | apiVersion: v1 3 | kind: ServiceAccount 4 | metadata: 5 | name: {{ include "builtinobjects.serviceAccountName" . }} 6 | labels: 7 | {{- include "builtinobjects.labels" . | nindent 4 }} 8 | {{- with .Values.serviceAccount.annotations }} 9 | annotations: 10 | {{- toYaml . | nindent 4 }} 11 | {{- end }} 12 | {{- end }} 13 | -------------------------------------------------------------------------------- /11-Helm-Dev-BuiltIn-Objects/builtinobjects/templates/tests/test-connection.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Pod 3 | metadata: 4 | name: "{{ include "builtinobjects.fullname" . }}-test-connection" 5 | labels: 6 | {{- include "builtinobjects.labels" . | nindent 4 }} 7 | annotations: 8 | "helm.sh/hook": test 9 | spec: 10 | containers: 11 | - name: wget 12 | image: busybox 13 | command: ['wget'] 14 | args: ['{{ include "builtinobjects.fullname" . }}:{{ .Values.service.port }}'] 15 | restartPolicy: Never 16 | -------------------------------------------------------------------------------- /11-Helm-Dev-BuiltIn-Objects/files-demo/config-files/myconfig2.toml: -------------------------------------------------------------------------------- 1 | appName: myapp2 2 | appType: db 3 | appConfigEnable: true -------------------------------------------------------------------------------- /11-Helm-Dev-BuiltIn-Objects/files-demo/config-files/myconfig3.toml: -------------------------------------------------------------------------------- 1 | appName: myapp3 2 | appType: app 3 | appConfigEnable: false -------------------------------------------------------------------------------- /11-Helm-Dev-BuiltIn-Objects/files-demo/myconfig1.toml: -------------------------------------------------------------------------------- 1 | message1 = Hello from config 1 line1 2 | message2 = Hello from config 1 line2 3 | message3 = Hello from config 1 line3 4 | -------------------------------------------------------------------------------- /12-Helm-Dev-Basics/backup-files/final-deployment-file/Chart.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v2 2 | name: helmbasics 3 | description: A Helm chart for learning Helm Basics 4 | type: application 5 | version: 0.1.0 6 | appVersion: "0.1.0" 7 | -------------------------------------------------------------------------------- /12-Helm-Dev-Basics/backup-files/final-deployment-file/values.yaml: -------------------------------------------------------------------------------- 1 | #replicaCount: 2 | 3 | #releaseName: MYAPP100 4 | releaseName: "" 5 | 6 | # Resources for testing Template Function: toYaml 7 | resources: 8 | limits: 9 | cpu: 100m 10 | memory: 128Mi 11 | requests: 12 | cpu: 100m 13 | memory: 128Mi -------------------------------------------------------------------------------- /12-Helm-Dev-Basics/backup-files/helmbasics/.helmignore: -------------------------------------------------------------------------------- 1 | # Patterns to ignore when building packages. 2 | # This supports shell glob matching, relative path matching, and 3 | # negation (prefixed with !). Only one pattern per line. 4 | .DS_Store 5 | # Common VCS dirs 6 | .git/ 7 | .gitignore 8 | .bzr/ 9 | .bzrignore 10 | .hg/ 11 | .hgignore 12 | .svn/ 13 | # Common backup files 14 | *.swp 15 | *.bak 16 | *.tmp 17 | *.orig 18 | *~ 19 | # Various IDEs 20 | .project 21 | .idea/ 22 | *.tmproj 23 | .vscode/ 24 | -------------------------------------------------------------------------------- /12-Helm-Dev-Basics/backup-files/helmbasics/Chart.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v2 2 | name: helmbasics 3 | description: A Helm chart for learning Helm Basics 4 | type: application 5 | version: 0.1.0 6 | appVersion: "0.1.0" 7 | -------------------------------------------------------------------------------- /12-Helm-Dev-Basics/backup-files/helmbasics/templates/NOTES.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stacksimplify/helm-masterclass/2c76ce8db38dc5c901b4c1901707987c1e0413c1/12-Helm-Dev-Basics/backup-files/helmbasics/templates/NOTES.txt -------------------------------------------------------------------------------- /12-Helm-Dev-Basics/backup-files/helmbasics/templates/deployment.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: apps/v1 2 | kind: Deployment 3 | metadata: 4 | name: {{ .Release.Name }}-{{ .Chart.Name }} 5 | labels: 6 | app: nginx 7 | spec: 8 | replicas: 3 9 | selector: 10 | matchLabels: 11 | app: nginx 12 | template: 13 | metadata: 14 | labels: 15 | app: nginx 16 | spec: 17 | containers: 18 | - name: nginx 19 | image: ghcr.io/stacksimplify/kubenginx:4.0.0 20 | ports: 21 | - containerPort: 80 -------------------------------------------------------------------------------- /12-Helm-Dev-Basics/backup-files/helmbasics/values.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stacksimplify/helm-masterclass/2c76ce8db38dc5c901b4c1901707987c1e0413c1/12-Helm-Dev-Basics/backup-files/helmbasics/values.yaml -------------------------------------------------------------------------------- /12-Helm-Dev-Basics/deployment-file/deployment.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: apps/v1 2 | kind: Deployment 3 | metadata: 4 | name: nginx-deployment 5 | labels: 6 | app: nginx 7 | spec: 8 | replicas: 3 9 | selector: 10 | matchLabels: 11 | app: nginx 12 | template: 13 | metadata: 14 | labels: 15 | app: nginx 16 | spec: 17 | containers: 18 | - name: nginx 19 | image: ghcr.io/stacksimplify/kubenginx:4.0.0 20 | ports: 21 | - containerPort: 80 -------------------------------------------------------------------------------- /12-Helm-Dev-Basics/helmbasics/.helmignore: -------------------------------------------------------------------------------- 1 | # Patterns to ignore when building packages. 2 | # This supports shell glob matching, relative path matching, and 3 | # negation (prefixed with !). Only one pattern per line. 4 | .DS_Store 5 | # Common VCS dirs 6 | .git/ 7 | .gitignore 8 | .bzr/ 9 | .bzrignore 10 | .hg/ 11 | .hgignore 12 | .svn/ 13 | # Common backup files 14 | *.swp 15 | *.bak 16 | *.tmp 17 | *.orig 18 | *~ 19 | # Various IDEs 20 | .project 21 | .idea/ 22 | *.tmproj 23 | .vscode/ 24 | -------------------------------------------------------------------------------- /12-Helm-Dev-Basics/helmbasics/Chart.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v2 2 | name: helmbasics 3 | description: A Helm chart for learning Helm Basics 4 | type: application 5 | version: 0.1.0 6 | appVersion: "0.1.0" 7 | -------------------------------------------------------------------------------- /12-Helm-Dev-Basics/helmbasics/templates/NOTES.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stacksimplify/helm-masterclass/2c76ce8db38dc5c901b4c1901707987c1e0413c1/12-Helm-Dev-Basics/helmbasics/templates/NOTES.txt -------------------------------------------------------------------------------- /12-Helm-Dev-Basics/helmbasics/values.yaml: -------------------------------------------------------------------------------- 1 | releaseName: "kalyan" 2 | replicaCount: 0 3 | 4 | # Resources for testing Template Function: toYaml 5 | resources: 6 | limits: 7 | cpu: 100m 8 | memory: 128Mi 9 | requests: 10 | cpu: 100m 11 | memory: 128Mi -------------------------------------------------------------------------------- /13-Helm-Dev-If-Else-EQ/backupfiles/deployment.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: apps/v1 2 | kind: Deployment 3 | metadata: 4 | name: {{ .Release.Name }}-{{ .Chart.Name }} 5 | labels: 6 | app: nginx 7 | spec: 8 | {{- if eq .Values.myapp.env "prod" }} 9 | replicas: 4 10 | {{- else if eq .Values.myapp.env "qa" }} 11 | replicas: 2 12 | {{- else }} 13 | replicas: 1 14 | {{- end }} 15 | selector: 16 | matchLabels: 17 | app: nginx 18 | template: 19 | metadata: 20 | labels: 21 | app: nginx 22 | spec: 23 | containers: 24 | - name: nginx 25 | image: ghcr.io/stacksimplify/kubenginx:4.0.0 26 | ports: 27 | - containerPort: 80 -------------------------------------------------------------------------------- /13-Helm-Dev-If-Else-EQ/helmbasics/.helmignore: -------------------------------------------------------------------------------- 1 | # Patterns to ignore when building packages. 2 | # This supports shell glob matching, relative path matching, and 3 | # negation (prefixed with !). Only one pattern per line. 4 | .DS_Store 5 | # Common VCS dirs 6 | .git/ 7 | .gitignore 8 | .bzr/ 9 | .bzrignore 10 | .hg/ 11 | .hgignore 12 | .svn/ 13 | # Common backup files 14 | *.swp 15 | *.bak 16 | *.tmp 17 | *.orig 18 | *~ 19 | # Various IDEs 20 | .project 21 | .idea/ 22 | *.tmproj 23 | .vscode/ 24 | -------------------------------------------------------------------------------- /13-Helm-Dev-If-Else-EQ/helmbasics/Chart.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v2 2 | name: helmbasics 3 | description: A Helm chart for learning Helm Basics 4 | type: application 5 | version: 0.1.0 6 | appVersion: "0.1.0" 7 | -------------------------------------------------------------------------------- /13-Helm-Dev-If-Else-EQ/helmbasics/templates/NOTES.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stacksimplify/helm-masterclass/2c76ce8db38dc5c901b4c1901707987c1e0413c1/13-Helm-Dev-If-Else-EQ/helmbasics/templates/NOTES.txt -------------------------------------------------------------------------------- /13-Helm-Dev-If-Else-EQ/helmbasics/templates/deployment.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: apps/v1 2 | kind: Deployment 3 | metadata: 4 | name: {{ .Release.Name }}-{{ .Chart.Name }} 5 | labels: 6 | app: nginx 7 | spec: 8 | {{- if eq .Values.myapp.env "prod" }} 9 | replicas: 4 10 | {{- else if eq .Values.myapp.env "qa" }} 11 | replicas: 2 12 | {{- else }} 13 | replicas: 1 14 | {{- end }} 15 | selector: 16 | matchLabels: 17 | app: nginx 18 | template: 19 | metadata: 20 | labels: 21 | app: nginx 22 | spec: 23 | containers: 24 | - name: nginx 25 | image: ghcr.io/stacksimplify/kubenginx:4.0.0 26 | ports: 27 | - containerPort: 80 -------------------------------------------------------------------------------- /13-Helm-Dev-If-Else-EQ/helmbasics/values.yaml: -------------------------------------------------------------------------------- 1 | # If, else if, else 2 | myapp: 3 | env: prod -------------------------------------------------------------------------------- /14-Helm-Dev-If-Else-AND-BOOLEAN/backupfiles/deployment.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: apps/v1 2 | kind: Deployment 3 | metadata: 4 | name: {{ .Release.Name }}-{{ .Chart.Name }} 5 | labels: 6 | app: nginx 7 | spec: 8 | {{- if and .Values.myapp.retail.enableFeature (eq .Values.myapp.env "prod") }} 9 | replicas: 6 10 | {{- else if eq .Values.myapp.env "prod" }} 11 | replicas: 4 12 | {{- else if eq .Values.myapp.env "qa" }} 13 | replicas: 2 14 | {{- else }} 15 | replicas: 1 16 | {{- end }} 17 | selector: 18 | matchLabels: 19 | app: nginx 20 | template: 21 | metadata: 22 | labels: 23 | app: nginx 24 | spec: 25 | containers: 26 | - name: nginx 27 | image: ghcr.io/stacksimplify/kubenginx:4.0.0 28 | ports: 29 | - containerPort: 80 -------------------------------------------------------------------------------- /14-Helm-Dev-If-Else-AND-BOOLEAN/helmbasics/.helmignore: -------------------------------------------------------------------------------- 1 | # Patterns to ignore when building packages. 2 | # This supports shell glob matching, relative path matching, and 3 | # negation (prefixed with !). Only one pattern per line. 4 | .DS_Store 5 | # Common VCS dirs 6 | .git/ 7 | .gitignore 8 | .bzr/ 9 | .bzrignore 10 | .hg/ 11 | .hgignore 12 | .svn/ 13 | # Common backup files 14 | *.swp 15 | *.bak 16 | *.tmp 17 | *.orig 18 | *~ 19 | # Various IDEs 20 | .project 21 | .idea/ 22 | *.tmproj 23 | .vscode/ 24 | -------------------------------------------------------------------------------- /14-Helm-Dev-If-Else-AND-BOOLEAN/helmbasics/Chart.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v2 2 | name: helmbasics 3 | description: A Helm chart for learning Helm Basics 4 | type: application 5 | version: 0.1.0 6 | appVersion: "0.1.0" 7 | -------------------------------------------------------------------------------- /14-Helm-Dev-If-Else-AND-BOOLEAN/helmbasics/templates/NOTES.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stacksimplify/helm-masterclass/2c76ce8db38dc5c901b4c1901707987c1e0413c1/14-Helm-Dev-If-Else-AND-BOOLEAN/helmbasics/templates/NOTES.txt -------------------------------------------------------------------------------- /14-Helm-Dev-If-Else-AND-BOOLEAN/helmbasics/templates/deployment.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: apps/v1 2 | kind: Deployment 3 | metadata: 4 | name: {{ .Release.Name }}-{{ .Chart.Name }} 5 | labels: 6 | app: nginx 7 | spec: 8 | {{- if and .Values.myapp.retail.enableFeature (eq .Values.myapp.env "prod") }} 9 | replicas: 6 10 | {{- else if eq .Values.myapp.env "prod" }} 11 | replicas: 4 12 | {{- else if eq .Values.myapp.env "qa" }} 13 | replicas: 2 14 | {{- else }} 15 | replicas: 1 16 | {{- end }} 17 | selector: 18 | matchLabels: 19 | app: nginx 20 | template: 21 | metadata: 22 | labels: 23 | app: nginx 24 | spec: 25 | containers: 26 | - name: nginx 27 | image: ghcr.io/stacksimplify/kubenginx:4.0.0 28 | ports: 29 | - containerPort: 80 -------------------------------------------------------------------------------- /14-Helm-Dev-If-Else-AND-BOOLEAN/helmbasics/values.yaml: -------------------------------------------------------------------------------- 1 | # If, else if, else 2 | myapp: 3 | env: prod 4 | retail: 5 | enableFeature: true 6 | 7 | -------------------------------------------------------------------------------- /15-Helm-Dev-If-Else-OR/backupfiles/deployment.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: apps/v1 2 | kind: Deployment 3 | metadata: 4 | name: {{ .Release.Name }}-{{ .Chart.Name }} 5 | labels: 6 | app: nginx 7 | spec: 8 | {{- if or (eq .Values.myapp.env "prod") (eq .Values.myapp.env "uat") }} 9 | replicas: 6 10 | {{- else if eq .Values.myapp.env "qa" }} 11 | replicas: 2 12 | {{- else }} 13 | replicas: 1 14 | {{- end }} 15 | selector: 16 | matchLabels: 17 | app: nginx 18 | template: 19 | metadata: 20 | labels: 21 | app: nginx 22 | spec: 23 | containers: 24 | - name: nginx 25 | image: ghcr.io/stacksimplify/kubenginx:4.0.0 26 | ports: 27 | - containerPort: 80 -------------------------------------------------------------------------------- /15-Helm-Dev-If-Else-OR/helmbasics/.helmignore: -------------------------------------------------------------------------------- 1 | # Patterns to ignore when building packages. 2 | # This supports shell glob matching, relative path matching, and 3 | # negation (prefixed with !). Only one pattern per line. 4 | .DS_Store 5 | # Common VCS dirs 6 | .git/ 7 | .gitignore 8 | .bzr/ 9 | .bzrignore 10 | .hg/ 11 | .hgignore 12 | .svn/ 13 | # Common backup files 14 | *.swp 15 | *.bak 16 | *.tmp 17 | *.orig 18 | *~ 19 | # Various IDEs 20 | .project 21 | .idea/ 22 | *.tmproj 23 | .vscode/ 24 | -------------------------------------------------------------------------------- /15-Helm-Dev-If-Else-OR/helmbasics/Chart.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v2 2 | name: helmbasics 3 | description: A Helm chart for learning Helm Basics 4 | type: application 5 | version: 0.1.0 6 | appVersion: "0.1.0" 7 | -------------------------------------------------------------------------------- /15-Helm-Dev-If-Else-OR/helmbasics/templates/NOTES.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stacksimplify/helm-masterclass/2c76ce8db38dc5c901b4c1901707987c1e0413c1/15-Helm-Dev-If-Else-OR/helmbasics/templates/NOTES.txt -------------------------------------------------------------------------------- /15-Helm-Dev-If-Else-OR/helmbasics/templates/deployment.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: apps/v1 2 | kind: Deployment 3 | metadata: 4 | name: {{ .Release.Name }}-{{ .Chart.Name }} 5 | labels: 6 | app: nginx 7 | spec: 8 | {{- if or (eq .Values.myapp.env "prod") (eq .Values.myapp.env "uat") }} 9 | replicas: 6 10 | {{- else if eq .Values.myapp.env "qa" }} 11 | replicas: 2 12 | {{- else }} 13 | replicas: 1 14 | {{- end }} 15 | selector: 16 | matchLabels: 17 | app: nginx 18 | template: 19 | metadata: 20 | labels: 21 | app: nginx 22 | spec: 23 | containers: 24 | - name: nginx 25 | image: ghcr.io/stacksimplify/kubenginx:4.0.0 26 | ports: 27 | - containerPort: 80 -------------------------------------------------------------------------------- /15-Helm-Dev-If-Else-OR/helmbasics/values.yaml: -------------------------------------------------------------------------------- 1 | # If, else if, else 2 | myapp: 3 | env: prod 4 | 5 | -------------------------------------------------------------------------------- /16-Helm-Dev-If-Else-NOT/backupfiles/deployment.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: apps/v1 2 | kind: Deployment 3 | metadata: 4 | name: {{ .Release.Name }}-{{ .Chart.Name }} 5 | labels: 6 | app: nginx 7 | spec: 8 | {{- if not (eq .Values.myapp.env "prod") }} 9 | replicas: 1 10 | {{- else }} 11 | replicas: 6 12 | {{- end }} 13 | selector: 14 | matchLabels: 15 | app: nginx 16 | template: 17 | metadata: 18 | labels: 19 | app: nginx 20 | spec: 21 | containers: 22 | - name: nginx 23 | image: ghcr.io/stacksimplify/kubenginx:4.0.0 24 | ports: 25 | - containerPort: 80 -------------------------------------------------------------------------------- /16-Helm-Dev-If-Else-NOT/helmbasics/.helmignore: -------------------------------------------------------------------------------- 1 | # Patterns to ignore when building packages. 2 | # This supports shell glob matching, relative path matching, and 3 | # negation (prefixed with !). Only one pattern per line. 4 | .DS_Store 5 | # Common VCS dirs 6 | .git/ 7 | .gitignore 8 | .bzr/ 9 | .bzrignore 10 | .hg/ 11 | .hgignore 12 | .svn/ 13 | # Common backup files 14 | *.swp 15 | *.bak 16 | *.tmp 17 | *.orig 18 | *~ 19 | # Various IDEs 20 | .project 21 | .idea/ 22 | *.tmproj 23 | .vscode/ 24 | -------------------------------------------------------------------------------- /16-Helm-Dev-If-Else-NOT/helmbasics/Chart.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v2 2 | name: helmbasics 3 | description: A Helm chart for learning Helm Basics 4 | type: application 5 | version: 0.1.0 6 | appVersion: "0.1.0" 7 | -------------------------------------------------------------------------------- /16-Helm-Dev-If-Else-NOT/helmbasics/templates/NOTES.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stacksimplify/helm-masterclass/2c76ce8db38dc5c901b4c1901707987c1e0413c1/16-Helm-Dev-If-Else-NOT/helmbasics/templates/NOTES.txt -------------------------------------------------------------------------------- /16-Helm-Dev-If-Else-NOT/helmbasics/templates/deployment.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: apps/v1 2 | kind: Deployment 3 | metadata: 4 | name: {{ .Release.Name }}-{{ .Chart.Name }} 5 | labels: 6 | app: nginx 7 | spec: 8 | {{- if not (eq .Values.myapp.env "prod") }} 9 | replicas: 1 10 | {{- else }} 11 | replicas: 6 12 | {{- end }} 13 | selector: 14 | matchLabels: 15 | app: nginx 16 | template: 17 | metadata: 18 | labels: 19 | app: nginx 20 | spec: 21 | containers: 22 | - name: nginx 23 | image: ghcr.io/stacksimplify/kubenginx:4.0.0 24 | ports: 25 | - containerPort: 80 -------------------------------------------------------------------------------- /16-Helm-Dev-If-Else-NOT/helmbasics/values.yaml: -------------------------------------------------------------------------------- 1 | # If, else if, else 2 | myapp: 3 | env: prod 4 | 5 | -------------------------------------------------------------------------------- /17-Helm-Dev-WITH/backupfiles/configmap.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: ConfigMap 3 | metadata: 4 | name: {{ .Release.Name }}-{{ .Chart.Name }} 5 | data: 6 | {{- with .Values.myapps.data.config }} 7 | application-name: {{ .appName }} 8 | application-type: {{ .appType }} 9 | {{- end}} 10 | -------------------------------------------------------------------------------- /17-Helm-Dev-WITH/backupfiles/deployment.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: apps/v1 2 | kind: Deployment 3 | metadata: 4 | name: {{ .Release.Name }}-{{ .Chart.Name }} 5 | labels: 6 | app: nginx 7 | spec: 8 | replicas: 2 9 | selector: 10 | matchLabels: 11 | app: nginx 12 | template: 13 | metadata: 14 | {{- with .Values.podAnnotations }} 15 | annotations: 16 | {{- toYaml . | nindent 8 }} 17 | appManagedBy: {{ $.Release.Service }} 18 | chartName: {{ $.Chart.Name }} 19 | {{- end }} 20 | labels: 21 | app: nginx 22 | spec: 23 | containers: 24 | - name: nginx 25 | image: ghcr.io/stacksimplify/kubenginx:4.0.0 26 | ports: 27 | - containerPort: 80 28 | -------------------------------------------------------------------------------- /17-Helm-Dev-WITH/backupfiles/values.yaml: -------------------------------------------------------------------------------- 1 | # For testing Flow Control: with 2 | podAnnotations: 3 | appName: myapp1 4 | appType: webserver 5 | appTech: HTML 6 | 7 | # For testing Flow Control: with - Scope more detailed 8 | myapps: 9 | data: 10 | config: 11 | appName: myapp1 12 | appType: webserver 13 | appTech: HTML 14 | appDb: mysql 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /17-Helm-Dev-WITH/helmbasics/.helmignore: -------------------------------------------------------------------------------- 1 | # Patterns to ignore when building packages. 2 | # This supports shell glob matching, relative path matching, and 3 | # negation (prefixed with !). Only one pattern per line. 4 | .DS_Store 5 | # Common VCS dirs 6 | .git/ 7 | .gitignore 8 | .bzr/ 9 | .bzrignore 10 | .hg/ 11 | .hgignore 12 | .svn/ 13 | # Common backup files 14 | *.swp 15 | *.bak 16 | *.tmp 17 | *.orig 18 | *~ 19 | # Various IDEs 20 | .project 21 | .idea/ 22 | *.tmproj 23 | .vscode/ 24 | -------------------------------------------------------------------------------- /17-Helm-Dev-WITH/helmbasics/Chart.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v2 2 | name: helmbasics 3 | description: A Helm chart for learning Helm Basics 4 | type: application 5 | version: 0.1.0 6 | appVersion: "0.1.0" 7 | -------------------------------------------------------------------------------- /17-Helm-Dev-WITH/helmbasics/templates/NOTES.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stacksimplify/helm-masterclass/2c76ce8db38dc5c901b4c1901707987c1e0413c1/17-Helm-Dev-WITH/helmbasics/templates/NOTES.txt -------------------------------------------------------------------------------- /17-Helm-Dev-WITH/helmbasics/templates/configmap.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: ConfigMap 3 | metadata: 4 | name: {{ .Release.Name }}-{{ .Chart.Name }} 5 | data: 6 | {{- with .Values.myapps.data.config }} 7 | application-name: {{ .appName }} 8 | application-type: {{ .appType }} 9 | {{- end }} -------------------------------------------------------------------------------- /17-Helm-Dev-WITH/helmbasics/templates/deployment.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: apps/v1 2 | kind: Deployment 3 | metadata: 4 | name: {{ .Release.Name }}-{{ .Chart.Name }} 5 | labels: 6 | app: nginx 7 | spec: 8 | replicas: 2 9 | selector: 10 | matchLabels: 11 | app: nginx 12 | template: 13 | metadata: 14 | {{- with .Values.podAnnotations }} 15 | annotations: 16 | {{- toYaml . | nindent 8 }} 17 | appManagedBy: {{ $.Release.Service }} 18 | chartName: {{ $.Chart.Name }} 19 | {{- end }} 20 | labels: 21 | app: nginx 22 | spec: 23 | containers: 24 | - name: nginx 25 | image: ghcr.io/stacksimplify/kubenginx:4.0.0 26 | ports: 27 | - containerPort: 80 28 | 29 | -------------------------------------------------------------------------------- /17-Helm-Dev-WITH/helmbasics/values.yaml: -------------------------------------------------------------------------------- 1 | # For testing Flow Control: with 2 | podAnnotations: 3 | appName: myapp1 4 | appType: webserver 5 | appTech: HTML 6 | 7 | # For testing Flow Control: with - Scope more detailed 8 | myapps: 9 | data: 10 | config: 11 | appName: myapp1 12 | appType: webserver 13 | appTech: HTML 14 | appDb: mysql 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /18-Helm-Dev-WITH-If-Else/backupfiles/deployment.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: apps/v1 2 | kind: Deployment 3 | metadata: 4 | name: {{ .Release.Name }}-{{ .Chart.Name }} 5 | labels: 6 | app: nginx 7 | spec: 8 | {{- with .Values.myapp }} 9 | {{- if and .retail.enableFeature (eq .env "prod") }} 10 | replicas: 6 11 | {{- else if eq .env "prod" }} 12 | replicas: 4 13 | {{- else if eq .env "qa" }} 14 | replicas: 2 15 | {{- else }} 16 | replicas: 1 17 | {{- end }} 18 | {{- end }} 19 | selector: 20 | matchLabels: 21 | app: nginx 22 | template: 23 | metadata: 24 | labels: 25 | app: nginx 26 | spec: 27 | containers: 28 | - name: nginx 29 | image: ghcr.io/stacksimplify/kubenginx:4.0.0 30 | ports: 31 | - containerPort: 80 -------------------------------------------------------------------------------- /18-Helm-Dev-WITH-If-Else/helmbasics/.helmignore: -------------------------------------------------------------------------------- 1 | # Patterns to ignore when building packages. 2 | # This supports shell glob matching, relative path matching, and 3 | # negation (prefixed with !). Only one pattern per line. 4 | .DS_Store 5 | # Common VCS dirs 6 | .git/ 7 | .gitignore 8 | .bzr/ 9 | .bzrignore 10 | .hg/ 11 | .hgignore 12 | .svn/ 13 | # Common backup files 14 | *.swp 15 | *.bak 16 | *.tmp 17 | *.orig 18 | *~ 19 | # Various IDEs 20 | .project 21 | .idea/ 22 | *.tmproj 23 | .vscode/ 24 | -------------------------------------------------------------------------------- /18-Helm-Dev-WITH-If-Else/helmbasics/Chart.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v2 2 | name: helmbasics 3 | description: A Helm chart for learning Helm Basics 4 | type: application 5 | version: 0.1.0 6 | appVersion: "0.1.0" 7 | -------------------------------------------------------------------------------- /18-Helm-Dev-WITH-If-Else/helmbasics/templates/NOTES.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stacksimplify/helm-masterclass/2c76ce8db38dc5c901b4c1901707987c1e0413c1/18-Helm-Dev-WITH-If-Else/helmbasics/templates/NOTES.txt -------------------------------------------------------------------------------- /18-Helm-Dev-WITH-If-Else/helmbasics/templates/deployment.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: apps/v1 2 | kind: Deployment 3 | metadata: 4 | name: {{ .Release.Name }}-{{ .Chart.Name }} 5 | labels: 6 | app: nginx 7 | spec: 8 | {{- with .Values.myapp }} 9 | {{- if and .retail.enableFeature (eq .env "prod") }} 10 | replicas: 6 11 | {{- else if eq .env "prod" }} 12 | replicas: 4 13 | {{- else if eq .env "qa" }} 14 | replicas: 2 15 | {{- else }} 16 | replicas: 1 17 | {{- end }} 18 | {{- end }} 19 | selector: 20 | matchLabels: 21 | app: nginx 22 | template: 23 | metadata: 24 | labels: 25 | app: nginx 26 | spec: 27 | containers: 28 | - name: nginx 29 | image: ghcr.io/stacksimplify/kubenginx:4.0.0 30 | ports: 31 | - containerPort: 80 -------------------------------------------------------------------------------- /18-Helm-Dev-WITH-If-Else/helmbasics/values.yaml: -------------------------------------------------------------------------------- 1 | # If, else if, else 2 | myapp: 3 | env: prod 4 | retail: 5 | enableFeature: true 6 | 7 | -------------------------------------------------------------------------------- /19-Helm-Dev-Variables/backupfiles/deployment.yaml: -------------------------------------------------------------------------------- 1 | {{- $chartname := .Chart.Name -}} 2 | apiVersion: apps/v1 3 | kind: Deployment 4 | metadata: 5 | name: {{ .Release.Name }}-{{ .Chart.Name }}-deployment # Action Element 6 | labels: 7 | app: nginx 8 | spec: 9 | replicas: 2 10 | selector: 11 | matchLabels: 12 | app: nginx 13 | template: 14 | metadata: 15 | {{- with .Values.podAnnotations }} 16 | annotations: 17 | {{- toYaml . | nindent 8 }} 18 | appManagedBy: {{ $.Release.Service }} 19 | appHelmChart: {{ $chartname }} 20 | {{- end }} 21 | labels: 22 | app: nginx 23 | spec: 24 | containers: 25 | - name: nginx 26 | image: ghcr.io/stacksimplify/kubenginx:4.0.0 27 | ports: 28 | - containerPort: 80 29 | -------------------------------------------------------------------------------- /19-Helm-Dev-Variables/helmbasics/.helmignore: -------------------------------------------------------------------------------- 1 | # Patterns to ignore when building packages. 2 | # This supports shell glob matching, relative path matching, and 3 | # negation (prefixed with !). Only one pattern per line. 4 | .DS_Store 5 | # Common VCS dirs 6 | .git/ 7 | .gitignore 8 | .bzr/ 9 | .bzrignore 10 | .hg/ 11 | .hgignore 12 | .svn/ 13 | # Common backup files 14 | *.swp 15 | *.bak 16 | *.tmp 17 | *.orig 18 | *~ 19 | # Various IDEs 20 | .project 21 | .idea/ 22 | *.tmproj 23 | .vscode/ 24 | -------------------------------------------------------------------------------- /19-Helm-Dev-Variables/helmbasics/Chart.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v2 2 | name: helmbasics 3 | description: A Helm chart for learning Helm Basics 4 | type: application 5 | version: 0.1.0 6 | appVersion: "0.1.0" 7 | -------------------------------------------------------------------------------- /19-Helm-Dev-Variables/helmbasics/templates/NOTES.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stacksimplify/helm-masterclass/2c76ce8db38dc5c901b4c1901707987c1e0413c1/19-Helm-Dev-Variables/helmbasics/templates/NOTES.txt -------------------------------------------------------------------------------- /19-Helm-Dev-Variables/helmbasics/templates/deployment.yaml: -------------------------------------------------------------------------------- 1 | {{- $chartname := .Chart.Name | quote | upper -}} 2 | apiVersion: apps/v1 3 | kind: Deployment 4 | metadata: 5 | name: {{ .Release.Name }}-{{ .Chart.Name }}-deployment # Action Element 6 | labels: 7 | app: nginx 8 | spec: 9 | replicas: 2 10 | selector: 11 | matchLabels: 12 | app: nginx 13 | template: 14 | metadata: 15 | {{- with .Values.podAnnotations }} 16 | annotations: 17 | {{- toYaml . | nindent 8 }} 18 | appManagedBy: {{ $.Release.Service }} 19 | appHelmChart: {{ $chartname }} 20 | {{- end }} 21 | labels: 22 | app: nginx 23 | spec: 24 | containers: 25 | - name: nginx 26 | image: ghcr.io/stacksimplify/kubenginx:4.0.0 27 | ports: 28 | - containerPort: 80 29 | -------------------------------------------------------------------------------- /19-Helm-Dev-Variables/helmbasics/values.yaml: -------------------------------------------------------------------------------- 1 | #replicaCount: 2 | 3 | #releaseName: MYAPP100 4 | releaseName: "" 5 | 6 | # Resources for testing Template Function: toYaml 7 | resources: 8 | limits: 9 | cpu: 100m 10 | memory: 128Mi 11 | requests: 12 | cpu: 100m 13 | memory: 128Mi 14 | 15 | # For testing Flow Control: if-else Block 16 | image: 17 | environment: "" 18 | repository: ghcr.io/stacksimplify/kubenginxhelm 19 | pullPolicy: IfNotPresent 20 | devtag: "0.2.0" 21 | qatag: "0.3.0" 22 | 23 | 24 | # For testing Flow Control: with Block 25 | #podAnnotations: {} 26 | podAnnotations: 27 | appName: myapp1 28 | appType: webserver 29 | appTech: HTML 30 | 31 | # For testing Flow Control: with Block - Scope more detailed 32 | myapps: 33 | data: 34 | config: 35 | appName: myapp1 36 | appType: webserver 37 | appTech: HTML 38 | appDb: mysql 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /20-Helm-Dev-Range-List/backupfiles/namespace-with-variable.yaml: -------------------------------------------------------------------------------- 1 | {{- range $environment := .Values.environments }} 2 | apiVersion: v1 3 | kind: Namespace 4 | metadata: 5 | name: {{ $environment.name }} 6 | --- 7 | {{- end }} -------------------------------------------------------------------------------- /20-Helm-Dev-Range-List/backupfiles/namespace.yaml: -------------------------------------------------------------------------------- 1 | {{- range .Values.namespaces }} 2 | apiVersion: v1 3 | kind: Namespace 4 | metadata: 5 | name: {{ .name }} 6 | --- 7 | {{- end }} -------------------------------------------------------------------------------- /20-Helm-Dev-Range-List/helmbasics/.helmignore: -------------------------------------------------------------------------------- 1 | # Patterns to ignore when building packages. 2 | # This supports shell glob matching, relative path matching, and 3 | # negation (prefixed with !). Only one pattern per line. 4 | .DS_Store 5 | # Common VCS dirs 6 | .git/ 7 | .gitignore 8 | .bzr/ 9 | .bzrignore 10 | .hg/ 11 | .hgignore 12 | .svn/ 13 | # Common backup files 14 | *.swp 15 | *.bak 16 | *.tmp 17 | *.orig 18 | *~ 19 | # Various IDEs 20 | .project 21 | .idea/ 22 | *.tmproj 23 | .vscode/ 24 | -------------------------------------------------------------------------------- /20-Helm-Dev-Range-List/helmbasics/Chart.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v2 2 | name: helmbasics 3 | description: A Helm chart for learning Helm Basics 4 | type: application 5 | version: 0.1.0 6 | appVersion: "0.1.0" 7 | -------------------------------------------------------------------------------- /20-Helm-Dev-Range-List/helmbasics/templates/NOTES.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stacksimplify/helm-masterclass/2c76ce8db38dc5c901b4c1901707987c1e0413c1/20-Helm-Dev-Range-List/helmbasics/templates/NOTES.txt -------------------------------------------------------------------------------- /20-Helm-Dev-Range-List/helmbasics/templates/namespace-with-variable.yaml: -------------------------------------------------------------------------------- 1 | {{- range $environment := .Values.environments}} 2 | apiVersion: v1 3 | kind: Namespace 4 | metadata: 5 | name: {{ $environment.name }} 6 | --- 7 | {{- end }} -------------------------------------------------------------------------------- /20-Helm-Dev-Range-List/helmbasics/templates/namespace.yaml: -------------------------------------------------------------------------------- 1 | {{- range .Values.namespaces}} 2 | apiVersion: v1 3 | kind: Namespace 4 | metadata: 5 | name: {{ .name }} 6 | --- 7 | {{- end }} -------------------------------------------------------------------------------- /20-Helm-Dev-Range-List/helmbasics/values.yaml: -------------------------------------------------------------------------------- 1 | # Flow Control: Range with List 2 | namespaces: 3 | - name: myapp1 4 | - name: myapp2 5 | - name: myapp3 6 | 7 | # Flow Control: Range with List and Helm Variables 8 | environments: 9 | - name: dev 10 | - name: qa 11 | - name: uat 12 | - name: prod 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /21-Helm-Dev-Range-Dict/backupfiles/configmap-with-variable.yaml: -------------------------------------------------------------------------------- 1 | # Range: Access Root Objec in Range with Helm Variable 2 | {{- $chartName := .Chart.Name }} 3 | apiVersion: v1 4 | kind: ConfigMap 5 | metadata: 6 | name: {{ .Release.Name }}-{{ .Chart.Name }}-configmap2 7 | data: 8 | {{- range $key, $value := .Values.myapps.config2 }} 9 | {{- $key | nindent 2}}: {{ $value }}-{{ $chartName }} 10 | {{- end}} -------------------------------------------------------------------------------- /21-Helm-Dev-Range-Dict/backupfiles/configmap.yaml: -------------------------------------------------------------------------------- 1 | # Range with Dictionary 2 | apiVersion: v1 3 | kind: ConfigMap 4 | metadata: 5 | name: {{ .Release.Name }}-{{ .Chart.Name }}-configmap1 6 | data: 7 | {{- range $key, $value := .Values.myapps.config1 }} 8 | {{- $key | nindent 2}}: {{ $value }} 9 | {{- end}} -------------------------------------------------------------------------------- /21-Helm-Dev-Range-Dict/helmbasics/.helmignore: -------------------------------------------------------------------------------- 1 | # Patterns to ignore when building packages. 2 | # This supports shell glob matching, relative path matching, and 3 | # negation (prefixed with !). Only one pattern per line. 4 | .DS_Store 5 | # Common VCS dirs 6 | .git/ 7 | .gitignore 8 | .bzr/ 9 | .bzrignore 10 | .hg/ 11 | .hgignore 12 | .svn/ 13 | # Common backup files 14 | *.swp 15 | *.bak 16 | *.tmp 17 | *.orig 18 | *~ 19 | # Various IDEs 20 | .project 21 | .idea/ 22 | *.tmproj 23 | .vscode/ 24 | -------------------------------------------------------------------------------- /21-Helm-Dev-Range-Dict/helmbasics/Chart.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v2 2 | name: helmbasics 3 | description: A Helm chart for learning Helm Basics 4 | type: application 5 | version: 0.1.0 6 | appVersion: "0.1.0" 7 | -------------------------------------------------------------------------------- /21-Helm-Dev-Range-Dict/helmbasics/templates/NOTES.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stacksimplify/helm-masterclass/2c76ce8db38dc5c901b4c1901707987c1e0413c1/21-Helm-Dev-Range-Dict/helmbasics/templates/NOTES.txt -------------------------------------------------------------------------------- /21-Helm-Dev-Range-Dict/helmbasics/templates/configmap-with-variable.yaml: -------------------------------------------------------------------------------- 1 | {{- $chartname := .Chart.Name }} 2 | apiVersion: v1 3 | kind: ConfigMap 4 | metadata: 5 | name: {{ .Release.Name }}-{{ .Chart.Name }}-configmap2 6 | data: 7 | {{- range $key, $value := .Values.myapps.config2 }} 8 | {{- $key | nindent 2 }}: {{ $value }}-{{ $chartname }} 9 | {{- end }} -------------------------------------------------------------------------------- /21-Helm-Dev-Range-Dict/helmbasics/templates/configmap.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: ConfigMap 3 | metadata: 4 | name: {{ .Release.Name }}-{{ .Chart.Name }}-configmap1 5 | data: 6 | {{- range $key, $value := .Values.myapps.config1 }} 7 | {{- $key | nindent 2 }}: {{ $value }} 8 | {{- end }} -------------------------------------------------------------------------------- /21-Helm-Dev-Range-Dict/helmbasics/values.yaml: -------------------------------------------------------------------------------- 1 | # Range with Dictionary 2 | myapps: 3 | config1: 4 | appName: myapp1 5 | appType: webserver 6 | appTech: HTML 7 | appDb: mysql 8 | config2: 9 | appName: myapp2 10 | appType: webserver 11 | appTech: HTML 12 | appDb: mysql 13 | -------------------------------------------------------------------------------- /22-Helm-Dev-Named-Templates/backupfiles/_helpers.tpl: -------------------------------------------------------------------------------- 1 | {{/* Common Labels */}} 2 | {{- define "helmbasics.labels"}} 3 | app: nginx 4 | chartname: {{ .Chart.Name }} 5 | {{- end }} -------------------------------------------------------------------------------- /22-Helm-Dev-Named-Templates/backupfiles/deployment.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: apps/v1 2 | kind: Deployment 3 | metadata: 4 | name: {{ .Release.Name }}-{{ .Chart.Name }}-deployment 5 | labels: 6 | {{- include "helmbasics.labels" . | upper }} 7 | spec: 8 | replicas: 2 9 | selector: 10 | matchLabels: 11 | app: nginx 12 | template: 13 | metadata: 14 | labels: 15 | app: nginx 16 | spec: 17 | containers: 18 | - name: nginx 19 | image: ghcr.io/stacksimplify/kubenginx:4.0.0 20 | ports: 21 | - containerPort: 80 22 | -------------------------------------------------------------------------------- /22-Helm-Dev-Named-Templates/helmbasics/.helmignore: -------------------------------------------------------------------------------- 1 | # Patterns to ignore when building packages. 2 | # This supports shell glob matching, relative path matching, and 3 | # negation (prefixed with !). Only one pattern per line. 4 | .DS_Store 5 | # Common VCS dirs 6 | .git/ 7 | .gitignore 8 | .bzr/ 9 | .bzrignore 10 | .hg/ 11 | .hgignore 12 | .svn/ 13 | # Common backup files 14 | *.swp 15 | *.bak 16 | *.tmp 17 | *.orig 18 | *~ 19 | # Various IDEs 20 | .project 21 | .idea/ 22 | *.tmproj 23 | .vscode/ 24 | -------------------------------------------------------------------------------- /22-Helm-Dev-Named-Templates/helmbasics/Chart.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v2 2 | name: helmbasics 3 | description: A Helm chart for learning Helm Basics 4 | type: application 5 | version: 0.1.0 6 | appVersion: "0.1.0" 7 | -------------------------------------------------------------------------------- /22-Helm-Dev-Named-Templates/helmbasics/templates/NOTES.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stacksimplify/helm-masterclass/2c76ce8db38dc5c901b4c1901707987c1e0413c1/22-Helm-Dev-Named-Templates/helmbasics/templates/NOTES.txt -------------------------------------------------------------------------------- /22-Helm-Dev-Named-Templates/helmbasics/templates/_helpers.tpl: -------------------------------------------------------------------------------- 1 | {{/* Common Labels */}} 2 | {{- define "helmbasics.labels"}} 3 | app: nginx 4 | chartname: {{ .Chart.Name }} 5 | {{- end }} -------------------------------------------------------------------------------- /22-Helm-Dev-Named-Templates/helmbasics/templates/deployment.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: apps/v1 2 | kind: Deployment 3 | metadata: 4 | name: {{ .Release.Name }}-{{ .Chart.Name }}-deployment 5 | labels: 6 | {{- include "helmbasics.labels" . | upper }} 7 | spec: 8 | replicas: 2 9 | selector: 10 | matchLabels: 11 | app: nginx 12 | template: 13 | metadata: 14 | labels: 15 | app: nginx 16 | spec: 17 | containers: 18 | - name: nginx 19 | image: ghcr.io/stacksimplify/kubenginx:4.0.0 20 | ports: 21 | - containerPort: 80 22 | -------------------------------------------------------------------------------- /22-Helm-Dev-Named-Templates/helmbasics/values.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stacksimplify/helm-masterclass/2c76ce8db38dc5c901b4c1901707987c1e0413c1/22-Helm-Dev-Named-Templates/helmbasics/values.yaml -------------------------------------------------------------------------------- /23-Helm-Dev-Printf-Function/README.md: -------------------------------------------------------------------------------- 1 | # Helm Printf Function 2 | 3 | ## Step-01: Introduction 4 | - **[printf](https://helm.sh/docs/chart_template_guide/function_list/#printf):** Returns a string based on a formatting string and the arguments to pass to it in order. 5 | 6 | 7 | ## Step-02: Create a Named Template with printf function 8 | ```t 9 | {{/* Kubernetes Resource Name: String Concat with Hyphen */}} 10 | {{- define "helmbasics.resourceName" }} 11 | {{- printf "%s-%s" .Release.Name .Chart.Name }} 12 | {{- end }} 13 | ``` 14 | 15 | ## Step-03: Call the named template in deployment.yaml 16 | ```yaml 17 | apiVersion: apps/v1 18 | kind: Deployment 19 | metadata: 20 | name: {{ include "helmbasics.resourceName" . }}-deployment 21 | labels: 22 | ``` 23 | 24 | ## Step-04: Test the changes 25 | ```t 26 | # Change to Chart Directory 27 | cd helmbasics 28 | 29 | # Helm Template Command 30 | helm template myapp1 . 31 | 32 | # Helm Install with dry-run command 33 | helm install myapp1 . --dry-run 34 | 35 | # Helm Install with --atomic flag 36 | helm install myapp1 . --atomic 37 | 38 | # Helm Uninstall 39 | helm uninstall myapp1 40 | ``` -------------------------------------------------------------------------------- /23-Helm-Dev-Printf-Function/backupfiles/_helpers.tpl: -------------------------------------------------------------------------------- 1 | {{/* Common Labels */}} 2 | {{- define "helmbasics.labels"}} 3 | app.kubernetes.io/managed-by: helm 4 | app: nginx 5 | chartname: {{ .Chart.Name }} 6 | {{- end }} 7 | 8 | {{/* k8s Resource Name: String Concat with Hyphen */}} 9 | {{- define "helmbasics.resourceName" }} 10 | {{- printf "%s-%s" .Release.Name .Chart.Name }} 11 | {{- end }} -------------------------------------------------------------------------------- /23-Helm-Dev-Printf-Function/backupfiles/deployment.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: apps/v1 2 | kind: Deployment 3 | metadata: 4 | name: {{ include "helmbasics.resourceName" . }}-deployment 5 | labels: 6 | {{- include "helmbasics.labels" . | upper }} 7 | spec: 8 | replicas: 2 9 | selector: 10 | matchLabels: 11 | app: nginx 12 | template: 13 | metadata: 14 | labels: 15 | app: nginx 16 | spec: 17 | containers: 18 | - name: nginx 19 | image: ghcr.io/stacksimplify/kubenginx:4.0.0 20 | ports: 21 | - containerPort: 80 22 | -------------------------------------------------------------------------------- /23-Helm-Dev-Printf-Function/helmbasics/.helmignore: -------------------------------------------------------------------------------- 1 | # Patterns to ignore when building packages. 2 | # This supports shell glob matching, relative path matching, and 3 | # negation (prefixed with !). Only one pattern per line. 4 | .DS_Store 5 | # Common VCS dirs 6 | .git/ 7 | .gitignore 8 | .bzr/ 9 | .bzrignore 10 | .hg/ 11 | .hgignore 12 | .svn/ 13 | # Common backup files 14 | *.swp 15 | *.bak 16 | *.tmp 17 | *.orig 18 | *~ 19 | # Various IDEs 20 | .project 21 | .idea/ 22 | *.tmproj 23 | .vscode/ 24 | -------------------------------------------------------------------------------- /23-Helm-Dev-Printf-Function/helmbasics/Chart.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v2 2 | name: helmbasics 3 | description: A Helm chart for learning Helm Basics 4 | type: application 5 | version: 0.1.0 6 | appVersion: "0.1.0" 7 | -------------------------------------------------------------------------------- /23-Helm-Dev-Printf-Function/helmbasics/templates/NOTES.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stacksimplify/helm-masterclass/2c76ce8db38dc5c901b4c1901707987c1e0413c1/23-Helm-Dev-Printf-Function/helmbasics/templates/NOTES.txt -------------------------------------------------------------------------------- /23-Helm-Dev-Printf-Function/helmbasics/templates/_helpers.tpl: -------------------------------------------------------------------------------- 1 | {{/* Common Labels */}} 2 | {{- define "helmbasics.labels"}} 3 | app: nginx 4 | chartname: {{ .Chart.Name }} 5 | {{- end }} 6 | 7 | {{/* k8s Resource Name: String Concat with Hyphen */}} 8 | {{- define "helmbasics.resourceName" }} 9 | {{- printf "%s-%s" .Release.Name .Chart.Name }} 10 | {{- end }} 11 | -------------------------------------------------------------------------------- /23-Helm-Dev-Printf-Function/helmbasics/templates/deployment.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: apps/v1 2 | kind: Deployment 3 | metadata: 4 | name: {{ include "helmbasics.resourceName" . }}-deployment 5 | labels: 6 | {{- include "helmbasics.labels" . | upper }} 7 | spec: 8 | replicas: 2 9 | selector: 10 | matchLabels: 11 | app: nginx 12 | template: 13 | metadata: 14 | labels: 15 | app: nginx 16 | spec: 17 | containers: 18 | - name: nginx 19 | image: ghcr.io/stacksimplify/kubenginx:4.0.0 20 | ports: 21 | - containerPort: 80 22 | -------------------------------------------------------------------------------- /23-Helm-Dev-Printf-Function/helmbasics/values.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stacksimplify/helm-masterclass/2c76ce8db38dc5c901b4c1901707987c1e0413c1/23-Helm-Dev-Printf-Function/helmbasics/values.yaml -------------------------------------------------------------------------------- /24-Helm-Dev-call-template-in-template/README.md: -------------------------------------------------------------------------------- 1 | # Helm Named Templates - Call Template in Template 2 | 3 | ## Step-01: Introduction 4 | - We can call one named template in other named template. 5 | 6 | ## Step-02: Update _helpers.tpl 7 | - We will udpate the template `helmbasics.labels` with `template-in-template` as additional label by calling the named template `helmbasics.resourceName` 8 | ```t 9 | {{/* Common Labels */}} 10 | {{- define "helmbasics.labels"}} 11 | app.kubernetes.io/managed-by: helm 12 | app: nginx 13 | chartname: {{ .Chart.Name }} 14 | template-in-template: {{ include "helmbasics.resourceName" . }} 15 | {{- end }} 16 | ``` 17 | 18 | ## Step-03: Test the changes 19 | ```t 20 | # Change to Chart Directory 21 | cd helmbasics 22 | 23 | # Helm Template Command 24 | helm template myapp1 . 25 | 26 | # Helm Install with dry-run command 27 | helm install myapp1 . --dry-run 28 | 29 | # Helm Install with --atomic flag 30 | helm install myapp1 . --atomic 31 | 32 | # Helm Uninstall 33 | helm uninstall myapp1 34 | ``` -------------------------------------------------------------------------------- /24-Helm-Dev-call-template-in-template/backupfiles/_helpers.tpl: -------------------------------------------------------------------------------- 1 | {{/* Common Labels */}} 2 | {{- define "helmbasics.labels"}} 3 | app: nginx 4 | chartname: {{ .Chart.Name }} 5 | template-in-template: {{ include "helmbasics.resourceName" . }} 6 | {{- end }} 7 | 8 | {{/* k8s Resource Name: String Concat with Hyphen */}} 9 | {{- define "helmbasics.resourceName" }} 10 | {{- printf "%s-%s" .Release.Name .Chart.Name }} 11 | {{- end }} 12 | -------------------------------------------------------------------------------- /24-Helm-Dev-call-template-in-template/backupfiles/deployment.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: apps/v1 2 | kind: Deployment 3 | metadata: 4 | name: {{ include "helmbasics.resourceName" . }}-deployment 5 | labels: 6 | {{- include "helmbasics.labels" . }} 7 | spec: 8 | replicas: 2 9 | selector: 10 | matchLabels: 11 | app: nginx 12 | template: 13 | metadata: 14 | labels: 15 | app: nginx 16 | spec: 17 | containers: 18 | - name: nginx 19 | image: ghcr.io/stacksimplify/kubenginx:4.0.0 20 | ports: 21 | - containerPort: 80 22 | -------------------------------------------------------------------------------- /24-Helm-Dev-call-template-in-template/helmbasics/.helmignore: -------------------------------------------------------------------------------- 1 | # Patterns to ignore when building packages. 2 | # This supports shell glob matching, relative path matching, and 3 | # negation (prefixed with !). Only one pattern per line. 4 | .DS_Store 5 | # Common VCS dirs 6 | .git/ 7 | .gitignore 8 | .bzr/ 9 | .bzrignore 10 | .hg/ 11 | .hgignore 12 | .svn/ 13 | # Common backup files 14 | *.swp 15 | *.bak 16 | *.tmp 17 | *.orig 18 | *~ 19 | # Various IDEs 20 | .project 21 | .idea/ 22 | *.tmproj 23 | .vscode/ 24 | -------------------------------------------------------------------------------- /24-Helm-Dev-call-template-in-template/helmbasics/Chart.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v2 2 | name: helmbasics 3 | description: A Helm chart for learning Helm Basics 4 | type: application 5 | version: 0.1.0 6 | appVersion: "0.1.0" 7 | -------------------------------------------------------------------------------- /24-Helm-Dev-call-template-in-template/helmbasics/templates/NOTES.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stacksimplify/helm-masterclass/2c76ce8db38dc5c901b4c1901707987c1e0413c1/24-Helm-Dev-call-template-in-template/helmbasics/templates/NOTES.txt -------------------------------------------------------------------------------- /24-Helm-Dev-call-template-in-template/helmbasics/templates/_helpers.tpl: -------------------------------------------------------------------------------- 1 | {{/* Common Labels */}} 2 | {{- define "helmbasics.labels"}} 3 | app: nginx 4 | chartname: {{ .Chart.Name }} 5 | template-in-template: {{ include "helmbasics.resourceName" . }} 6 | {{- end }} 7 | 8 | {{/* k8s Resource Name: String Concat with Hyphen */}} 9 | {{- define "helmbasics.resourceName" }} 10 | {{- printf "%s-%s" .Release.Name .Chart.Name }} 11 | {{- end }} 12 | -------------------------------------------------------------------------------- /24-Helm-Dev-call-template-in-template/helmbasics/templates/deployment.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: apps/v1 2 | kind: Deployment 3 | metadata: 4 | name: {{ include "helmbasics.resourceName" . }}-deployment 5 | labels: 6 | {{- include "helmbasics.labels" . }} 7 | spec: 8 | replicas: 2 9 | selector: 10 | matchLabels: 11 | app: nginx 12 | template: 13 | metadata: 14 | labels: 15 | app: nginx 16 | spec: 17 | containers: 18 | - name: nginx 19 | image: ghcr.io/stacksimplify/kubenginx:4.0.0 20 | ports: 21 | - containerPort: 80 22 | -------------------------------------------------------------------------------- /24-Helm-Dev-call-template-in-template/helmbasics/values.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stacksimplify/helm-masterclass/2c76ce8db38dc5c901b4c1901707987c1e0413c1/24-Helm-Dev-call-template-in-template/helmbasics/values.yaml -------------------------------------------------------------------------------- /25-Helm-Create-and-Package-Chart/myfirstchart/.helmignore: -------------------------------------------------------------------------------- 1 | # Patterns to ignore when building packages. 2 | # This supports shell glob matching, relative path matching, and 3 | # negation (prefixed with !). Only one pattern per line. 4 | .DS_Store 5 | # Common VCS dirs 6 | .git/ 7 | .gitignore 8 | .bzr/ 9 | .bzrignore 10 | .hg/ 11 | .hgignore 12 | .svn/ 13 | # Common backup files 14 | *.swp 15 | *.bak 16 | *.tmp 17 | *.orig 18 | *~ 19 | # Various IDEs 20 | .project 21 | .idea/ 22 | *.tmproj 23 | .vscode/ 24 | -------------------------------------------------------------------------------- /25-Helm-Create-and-Package-Chart/myfirstchart/Chart.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v2 2 | name: myfirstchart 3 | description: A Helm chart for Kubernetes 4 | 5 | # A chart can be either an 'application' or a 'library' chart. 6 | # 7 | # Application charts are a collection of templates that can be packaged into versioned archives 8 | # to be deployed. 9 | # 10 | # Library charts provide useful utilities or functions for the chart developer. They're included as 11 | # a dependency of application charts to inject those utilities and functions into the rendering 12 | # pipeline. Library charts do not define any templates and therefore cannot be deployed. 13 | type: application 14 | 15 | # This is the chart version. This version number should be incremented each time you make changes 16 | # to the chart and its templates, including the app version. 17 | # Versions are expected to follow Semantic Versioning (https://semver.org/) 18 | version: 1.0.0 19 | 20 | # This is the version number of the application being deployed. This version number should be 21 | # incremented each time you make changes to the application. Versions are not expected to 22 | # follow Semantic Versioning. They should reflect the version the application is using. 23 | # It is recommended to use it with quotes. 24 | appVersion: "1.0.0" 25 | -------------------------------------------------------------------------------- /25-Helm-Create-and-Package-Chart/myfirstchart/templates/hpa.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.autoscaling.enabled }} 2 | apiVersion: autoscaling/v2 3 | kind: HorizontalPodAutoscaler 4 | metadata: 5 | name: {{ include "myfirstchart.fullname" . }} 6 | labels: 7 | {{- include "myfirstchart.labels" . | nindent 4 }} 8 | spec: 9 | scaleTargetRef: 10 | apiVersion: apps/v1 11 | kind: Deployment 12 | name: {{ include "myfirstchart.fullname" . }} 13 | minReplicas: {{ .Values.autoscaling.minReplicas }} 14 | maxReplicas: {{ .Values.autoscaling.maxReplicas }} 15 | metrics: 16 | {{- if .Values.autoscaling.targetCPUUtilizationPercentage }} 17 | - type: Resource 18 | resource: 19 | name: cpu 20 | target: 21 | type: Utilization 22 | averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} 23 | {{- end }} 24 | {{- if .Values.autoscaling.targetMemoryUtilizationPercentage }} 25 | - type: Resource 26 | resource: 27 | name: memory 28 | target: 29 | type: Utilization 30 | averageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }} 31 | {{- end }} 32 | {{- end }} 33 | -------------------------------------------------------------------------------- /25-Helm-Create-and-Package-Chart/myfirstchart/templates/service.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: {{ include "myfirstchart.fullname" . }} 5 | labels: 6 | {{- include "myfirstchart.labels" . | nindent 4 }} 7 | spec: 8 | type: {{ .Values.service.type }} 9 | ports: 10 | - port: {{ .Values.service.port }} 11 | targetPort: http 12 | protocol: TCP 13 | name: http 14 | nodePort: {{ .Values.service.nodePort }} 15 | selector: 16 | {{- include "myfirstchart.selectorLabels" . | nindent 4 }} 17 | -------------------------------------------------------------------------------- /25-Helm-Create-and-Package-Chart/myfirstchart/templates/serviceaccount.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.serviceAccount.create -}} 2 | apiVersion: v1 3 | kind: ServiceAccount 4 | metadata: 5 | name: {{ include "myfirstchart.serviceAccountName" . }} 6 | labels: 7 | {{- include "myfirstchart.labels" . | nindent 4 }} 8 | {{- with .Values.serviceAccount.annotations }} 9 | annotations: 10 | {{- toYaml . | nindent 4 }} 11 | {{- end }} 12 | {{- end }} 13 | -------------------------------------------------------------------------------- /25-Helm-Create-and-Package-Chart/myfirstchart/templates/tests/test-connection.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Pod 3 | metadata: 4 | name: "{{ include "myfirstchart.fullname" . }}-test-connection" 5 | labels: 6 | {{- include "myfirstchart.labels" . | nindent 4 }} 7 | annotations: 8 | "helm.sh/hook": test 9 | spec: 10 | containers: 11 | - name: wget 12 | image: busybox 13 | command: ['wget'] 14 | args: ['{{ include "myfirstchart.fullname" . }}:{{ .Values.service.port }}'] 15 | restartPolicy: Never 16 | -------------------------------------------------------------------------------- /25-Helm-Create-and-Package-Chart/packages/myfirstchart-1.0.0.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stacksimplify/helm-masterclass/2c76ce8db38dc5c901b4c1901707987c1e0413c1/25-Helm-Create-and-Package-Chart/packages/myfirstchart-1.0.0.tgz -------------------------------------------------------------------------------- /25-Helm-Create-and-Package-Chart/packages/myfirstchart-2.0.0.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stacksimplify/helm-masterclass/2c76ce8db38dc5c901b4c1901707987c1e0413c1/25-Helm-Create-and-Package-Chart/packages/myfirstchart-2.0.0.tgz -------------------------------------------------------------------------------- /25-Helm-Create-and-Package-Chart/packages/myfirstchart-3.0.0.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stacksimplify/helm-masterclass/2c76ce8db38dc5c901b4c1901707987c1e0413c1/25-Helm-Create-and-Package-Chart/packages/myfirstchart-3.0.0.tgz -------------------------------------------------------------------------------- /26-Helm-Dependency/backupfiles/parentchart/.helmignore: -------------------------------------------------------------------------------- 1 | # Patterns to ignore when building packages. 2 | # This supports shell glob matching, relative path matching, and 3 | # negation (prefixed with !). Only one pattern per line. 4 | .DS_Store 5 | # Common VCS dirs 6 | .git/ 7 | .gitignore 8 | .bzr/ 9 | .bzrignore 10 | .hg/ 11 | .hgignore 12 | .svn/ 13 | # Common backup files 14 | *.swp 15 | *.bak 16 | *.tmp 17 | *.orig 18 | *~ 19 | # Various IDEs 20 | .project 21 | .idea/ 22 | *.tmproj 23 | .vscode/ 24 | -------------------------------------------------------------------------------- /26-Helm-Dependency/backupfiles/parentchart/Chart.lock: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - name: mychart1 3 | repository: https://stacksimplify.github.io/helm-charts/ 4 | version: 0.1.0 5 | - name: mychart2 6 | repository: https://stacksimplify.github.io/helm-charts/ 7 | version: 0.4.0 8 | - name: mysql 9 | repository: https://charts.bitnami.com/bitnami 10 | version: 9.11.0 11 | digest: sha256:f248f685e9b7725e70965a7861bbd42bcc91ff6a414996f78c5986621ab6f5bf 12 | generated: "2023-08-17T03:37:46.665736+05:30" 13 | -------------------------------------------------------------------------------- /26-Helm-Dependency/backupfiles/parentchart/Chart.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v2 2 | name: parentchart 3 | description: A Helm chart for Kubernetes 4 | type: application 5 | version: 0.1.0 6 | appVersion: "1.16.0" 7 | dependencies: 8 | - name: mychart1 9 | version: "0.1.0" 10 | repository: "https://stacksimplify.github.io/helm-charts/" 11 | - name: mychart2 12 | version: "0.4.0" 13 | repository: "https://stacksimplify.github.io/helm-charts/" 14 | -------------------------------------------------------------------------------- /26-Helm-Dependency/backupfiles/parentchart/charts/mychart1-0.1.0.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stacksimplify/helm-masterclass/2c76ce8db38dc5c901b4c1901707987c1e0413c1/26-Helm-Dependency/backupfiles/parentchart/charts/mychart1-0.1.0.tgz -------------------------------------------------------------------------------- /26-Helm-Dependency/backupfiles/parentchart/charts/mychart2-0.4.0.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stacksimplify/helm-masterclass/2c76ce8db38dc5c901b4c1901707987c1e0413c1/26-Helm-Dependency/backupfiles/parentchart/charts/mychart2-0.4.0.tgz -------------------------------------------------------------------------------- /26-Helm-Dependency/backupfiles/parentchart/charts/mysql-9.11.0.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stacksimplify/helm-masterclass/2c76ce8db38dc5c901b4c1901707987c1e0413c1/26-Helm-Dependency/backupfiles/parentchart/charts/mysql-9.11.0.tgz -------------------------------------------------------------------------------- /26-Helm-Dependency/backupfiles/parentchart/templates/hpa.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.autoscaling.enabled }} 2 | apiVersion: autoscaling/v2 3 | kind: HorizontalPodAutoscaler 4 | metadata: 5 | name: {{ include "parentchart.fullname" . }} 6 | labels: 7 | {{- include "parentchart.labels" . | nindent 4 }} 8 | spec: 9 | scaleTargetRef: 10 | apiVersion: apps/v1 11 | kind: Deployment 12 | name: {{ include "parentchart.fullname" . }} 13 | minReplicas: {{ .Values.autoscaling.minReplicas }} 14 | maxReplicas: {{ .Values.autoscaling.maxReplicas }} 15 | metrics: 16 | {{- if .Values.autoscaling.targetCPUUtilizationPercentage }} 17 | - type: Resource 18 | resource: 19 | name: cpu 20 | target: 21 | type: Utilization 22 | averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} 23 | {{- end }} 24 | {{- if .Values.autoscaling.targetMemoryUtilizationPercentage }} 25 | - type: Resource 26 | resource: 27 | name: memory 28 | target: 29 | type: Utilization 30 | averageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }} 31 | {{- end }} 32 | {{- end }} 33 | -------------------------------------------------------------------------------- /26-Helm-Dependency/backupfiles/parentchart/templates/service.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: {{ include "parentchart.fullname" . }} 5 | labels: 6 | {{- include "parentchart.labels" . | nindent 4 }} 7 | spec: 8 | type: {{ .Values.service.type }} 9 | ports: 10 | - port: {{ .Values.service.port }} 11 | targetPort: http 12 | protocol: TCP 13 | name: http 14 | selector: 15 | {{- include "parentchart.selectorLabels" . | nindent 4 }} 16 | -------------------------------------------------------------------------------- /26-Helm-Dependency/backupfiles/parentchart/templates/serviceaccount.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.serviceAccount.create -}} 2 | apiVersion: v1 3 | kind: ServiceAccount 4 | metadata: 5 | name: {{ include "parentchart.serviceAccountName" . }} 6 | labels: 7 | {{- include "parentchart.labels" . | nindent 4 }} 8 | {{- with .Values.serviceAccount.annotations }} 9 | annotations: 10 | {{- toYaml . | nindent 4 }} 11 | {{- end }} 12 | {{- end }} 13 | -------------------------------------------------------------------------------- /26-Helm-Dependency/backupfiles/parentchart/templates/tests/test-connection.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Pod 3 | metadata: 4 | name: "{{ include "parentchart.fullname" . }}-test-connection" 5 | labels: 6 | {{- include "parentchart.labels" . | nindent 4 }} 7 | annotations: 8 | "helm.sh/hook": test 9 | spec: 10 | containers: 11 | - name: wget 12 | image: busybox 13 | command: ['wget'] 14 | args: ['{{ include "parentchart.fullname" . }}:{{ .Values.service.port }}'] 15 | restartPolicy: Never 16 | -------------------------------------------------------------------------------- /26-Helm-Dependency/parentchart/.helmignore: -------------------------------------------------------------------------------- 1 | # Patterns to ignore when building packages. 2 | # This supports shell glob matching, relative path matching, and 3 | # negation (prefixed with !). Only one pattern per line. 4 | .DS_Store 5 | # Common VCS dirs 6 | .git/ 7 | .gitignore 8 | .bzr/ 9 | .bzrignore 10 | .hg/ 11 | .hgignore 12 | .svn/ 13 | # Common backup files 14 | *.swp 15 | *.bak 16 | *.tmp 17 | *.orig 18 | *~ 19 | # Various IDEs 20 | .project 21 | .idea/ 22 | *.tmproj 23 | .vscode/ 24 | -------------------------------------------------------------------------------- /26-Helm-Dependency/parentchart/Chart.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v2 2 | name: parentchart 3 | description: A Helm chart for Kubernetes 4 | type: application 5 | version: 0.1.0 6 | appVersion: "1.16.0" 7 | dependencies: 8 | - name: mychart1 9 | version: "0.1.0" 10 | repository: "https://stacksimplify.github.io/helm-charts/" 11 | - name: mychart2 12 | version: "0.4.0" 13 | repository: "https://stacksimplify.github.io/helm-charts/" 14 | - name: mysql 15 | version: "9.11.1" 16 | #version: ">= 9.10.8" 17 | #version: ">= 9.10.8 < 9.11.0" 18 | #version: "^9.10.1" # Downloads 9.11.1 (latest as on today) - deals with major version which is <10 19 | #version: "~9.10.1" # Downloads 9.10.10 - that is the latest patch version - deals with patch version <9.11.0 20 | #version: "^9.10" # Downloads 9.11.1 (latest as on today) - deals with major version which is <10 21 | #version: "~9.10" # Downloads 9.10.10 - that is the latest patch version - deals with patch version <9.11.0 22 | repository: "https://charts.bitnami.com/bitnami" 23 | #repository: "@mybitnami1" 24 | 25 | -------------------------------------------------------------------------------- /26-Helm-Dependency/parentchart/templates/hpa.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.autoscaling.enabled }} 2 | apiVersion: autoscaling/v2 3 | kind: HorizontalPodAutoscaler 4 | metadata: 5 | name: {{ include "parentchart.fullname" . }} 6 | labels: 7 | {{- include "parentchart.labels" . | nindent 4 }} 8 | spec: 9 | scaleTargetRef: 10 | apiVersion: apps/v1 11 | kind: Deployment 12 | name: {{ include "parentchart.fullname" . }} 13 | minReplicas: {{ .Values.autoscaling.minReplicas }} 14 | maxReplicas: {{ .Values.autoscaling.maxReplicas }} 15 | metrics: 16 | {{- if .Values.autoscaling.targetCPUUtilizationPercentage }} 17 | - type: Resource 18 | resource: 19 | name: cpu 20 | target: 21 | type: Utilization 22 | averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} 23 | {{- end }} 24 | {{- if .Values.autoscaling.targetMemoryUtilizationPercentage }} 25 | - type: Resource 26 | resource: 27 | name: memory 28 | target: 29 | type: Utilization 30 | averageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }} 31 | {{- end }} 32 | {{- end }} 33 | -------------------------------------------------------------------------------- /26-Helm-Dependency/parentchart/templates/service.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: {{ include "parentchart.fullname" . }} 5 | labels: 6 | {{- include "parentchart.labels" . | nindent 4 }} 7 | spec: 8 | type: {{ .Values.service.type }} 9 | ports: 10 | - port: {{ .Values.service.port }} 11 | targetPort: http 12 | protocol: TCP 13 | name: http 14 | selector: 15 | {{- include "parentchart.selectorLabels" . | nindent 4 }} 16 | -------------------------------------------------------------------------------- /26-Helm-Dependency/parentchart/templates/serviceaccount.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.serviceAccount.create -}} 2 | apiVersion: v1 3 | kind: ServiceAccount 4 | metadata: 5 | name: {{ include "parentchart.serviceAccountName" . }} 6 | labels: 7 | {{- include "parentchart.labels" . | nindent 4 }} 8 | {{- with .Values.serviceAccount.annotations }} 9 | annotations: 10 | {{- toYaml . | nindent 4 }} 11 | {{- end }} 12 | {{- end }} 13 | -------------------------------------------------------------------------------- /26-Helm-Dependency/parentchart/templates/tests/test-connection.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Pod 3 | metadata: 4 | name: "{{ include "parentchart.fullname" . }}-test-connection" 5 | labels: 6 | {{- include "parentchart.labels" . | nindent 4 }} 7 | annotations: 8 | "helm.sh/hook": test 9 | spec: 10 | containers: 11 | - name: wget 12 | image: busybox 13 | command: ['wget'] 14 | args: ['{{ include "parentchart.fullname" . }}:{{ .Values.service.port }}'] 15 | restartPolicy: Never 16 | -------------------------------------------------------------------------------- /27-Helm-Dependency-Alias/parentchart/.helmignore: -------------------------------------------------------------------------------- 1 | # Patterns to ignore when building packages. 2 | # This supports shell glob matching, relative path matching, and 3 | # negation (prefixed with !). Only one pattern per line. 4 | .DS_Store 5 | # Common VCS dirs 6 | .git/ 7 | .gitignore 8 | .bzr/ 9 | .bzrignore 10 | .hg/ 11 | .hgignore 12 | .svn/ 13 | # Common backup files 14 | *.swp 15 | *.bak 16 | *.tmp 17 | *.orig 18 | *~ 19 | # Various IDEs 20 | .project 21 | .idea/ 22 | *.tmproj 23 | .vscode/ 24 | -------------------------------------------------------------------------------- /27-Helm-Dependency-Alias/parentchart/Chart.lock: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - name: mychart4 3 | repository: https://stacksimplify.github.io/helm-charts/ 4 | version: 0.1.0 5 | - name: mychart4 6 | repository: https://stacksimplify.github.io/helm-charts/ 7 | version: 0.1.0 8 | - name: mychart2 9 | repository: https://stacksimplify.github.io/helm-charts/ 10 | version: 0.4.0 11 | digest: sha256:6c54b492ae349369eb5d3fa0ddbf86d3135f4055e0222d5ac1cc13fcf7946f9b 12 | generated: "2023-08-19T14:30:50.220754+05:30" 13 | -------------------------------------------------------------------------------- /27-Helm-Dependency-Alias/parentchart/Chart.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v2 2 | name: parentchart 3 | description: Learn Helm Dependency Concepts 4 | type: application 5 | version: 0.1.0 6 | appVersion: "1.16.0" 7 | dependencies: 8 | - name: mychart4 9 | version: "0.1.0" 10 | repository: "https://stacksimplify.github.io/helm-charts/" 11 | alias: childchart4dev 12 | - name: mychart4 13 | version: "0.1.0" 14 | repository: "https://stacksimplify.github.io/helm-charts/" 15 | alias: childchart4qa 16 | - name: mychart2 17 | version: "0.4.0" 18 | repository: "https://stacksimplify.github.io/helm-charts/" 19 | alias: childchart2 20 | 21 | -------------------------------------------------------------------------------- /27-Helm-Dependency-Alias/parentchart/charts/mychart2-0.4.0.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stacksimplify/helm-masterclass/2c76ce8db38dc5c901b4c1901707987c1e0413c1/27-Helm-Dependency-Alias/parentchart/charts/mychart2-0.4.0.tgz -------------------------------------------------------------------------------- /27-Helm-Dependency-Alias/parentchart/charts/mychart4-0.1.0.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stacksimplify/helm-masterclass/2c76ce8db38dc5c901b4c1901707987c1e0413c1/27-Helm-Dependency-Alias/parentchart/charts/mychart4-0.1.0.tgz -------------------------------------------------------------------------------- /27-Helm-Dependency-Alias/parentchart/templates/hpa.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.autoscaling.enabled }} 2 | apiVersion: autoscaling/v2 3 | kind: HorizontalPodAutoscaler 4 | metadata: 5 | name: {{ include "parentchart.fullname" . }} 6 | labels: 7 | {{- include "parentchart.labels" . | nindent 4 }} 8 | spec: 9 | scaleTargetRef: 10 | apiVersion: apps/v1 11 | kind: Deployment 12 | name: {{ include "parentchart.fullname" . }} 13 | minReplicas: {{ .Values.autoscaling.minReplicas }} 14 | maxReplicas: {{ .Values.autoscaling.maxReplicas }} 15 | metrics: 16 | {{- if .Values.autoscaling.targetCPUUtilizationPercentage }} 17 | - type: Resource 18 | resource: 19 | name: cpu 20 | target: 21 | type: Utilization 22 | averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} 23 | {{- end }} 24 | {{- if .Values.autoscaling.targetMemoryUtilizationPercentage }} 25 | - type: Resource 26 | resource: 27 | name: memory 28 | target: 29 | type: Utilization 30 | averageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }} 31 | {{- end }} 32 | {{- end }} 33 | -------------------------------------------------------------------------------- /27-Helm-Dependency-Alias/parentchart/templates/service.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: {{ include "parentchart.fullname" . }} 5 | labels: 6 | {{- include "parentchart.labels" . | nindent 4 }} 7 | spec: 8 | type: {{ .Values.service.type }} 9 | ports: 10 | - port: {{ .Values.service.port }} 11 | targetPort: http 12 | protocol: TCP 13 | name: http 14 | selector: 15 | {{- include "parentchart.selectorLabels" . | nindent 4 }} 16 | -------------------------------------------------------------------------------- /27-Helm-Dependency-Alias/parentchart/templates/serviceaccount.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.serviceAccount.create -}} 2 | apiVersion: v1 3 | kind: ServiceAccount 4 | metadata: 5 | name: {{ include "parentchart.serviceAccountName" . }} 6 | labels: 7 | {{- include "parentchart.labels" . | nindent 4 }} 8 | {{- with .Values.serviceAccount.annotations }} 9 | annotations: 10 | {{- toYaml . | nindent 4 }} 11 | {{- end }} 12 | {{- end }} 13 | -------------------------------------------------------------------------------- /27-Helm-Dependency-Alias/parentchart/templates/tests/test-connection.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Pod 3 | metadata: 4 | name: "{{ include "parentchart.fullname" . }}-test-connection" 5 | labels: 6 | {{- include "parentchart.labels" . | nindent 4 }} 7 | annotations: 8 | "helm.sh/hook": test 9 | spec: 10 | containers: 11 | - name: wget 12 | image: busybox 13 | command: ['wget'] 14 | args: ['{{ include "parentchart.fullname" . }}:{{ .Values.service.port }}'] 15 | restartPolicy: Never 16 | -------------------------------------------------------------------------------- /28-Helm-Dependency-Condition/parentchart/.helmignore: -------------------------------------------------------------------------------- 1 | # Patterns to ignore when building packages. 2 | # This supports shell glob matching, relative path matching, and 3 | # negation (prefixed with !). Only one pattern per line. 4 | .DS_Store 5 | # Common VCS dirs 6 | .git/ 7 | .gitignore 8 | .bzr/ 9 | .bzrignore 10 | .hg/ 11 | .hgignore 12 | .svn/ 13 | # Common backup files 14 | *.swp 15 | *.bak 16 | *.tmp 17 | *.orig 18 | *~ 19 | # Various IDEs 20 | .project 21 | .idea/ 22 | *.tmproj 23 | .vscode/ 24 | -------------------------------------------------------------------------------- /28-Helm-Dependency-Condition/parentchart/Chart.lock: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - name: mychart4 3 | repository: https://stacksimplify.github.io/helm-charts/ 4 | version: 0.1.0 5 | - name: mychart2 6 | repository: https://stacksimplify.github.io/helm-charts/ 7 | version: 0.4.0 8 | digest: sha256:f221e9d396b3bdfb126dcb616e31dbccc666f37eed886e8fbeaa9d62cf909a5c 9 | generated: "2023-08-19T14:53:46.70467+05:30" 10 | -------------------------------------------------------------------------------- /28-Helm-Dependency-Condition/parentchart/Chart.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v2 2 | name: parentchart 3 | description: Learn Helm Dependency Concepts 4 | type: application 5 | version: 0.1.0 6 | appVersion: "1.16.0" 7 | dependencies: 8 | - name: mychart4 9 | version: "0.1.0" 10 | repository: "https://stacksimplify.github.io/helm-charts/" 11 | alias: childchart4 12 | condition: mychart4.enabled 13 | - name: mychart2 14 | version: "0.4.0" 15 | repository: "https://stacksimplify.github.io/helm-charts/" 16 | alias: childchart2 17 | condition: mychart2.enabled 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /28-Helm-Dependency-Condition/parentchart/charts/mychart2-0.4.0.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stacksimplify/helm-masterclass/2c76ce8db38dc5c901b4c1901707987c1e0413c1/28-Helm-Dependency-Condition/parentchart/charts/mychart2-0.4.0.tgz -------------------------------------------------------------------------------- /28-Helm-Dependency-Condition/parentchart/charts/mychart4-0.1.0.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stacksimplify/helm-masterclass/2c76ce8db38dc5c901b4c1901707987c1e0413c1/28-Helm-Dependency-Condition/parentchart/charts/mychart4-0.1.0.tgz -------------------------------------------------------------------------------- /28-Helm-Dependency-Condition/parentchart/templates/hpa.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.autoscaling.enabled }} 2 | apiVersion: autoscaling/v2 3 | kind: HorizontalPodAutoscaler 4 | metadata: 5 | name: {{ include "parentchart.fullname" . }} 6 | labels: 7 | {{- include "parentchart.labels" . | nindent 4 }} 8 | spec: 9 | scaleTargetRef: 10 | apiVersion: apps/v1 11 | kind: Deployment 12 | name: {{ include "parentchart.fullname" . }} 13 | minReplicas: {{ .Values.autoscaling.minReplicas }} 14 | maxReplicas: {{ .Values.autoscaling.maxReplicas }} 15 | metrics: 16 | {{- if .Values.autoscaling.targetCPUUtilizationPercentage }} 17 | - type: Resource 18 | resource: 19 | name: cpu 20 | target: 21 | type: Utilization 22 | averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} 23 | {{- end }} 24 | {{- if .Values.autoscaling.targetMemoryUtilizationPercentage }} 25 | - type: Resource 26 | resource: 27 | name: memory 28 | target: 29 | type: Utilization 30 | averageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }} 31 | {{- end }} 32 | {{- end }} 33 | -------------------------------------------------------------------------------- /28-Helm-Dependency-Condition/parentchart/templates/service.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: {{ include "parentchart.fullname" . }} 5 | labels: 6 | {{- include "parentchart.labels" . | nindent 4 }} 7 | spec: 8 | type: {{ .Values.service.type }} 9 | ports: 10 | - port: {{ .Values.service.port }} 11 | targetPort: http 12 | protocol: TCP 13 | name: http 14 | selector: 15 | {{- include "parentchart.selectorLabels" . | nindent 4 }} 16 | -------------------------------------------------------------------------------- /28-Helm-Dependency-Condition/parentchart/templates/serviceaccount.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.serviceAccount.create -}} 2 | apiVersion: v1 3 | kind: ServiceAccount 4 | metadata: 5 | name: {{ include "parentchart.serviceAccountName" . }} 6 | labels: 7 | {{- include "parentchart.labels" . | nindent 4 }} 8 | {{- with .Values.serviceAccount.annotations }} 9 | annotations: 10 | {{- toYaml . | nindent 4 }} 11 | {{- end }} 12 | {{- end }} 13 | -------------------------------------------------------------------------------- /28-Helm-Dependency-Condition/parentchart/templates/tests/test-connection.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Pod 3 | metadata: 4 | name: "{{ include "parentchart.fullname" . }}-test-connection" 5 | labels: 6 | {{- include "parentchart.labels" . | nindent 4 }} 7 | annotations: 8 | "helm.sh/hook": test 9 | spec: 10 | containers: 11 | - name: wget 12 | image: busybox 13 | command: ['wget'] 14 | args: ['{{ include "parentchart.fullname" . }}:{{ .Values.service.port }}'] 15 | restartPolicy: Never 16 | -------------------------------------------------------------------------------- /29-Helm-Dependency-Condition-Alias/parentchart/.helmignore: -------------------------------------------------------------------------------- 1 | # Patterns to ignore when building packages. 2 | # This supports shell glob matching, relative path matching, and 3 | # negation (prefixed with !). Only one pattern per line. 4 | .DS_Store 5 | # Common VCS dirs 6 | .git/ 7 | .gitignore 8 | .bzr/ 9 | .bzrignore 10 | .hg/ 11 | .hgignore 12 | .svn/ 13 | # Common backup files 14 | *.swp 15 | *.bak 16 | *.tmp 17 | *.orig 18 | *~ 19 | # Various IDEs 20 | .project 21 | .idea/ 22 | *.tmproj 23 | .vscode/ 24 | -------------------------------------------------------------------------------- /29-Helm-Dependency-Condition-Alias/parentchart/Chart.lock: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - name: mychart4 3 | repository: https://stacksimplify.github.io/helm-charts/ 4 | version: 0.1.0 5 | - name: mychart2 6 | repository: https://stacksimplify.github.io/helm-charts/ 7 | version: 0.4.0 8 | digest: sha256:75c6de1c995d2f1cbe95ffac496378d8f44ffdedb19301713f3e4fa1e36377eb 9 | generated: "2023-08-17T04:59:21.198472+05:30" 10 | -------------------------------------------------------------------------------- /29-Helm-Dependency-Condition-Alias/parentchart/Chart.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v2 2 | name: parentchart 3 | description: Learn Helm Dependency Concepts 4 | type: application 5 | version: 0.1.0 6 | appVersion: "1.16.0" 7 | dependencies: 8 | - name: mychart4 9 | version: "0.1.0" 10 | repository: "https://stacksimplify.github.io/helm-charts/" 11 | alias: childchart4dev 12 | condition: childchart4dev.enabled 13 | - name: mychart4 14 | version: "0.1.0" 15 | repository: "https://stacksimplify.github.io/helm-charts/" 16 | alias: childchart4qa 17 | condition: childchart4qa.enabled 18 | - name: mychart2 19 | version: "0.4.0" 20 | repository: "https://stacksimplify.github.io/helm-charts/" 21 | alias: childchart2 22 | condition: childchart2.enabled 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /29-Helm-Dependency-Condition-Alias/parentchart/charts/mychart2-0.4.0.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stacksimplify/helm-masterclass/2c76ce8db38dc5c901b4c1901707987c1e0413c1/29-Helm-Dependency-Condition-Alias/parentchart/charts/mychart2-0.4.0.tgz -------------------------------------------------------------------------------- /29-Helm-Dependency-Condition-Alias/parentchart/charts/mychart4-0.1.0.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stacksimplify/helm-masterclass/2c76ce8db38dc5c901b4c1901707987c1e0413c1/29-Helm-Dependency-Condition-Alias/parentchart/charts/mychart4-0.1.0.tgz -------------------------------------------------------------------------------- /29-Helm-Dependency-Condition-Alias/parentchart/templates/hpa.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.autoscaling.enabled }} 2 | apiVersion: autoscaling/v2 3 | kind: HorizontalPodAutoscaler 4 | metadata: 5 | name: {{ include "parentchart.fullname" . }} 6 | labels: 7 | {{- include "parentchart.labels" . | nindent 4 }} 8 | spec: 9 | scaleTargetRef: 10 | apiVersion: apps/v1 11 | kind: Deployment 12 | name: {{ include "parentchart.fullname" . }} 13 | minReplicas: {{ .Values.autoscaling.minReplicas }} 14 | maxReplicas: {{ .Values.autoscaling.maxReplicas }} 15 | metrics: 16 | {{- if .Values.autoscaling.targetCPUUtilizationPercentage }} 17 | - type: Resource 18 | resource: 19 | name: cpu 20 | target: 21 | type: Utilization 22 | averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} 23 | {{- end }} 24 | {{- if .Values.autoscaling.targetMemoryUtilizationPercentage }} 25 | - type: Resource 26 | resource: 27 | name: memory 28 | target: 29 | type: Utilization 30 | averageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }} 31 | {{- end }} 32 | {{- end }} 33 | -------------------------------------------------------------------------------- /29-Helm-Dependency-Condition-Alias/parentchart/templates/service.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: {{ include "parentchart.fullname" . }} 5 | labels: 6 | {{- include "parentchart.labels" . | nindent 4 }} 7 | spec: 8 | type: {{ .Values.service.type }} 9 | ports: 10 | - port: {{ .Values.service.port }} 11 | targetPort: http 12 | protocol: TCP 13 | name: http 14 | selector: 15 | {{- include "parentchart.selectorLabels" . | nindent 4 }} 16 | -------------------------------------------------------------------------------- /29-Helm-Dependency-Condition-Alias/parentchart/templates/serviceaccount.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.serviceAccount.create -}} 2 | apiVersion: v1 3 | kind: ServiceAccount 4 | metadata: 5 | name: {{ include "parentchart.serviceAccountName" . }} 6 | labels: 7 | {{- include "parentchart.labels" . | nindent 4 }} 8 | {{- with .Values.serviceAccount.annotations }} 9 | annotations: 10 | {{- toYaml . | nindent 4 }} 11 | {{- end }} 12 | {{- end }} 13 | -------------------------------------------------------------------------------- /29-Helm-Dependency-Condition-Alias/parentchart/templates/tests/test-connection.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Pod 3 | metadata: 4 | name: "{{ include "parentchart.fullname" . }}-test-connection" 5 | labels: 6 | {{- include "parentchart.labels" . | nindent 4 }} 7 | annotations: 8 | "helm.sh/hook": test 9 | spec: 10 | containers: 11 | - name: wget 12 | image: busybox 13 | command: ['wget'] 14 | args: ['{{ include "parentchart.fullname" . }}:{{ .Values.service.port }}'] 15 | restartPolicy: Never 16 | -------------------------------------------------------------------------------- /30-Helm-Dependency-Tags/parentchart/.helmignore: -------------------------------------------------------------------------------- 1 | # Patterns to ignore when building packages. 2 | # This supports shell glob matching, relative path matching, and 3 | # negation (prefixed with !). Only one pattern per line. 4 | .DS_Store 5 | # Common VCS dirs 6 | .git/ 7 | .gitignore 8 | .bzr/ 9 | .bzrignore 10 | .hg/ 11 | .hgignore 12 | .svn/ 13 | # Common backup files 14 | *.swp 15 | *.bak 16 | *.tmp 17 | *.orig 18 | *~ 19 | # Various IDEs 20 | .project 21 | .idea/ 22 | *.tmproj 23 | .vscode/ 24 | -------------------------------------------------------------------------------- /30-Helm-Dependency-Tags/parentchart/Chart.lock: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - name: mychart4 3 | repository: https://stacksimplify.github.io/helm-charts/ 4 | version: 0.1.0 5 | - name: mychart4 6 | repository: https://stacksimplify.github.io/helm-charts/ 7 | version: 0.1.0 8 | - name: mychart2 9 | repository: https://stacksimplify.github.io/helm-charts/ 10 | version: 0.4.0 11 | digest: sha256:e20731bedb341c976e785901055d3fe23925f92abac6c834743c523cd72917e5 12 | generated: "2023-08-17T08:11:16.005693+05:30" 13 | -------------------------------------------------------------------------------- /30-Helm-Dependency-Tags/parentchart/Chart.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v2 2 | name: parentchart 3 | description: Learn Helm Dependency Concepts 4 | type: application 5 | version: 0.1.0 6 | appVersion: "1.16.0" 7 | dependencies: 8 | - name: mychart4 9 | version: "0.1.0" 10 | repository: "https://stacksimplify.github.io/helm-charts/" 11 | alias: childchart4dev 12 | #condition: childchart4dev.enabled 13 | tags: 14 | - frontend 15 | - name: mychart4 16 | version: "0.1.0" 17 | repository: "https://stacksimplify.github.io/helm-charts/" 18 | alias: childchart4qa1 19 | #condition: childchart4qa1.enabled 20 | tags: 21 | - frontend 22 | - name: mychart4 23 | version: "0.1.0" 24 | repository: "https://stacksimplify.github.io/helm-charts/" 25 | alias: childchart4qa2 26 | #condition: childchart4qa2.enabled 27 | tags: 28 | - frontend 29 | - name: mychart2 30 | version: "0.4.0" 31 | repository: "https://stacksimplify.github.io/helm-charts/" 32 | alias: childchart2 33 | #condition: childchart2.enabled 34 | tags: 35 | - backend 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /30-Helm-Dependency-Tags/parentchart/charts/mychart2-0.4.0.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stacksimplify/helm-masterclass/2c76ce8db38dc5c901b4c1901707987c1e0413c1/30-Helm-Dependency-Tags/parentchart/charts/mychart2-0.4.0.tgz -------------------------------------------------------------------------------- /30-Helm-Dependency-Tags/parentchart/charts/mychart4-0.1.0.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stacksimplify/helm-masterclass/2c76ce8db38dc5c901b4c1901707987c1e0413c1/30-Helm-Dependency-Tags/parentchart/charts/mychart4-0.1.0.tgz -------------------------------------------------------------------------------- /30-Helm-Dependency-Tags/parentchart/templates/hpa.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.autoscaling.enabled }} 2 | apiVersion: autoscaling/v2 3 | kind: HorizontalPodAutoscaler 4 | metadata: 5 | name: {{ include "parentchart.fullname" . }} 6 | labels: 7 | {{- include "parentchart.labels" . | nindent 4 }} 8 | spec: 9 | scaleTargetRef: 10 | apiVersion: apps/v1 11 | kind: Deployment 12 | name: {{ include "parentchart.fullname" . }} 13 | minReplicas: {{ .Values.autoscaling.minReplicas }} 14 | maxReplicas: {{ .Values.autoscaling.maxReplicas }} 15 | metrics: 16 | {{- if .Values.autoscaling.targetCPUUtilizationPercentage }} 17 | - type: Resource 18 | resource: 19 | name: cpu 20 | target: 21 | type: Utilization 22 | averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} 23 | {{- end }} 24 | {{- if .Values.autoscaling.targetMemoryUtilizationPercentage }} 25 | - type: Resource 26 | resource: 27 | name: memory 28 | target: 29 | type: Utilization 30 | averageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }} 31 | {{- end }} 32 | {{- end }} 33 | -------------------------------------------------------------------------------- /30-Helm-Dependency-Tags/parentchart/templates/service.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: {{ include "parentchart.fullname" . }} 5 | labels: 6 | {{- include "parentchart.labels" . | nindent 4 }} 7 | spec: 8 | type: {{ .Values.service.type }} 9 | ports: 10 | - port: {{ .Values.service.port }} 11 | targetPort: http 12 | protocol: TCP 13 | name: http 14 | selector: 15 | {{- include "parentchart.selectorLabels" . | nindent 4 }} 16 | -------------------------------------------------------------------------------- /30-Helm-Dependency-Tags/parentchart/templates/serviceaccount.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.serviceAccount.create -}} 2 | apiVersion: v1 3 | kind: ServiceAccount 4 | metadata: 5 | name: {{ include "parentchart.serviceAccountName" . }} 6 | labels: 7 | {{- include "parentchart.labels" . | nindent 4 }} 8 | {{- with .Values.serviceAccount.annotations }} 9 | annotations: 10 | {{- toYaml . | nindent 4 }} 11 | {{- end }} 12 | {{- end }} 13 | -------------------------------------------------------------------------------- /30-Helm-Dependency-Tags/parentchart/templates/tests/test-connection.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Pod 3 | metadata: 4 | name: "{{ include "parentchart.fullname" . }}-test-connection" 5 | labels: 6 | {{- include "parentchart.labels" . | nindent 4 }} 7 | annotations: 8 | "helm.sh/hook": test 9 | spec: 10 | containers: 11 | - name: wget 12 | image: busybox 13 | command: ['wget'] 14 | args: ['{{ include "parentchart.fullname" . }}:{{ .Values.service.port }}'] 15 | restartPolicy: Never 16 | -------------------------------------------------------------------------------- /31-Helm-Dependency-Override-Subchart-Values/parentchart/.helmignore: -------------------------------------------------------------------------------- 1 | # Patterns to ignore when building packages. 2 | # This supports shell glob matching, relative path matching, and 3 | # negation (prefixed with !). Only one pattern per line. 4 | .DS_Store 5 | # Common VCS dirs 6 | .git/ 7 | .gitignore 8 | .bzr/ 9 | .bzrignore 10 | .hg/ 11 | .hgignore 12 | .svn/ 13 | # Common backup files 14 | *.swp 15 | *.bak 16 | *.tmp 17 | *.orig 18 | *~ 19 | # Various IDEs 20 | .project 21 | .idea/ 22 | *.tmproj 23 | .vscode/ 24 | -------------------------------------------------------------------------------- /31-Helm-Dependency-Override-Subchart-Values/parentchart/Chart.lock: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - name: mychart4 3 | repository: https://stacksimplify.github.io/helm-charts/ 4 | version: 0.1.0 5 | - name: mychart2 6 | repository: https://stacksimplify.github.io/helm-charts/ 7 | version: 0.4.0 8 | digest: sha256:75c6de1c995d2f1cbe95ffac496378d8f44ffdedb19301713f3e4fa1e36377eb 9 | generated: "2023-08-17T04:59:21.198472+05:30" 10 | -------------------------------------------------------------------------------- /31-Helm-Dependency-Override-Subchart-Values/parentchart/Chart.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v2 2 | name: parentchart 3 | description: Learn Helm Dependency Concepts 4 | type: application 5 | version: 0.1.0 6 | appVersion: "1.16.0" 7 | dependencies: 8 | - name: mychart4 9 | version: "0.1.0" 10 | repository: "https://stacksimplify.github.io/helm-charts/" 11 | condition: mychart4.enabled 12 | - name: mychart2 13 | version: "0.4.0" 14 | repository: "https://stacksimplify.github.io/helm-charts/" 15 | condition: mychart2.enabled 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /31-Helm-Dependency-Override-Subchart-Values/parentchart/charts/mychart2-0.4.0.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stacksimplify/helm-masterclass/2c76ce8db38dc5c901b4c1901707987c1e0413c1/31-Helm-Dependency-Override-Subchart-Values/parentchart/charts/mychart2-0.4.0.tgz -------------------------------------------------------------------------------- /31-Helm-Dependency-Override-Subchart-Values/parentchart/charts/mychart4-0.1.0.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stacksimplify/helm-masterclass/2c76ce8db38dc5c901b4c1901707987c1e0413c1/31-Helm-Dependency-Override-Subchart-Values/parentchart/charts/mychart4-0.1.0.tgz -------------------------------------------------------------------------------- /31-Helm-Dependency-Override-Subchart-Values/parentchart/templates/hpa.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.autoscaling.enabled }} 2 | apiVersion: autoscaling/v2 3 | kind: HorizontalPodAutoscaler 4 | metadata: 5 | name: {{ include "parentchart.fullname" . }} 6 | labels: 7 | {{- include "parentchart.labels" . | nindent 4 }} 8 | spec: 9 | scaleTargetRef: 10 | apiVersion: apps/v1 11 | kind: Deployment 12 | name: {{ include "parentchart.fullname" . }} 13 | minReplicas: {{ .Values.autoscaling.minReplicas }} 14 | maxReplicas: {{ .Values.autoscaling.maxReplicas }} 15 | metrics: 16 | {{- if .Values.autoscaling.targetCPUUtilizationPercentage }} 17 | - type: Resource 18 | resource: 19 | name: cpu 20 | target: 21 | type: Utilization 22 | averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} 23 | {{- end }} 24 | {{- if .Values.autoscaling.targetMemoryUtilizationPercentage }} 25 | - type: Resource 26 | resource: 27 | name: memory 28 | target: 29 | type: Utilization 30 | averageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }} 31 | {{- end }} 32 | {{- end }} 33 | -------------------------------------------------------------------------------- /31-Helm-Dependency-Override-Subchart-Values/parentchart/templates/service.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: {{ include "parentchart.fullname" . }} 5 | labels: 6 | {{- include "parentchart.labels" . | nindent 4 }} 7 | spec: 8 | type: {{ .Values.service.type }} 9 | ports: 10 | - port: {{ .Values.service.port }} 11 | targetPort: http 12 | protocol: TCP 13 | name: http 14 | selector: 15 | {{- include "parentchart.selectorLabels" . | nindent 4 }} 16 | -------------------------------------------------------------------------------- /31-Helm-Dependency-Override-Subchart-Values/parentchart/templates/serviceaccount.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.serviceAccount.create -}} 2 | apiVersion: v1 3 | kind: ServiceAccount 4 | metadata: 5 | name: {{ include "parentchart.serviceAccountName" . }} 6 | labels: 7 | {{- include "parentchart.labels" . | nindent 4 }} 8 | {{- with .Values.serviceAccount.annotations }} 9 | annotations: 10 | {{- toYaml . | nindent 4 }} 11 | {{- end }} 12 | {{- end }} 13 | -------------------------------------------------------------------------------- /31-Helm-Dependency-Override-Subchart-Values/parentchart/templates/tests/test-connection.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Pod 3 | metadata: 4 | name: "{{ include "parentchart.fullname" . }}-test-connection" 5 | labels: 6 | {{- include "parentchart.labels" . | nindent 4 }} 7 | annotations: 8 | "helm.sh/hook": test 9 | spec: 10 | containers: 11 | - name: wget 12 | image: busybox 13 | command: ['wget'] 14 | args: ['{{ include "parentchart.fullname" . }}:{{ .Values.service.port }}'] 15 | restartPolicy: Never 16 | -------------------------------------------------------------------------------- /32-Helm-SubChart-Global-Values/parentchart/.helmignore: -------------------------------------------------------------------------------- 1 | # Patterns to ignore when building packages. 2 | # This supports shell glob matching, relative path matching, and 3 | # negation (prefixed with !). Only one pattern per line. 4 | .DS_Store 5 | # Common VCS dirs 6 | .git/ 7 | .gitignore 8 | .bzr/ 9 | .bzrignore 10 | .hg/ 11 | .hgignore 12 | .svn/ 13 | # Common backup files 14 | *.swp 15 | *.bak 16 | *.tmp 17 | *.orig 18 | *~ 19 | # Various IDEs 20 | .project 21 | .idea/ 22 | *.tmproj 23 | .vscode/ 24 | -------------------------------------------------------------------------------- /32-Helm-SubChart-Global-Values/parentchart/Chart.lock: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - name: mychart4 3 | repository: file://charts/mychart4 4 | version: 0.1.0 5 | - name: mychart2 6 | repository: file://charts/mychart2 7 | version: 0.4.0 8 | digest: sha256:b71e01a5d9a80888f6ad9f5db08760b679d20a6baa8dd5cf4c402159bb30cd38 9 | generated: "2023-08-17T08:41:52.917575+05:30" 10 | -------------------------------------------------------------------------------- /32-Helm-SubChart-Global-Values/parentchart/Chart.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v2 2 | name: parentchart 3 | description: Learn Helm Dependency Concepts 4 | type: application 5 | version: 0.1.0 6 | appVersion: "1.16.0" 7 | dependencies: 8 | - name: mychart4 9 | version: "0.1.0" 10 | repository: "file://charts/mychart4" 11 | alias: childchart4 12 | tags: 13 | - frontend 14 | - name: mychart2 15 | version: "0.4.0" 16 | repository: "file://charts/mychart2" 17 | alias: childchart2 18 | tags: 19 | - backend 20 | 21 | -------------------------------------------------------------------------------- /32-Helm-SubChart-Global-Values/parentchart/charts/mychart2/.helmignore: -------------------------------------------------------------------------------- 1 | # Patterns to ignore when building packages. 2 | # This supports shell glob matching, relative path matching, and 3 | # negation (prefixed with !). Only one pattern per line. 4 | .DS_Store 5 | # Common VCS dirs 6 | .git/ 7 | .gitignore 8 | .bzr/ 9 | .bzrignore 10 | .hg/ 11 | .hgignore 12 | .svn/ 13 | # Common backup files 14 | *.swp 15 | *.bak 16 | *.tmp 17 | *.orig 18 | *~ 19 | # Various IDEs 20 | .project 21 | .idea/ 22 | *.tmproj 23 | .vscode/ 24 | -------------------------------------------------------------------------------- /32-Helm-SubChart-Global-Values/parentchart/charts/mychart2/Chart.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v2 2 | appVersion: 4.0.0 3 | description: A Helm chart for Kubernetes 4 | name: mychart2 5 | type: application 6 | version: 0.4.0 7 | -------------------------------------------------------------------------------- /32-Helm-SubChart-Global-Values/parentchart/charts/mychart2/templates/deployment.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: apps/v1 2 | kind: Deployment 3 | metadata: 4 | name: {{ include "mychart2.fullname" . }} 5 | labels: 6 | {{- include "mychart2.labels" . | nindent 4 }} 7 | spec: 8 | replicas: {{ .Values.global.replicaCount }} 9 | selector: 10 | matchLabels: 11 | {{- include "mychart2.selectorLabels" . | nindent 6 }} 12 | template: 13 | metadata: 14 | {{- with .Values.podAnnotations }} 15 | annotations: 16 | {{- toYaml . | nindent 8 }} 17 | {{- end }} 18 | labels: 19 | {{- include "mychart2.selectorLabels" . | nindent 8 }} 20 | spec: 21 | containers: 22 | - name: {{ .Chart.Name }} 23 | image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" 24 | imagePullPolicy: {{ .Values.image.pullPolicy }} 25 | ports: 26 | - name: http 27 | containerPort: {{ .Values.service.port }} 28 | protocol: TCP 29 | livenessProbe: 30 | httpGet: 31 | path: / 32 | port: http 33 | readinessProbe: 34 | httpGet: 35 | path: / 36 | port: http 37 | -------------------------------------------------------------------------------- /32-Helm-SubChart-Global-Values/parentchart/charts/mychart2/templates/service.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: {{ include "mychart2.fullname" . }} 5 | labels: 6 | {{- include "mychart2.labels" . | nindent 4 }} 7 | spec: 8 | type: {{ .Values.service.type }} 9 | ports: 10 | - port: {{ .Values.service.port }} 11 | targetPort: http 12 | protocol: TCP 13 | nodePort: {{ .Values.service.nodePort }} 14 | name: http 15 | selector: 16 | {{- include "mychart2.selectorLabels" . | nindent 4 }} 17 | -------------------------------------------------------------------------------- /32-Helm-SubChart-Global-Values/parentchart/charts/mychart2/templates/tests/test-connection.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Pod 3 | metadata: 4 | name: "{{ include "mychart2.fullname" . }}-test-connection" 5 | labels: 6 | {{- include "mychart2.labels" . | nindent 4 }} 7 | annotations: 8 | "helm.sh/hook": test 9 | spec: 10 | containers: 11 | - name: wget 12 | image: busybox 13 | command: ['wget'] 14 | args: ['{{ include "mychart2.fullname" . }}:{{ .Values.service.port }}'] 15 | restartPolicy: Never 16 | -------------------------------------------------------------------------------- /32-Helm-SubChart-Global-Values/parentchart/charts/mychart2/values.yaml: -------------------------------------------------------------------------------- 1 | # This is a YAML-formatted file. 2 | # Declare variables to be passed into your templates. 3 | 4 | replicaCount: 1 5 | image: 6 | repository: ghcr.io/stacksimplify/kubenginx 7 | pullPolicy: IfNotPresent 8 | # Overrides the image tag whose default is the chart appVersion. 9 | tag: "" 10 | 11 | nameOverride: "" 12 | fullnameOverride: "" 13 | podAnnotations: {} 14 | 15 | service: 16 | type: NodePort 17 | port: 80 18 | nodePort: 31232 19 | -------------------------------------------------------------------------------- /32-Helm-SubChart-Global-Values/parentchart/charts/mychart4/.helmignore: -------------------------------------------------------------------------------- 1 | # Patterns to ignore when building packages. 2 | # This supports shell glob matching, relative path matching, and 3 | # negation (prefixed with !). Only one pattern per line. 4 | .DS_Store 5 | # Common VCS dirs 6 | .git/ 7 | .gitignore 8 | .bzr/ 9 | .bzrignore 10 | .hg/ 11 | .hgignore 12 | .svn/ 13 | # Common backup files 14 | *.swp 15 | *.bak 16 | *.tmp 17 | *.orig 18 | *~ 19 | # Various IDEs 20 | .project 21 | .idea/ 22 | *.tmproj 23 | .vscode/ 24 | -------------------------------------------------------------------------------- /32-Helm-SubChart-Global-Values/parentchart/charts/mychart4/Chart.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v2 2 | appVersion: 1.0.0 3 | description: A Helm chart for Kubernetes 4 | name: mychart4 5 | type: application 6 | version: 0.1.0 7 | -------------------------------------------------------------------------------- /32-Helm-SubChart-Global-Values/parentchart/charts/mychart4/README.md: -------------------------------------------------------------------------------- 1 | # MyChart4 Helm Chart 2 | 3 | ## Step-01: Introduction 4 | - This chart will help us in learning Helm in a detailed manner 5 | - This chart will have NodePort service configured with Dynamic Port 6 | 7 | ## Step-02: Installing the Chart 8 | - To install the chart with the release name `hub` run: 9 | ```t 10 | # Add Helm Repository 11 | $ helm repo list 12 | $ helm repo add stacksimplify https://stacksimplify.github.io/helm-charts 13 | $ helm repo list 14 | 15 | # Install Helm Chart 16 | $ helm install myapp1 stacksimplify/mycahrt4 17 | ``` 18 | 19 | ## Step-03: Verify if Helm Installed successfully 20 | ```t 21 | # Helm Status 22 | $ helm status --show-resources 23 | or 24 | # using kubectl commands 25 | kubectl get pods 26 | kubectl get svc 27 | 28 | # Access Application 29 | http://localhost: 30 | ``` 31 | 32 | ## Step-04: Uninstall the Chart 33 | ```t 34 | # Uninstall Helm Chart 35 | $ helm uninstall myapp1 36 | ``` 37 | -------------------------------------------------------------------------------- /32-Helm-SubChart-Global-Values/parentchart/charts/mychart4/templates/deployment.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: apps/v1 2 | kind: Deployment 3 | metadata: 4 | name: {{ include "mychart4.fullname" . }} 5 | labels: 6 | {{- include "mychart4.labels" . | nindent 4 }} 7 | spec: 8 | replicas: {{ .Values.global.replicaCount }} 9 | selector: 10 | matchLabels: 11 | {{- include "mychart4.selectorLabels" . | nindent 6 }} 12 | template: 13 | metadata: 14 | {{- with .Values.podAnnotations }} 15 | annotations: 16 | {{- toYaml . | nindent 8 }} 17 | {{- end }} 18 | labels: 19 | {{- include "mychart4.selectorLabels" . | nindent 8 }} 20 | spec: 21 | containers: 22 | - name: {{ .Chart.Name }} 23 | image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" 24 | imagePullPolicy: {{ .Values.image.pullPolicy }} 25 | ports: 26 | - name: http 27 | containerPort: {{ .Values.service.port }} 28 | protocol: TCP 29 | livenessProbe: 30 | httpGet: 31 | path: / 32 | port: http 33 | readinessProbe: 34 | httpGet: 35 | path: / 36 | port: http 37 | -------------------------------------------------------------------------------- /32-Helm-SubChart-Global-Values/parentchart/charts/mychart4/templates/service.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: {{ include "mychart4.fullname" . }} 5 | labels: 6 | {{- include "mychart4.labels" . | nindent 4 }} 7 | spec: 8 | type: {{ .Values.service.type }} 9 | ports: 10 | - port: {{ .Values.service.port }} 11 | targetPort: http 12 | protocol: TCP 13 | name: http 14 | selector: 15 | {{- include "mychart4.selectorLabels" . | nindent 4 }} 16 | -------------------------------------------------------------------------------- /32-Helm-SubChart-Global-Values/parentchart/charts/mychart4/templates/tests/test-connection.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Pod 3 | metadata: 4 | name: "{{ include "mychart4.fullname" . }}-test-connection" 5 | labels: 6 | {{- include "mychart4.labels" . | nindent 4 }} 7 | annotations: 8 | "helm.sh/hook": test 9 | spec: 10 | containers: 11 | - name: wget 12 | image: busybox 13 | command: ['wget'] 14 | args: ['{{ include "mychart4.fullname" . }}:{{ .Values.service.port }}'] 15 | restartPolicy: Never 16 | -------------------------------------------------------------------------------- /32-Helm-SubChart-Global-Values/parentchart/charts/mychart4/values.yaml: -------------------------------------------------------------------------------- 1 | # This is a YAML-formatted file. 2 | # Declare variables to be passed into your templates. 3 | 4 | replicaCount: 1 5 | image: 6 | repository: ghcr.io/stacksimplify/kubenginx 7 | pullPolicy: IfNotPresent 8 | # Overrides the image tag whose default is the chart appVersion. 9 | tag: "" 10 | 11 | nameOverride: "" 12 | fullnameOverride: "" 13 | podAnnotations: {} 14 | 15 | service: 16 | type: NodePort 17 | port: 80 -------------------------------------------------------------------------------- /32-Helm-SubChart-Global-Values/parentchart/templates/hpa.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.autoscaling.enabled }} 2 | apiVersion: autoscaling/v2 3 | kind: HorizontalPodAutoscaler 4 | metadata: 5 | name: {{ include "parentchart.fullname" . }} 6 | labels: 7 | {{- include "parentchart.labels" . | nindent 4 }} 8 | spec: 9 | scaleTargetRef: 10 | apiVersion: apps/v1 11 | kind: Deployment 12 | name: {{ include "parentchart.fullname" . }} 13 | minReplicas: {{ .Values.autoscaling.minReplicas }} 14 | maxReplicas: {{ .Values.autoscaling.maxReplicas }} 15 | metrics: 16 | {{- if .Values.autoscaling.targetCPUUtilizationPercentage }} 17 | - type: Resource 18 | resource: 19 | name: cpu 20 | target: 21 | type: Utilization 22 | averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} 23 | {{- end }} 24 | {{- if .Values.autoscaling.targetMemoryUtilizationPercentage }} 25 | - type: Resource 26 | resource: 27 | name: memory 28 | target: 29 | type: Utilization 30 | averageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }} 31 | {{- end }} 32 | {{- end }} 33 | -------------------------------------------------------------------------------- /32-Helm-SubChart-Global-Values/parentchart/templates/service.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: {{ include "parentchart.fullname" . }} 5 | labels: 6 | {{- include "parentchart.labels" . | nindent 4 }} 7 | spec: 8 | type: {{ .Values.service.type }} 9 | ports: 10 | - port: {{ .Values.service.port }} 11 | targetPort: http 12 | protocol: TCP 13 | name: http 14 | selector: 15 | {{- include "parentchart.selectorLabels" . | nindent 4 }} 16 | -------------------------------------------------------------------------------- /32-Helm-SubChart-Global-Values/parentchart/templates/serviceaccount.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.serviceAccount.create -}} 2 | apiVersion: v1 3 | kind: ServiceAccount 4 | metadata: 5 | name: {{ include "parentchart.serviceAccountName" . }} 6 | labels: 7 | {{- include "parentchart.labels" . | nindent 4 }} 8 | {{- with .Values.serviceAccount.annotations }} 9 | annotations: 10 | {{- toYaml . | nindent 4 }} 11 | {{- end }} 12 | {{- end }} 13 | -------------------------------------------------------------------------------- /32-Helm-SubChart-Global-Values/parentchart/templates/tests/test-connection.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Pod 3 | metadata: 4 | name: "{{ include "parentchart.fullname" . }}-test-connection" 5 | labels: 6 | {{- include "parentchart.labels" . | nindent 4 }} 7 | annotations: 8 | "helm.sh/hook": test 9 | spec: 10 | containers: 11 | - name: wget 12 | image: busybox 13 | command: ['wget'] 14 | args: ['{{ include "parentchart.fullname" . }}:{{ .Values.service.port }}'] 15 | restartPolicy: Never 16 | -------------------------------------------------------------------------------- /33-Helm-Dependency-Import-Values-Explicit/parentchart/.helmignore: -------------------------------------------------------------------------------- 1 | # Patterns to ignore when building packages. 2 | # This supports shell glob matching, relative path matching, and 3 | # negation (prefixed with !). Only one pattern per line. 4 | .DS_Store 5 | # Common VCS dirs 6 | .git/ 7 | .gitignore 8 | .bzr/ 9 | .bzrignore 10 | .hg/ 11 | .hgignore 12 | .svn/ 13 | # Common backup files 14 | *.swp 15 | *.bak 16 | *.tmp 17 | *.orig 18 | *~ 19 | # Various IDEs 20 | .project 21 | .idea/ 22 | *.tmproj 23 | .vscode/ 24 | -------------------------------------------------------------------------------- /33-Helm-Dependency-Import-Values-Explicit/parentchart/Chart.lock: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - name: mychart1 3 | repository: file://charts/mychart1 4 | version: 0.1.0 5 | - name: mychart2 6 | repository: file://charts/mychart2 7 | version: 0.4.0 8 | digest: sha256:f54663d6ef7b091da79b562f4e2c56028596d74013d5f8b881c1a0315827339b 9 | generated: "2023-07-27T18:20:01.548078+05:30" 10 | -------------------------------------------------------------------------------- /33-Helm-Dependency-Import-Values-Explicit/parentchart/Chart.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v2 2 | name: parentchart 3 | description: Learn Helm Dependency Concepts 4 | type: application 5 | version: 0.1.0 6 | appVersion: "1.16.0" 7 | dependencies: 8 | - name: mychart1 9 | version: "0.1.0" 10 | repository: "file://charts/mychart1" 11 | alias: childchart1 12 | tags: 13 | - frontend 14 | import-values: 15 | - mychart1Data # Import Values Explicit 16 | - name: mychart2 17 | version: "0.4.0" 18 | repository: "file://charts/mychart2" 19 | alias: childchart2 20 | tags: 21 | - backend 22 | -------------------------------------------------------------------------------- /33-Helm-Dependency-Import-Values-Explicit/parentchart/charts/mychart1/.helmignore: -------------------------------------------------------------------------------- 1 | # Patterns to ignore when building packages. 2 | # This supports shell glob matching, relative path matching, and 3 | # negation (prefixed with !). Only one pattern per line. 4 | .DS_Store 5 | # Common VCS dirs 6 | .git/ 7 | .gitignore 8 | .bzr/ 9 | .bzrignore 10 | .hg/ 11 | .hgignore 12 | .svn/ 13 | # Common backup files 14 | *.swp 15 | *.bak 16 | *.tmp 17 | *.orig 18 | *~ 19 | # Various IDEs 20 | .project 21 | .idea/ 22 | *.tmproj 23 | .vscode/ 24 | -------------------------------------------------------------------------------- /33-Helm-Dependency-Import-Values-Explicit/parentchart/charts/mychart1/Chart.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v2 2 | appVersion: 1.0.0 3 | description: A Helm chart for Kubernetes 4 | name: mychart1 5 | type: application 6 | version: 0.1.0 7 | -------------------------------------------------------------------------------- /33-Helm-Dependency-Import-Values-Explicit/parentchart/charts/mychart1/README.md: -------------------------------------------------------------------------------- 1 | # MyChart1 Helm Chart 2 | 3 | ## Step-01: Introduction 4 | - This chart will help us in learning Helm in a detailed manner 5 | 6 | ## Step-02: Installing the Chart 7 | - To install the chart with the release name `hub` run: 8 | ```t 9 | # Add Helm Repository 10 | $ helm repo list 11 | $ helm repo add stacksimplify https://stacksimplify.github.io/helm-charts 12 | $ helm repo list 13 | 14 | # Install Helm Chart 15 | $ helm install myapp1 stacksimplify/mycahrt1 16 | ``` 17 | 18 | ## Step-03: Verify if Helm Installed successfully 19 | ```t 20 | # Helm Status 21 | $ helm status --show-resources 22 | or 23 | # using kubectl commands 24 | kubectl get pods 25 | kubectl get svc 26 | 27 | # Access Application 28 | http://localhost:31231 29 | ``` 30 | 31 | ## Step-04: Uninstall the Chart 32 | ```t 33 | # Uninstall Helm Chart 34 | $ helm uninstall myapp1 35 | ``` 36 | -------------------------------------------------------------------------------- /33-Helm-Dependency-Import-Values-Explicit/parentchart/charts/mychart1/templates/deployment.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: apps/v1 2 | kind: Deployment 3 | metadata: 4 | name: {{ include "mychart1.fullname" . }} 5 | labels: 6 | {{- include "mychart1.labels" . | nindent 4 }} 7 | spec: 8 | replicas: {{ .Values.global.replicaCount }} 9 | selector: 10 | matchLabels: 11 | {{- include "mychart1.selectorLabels" . | nindent 6 }} 12 | template: 13 | metadata: 14 | {{- with .Values.podAnnotations }} 15 | annotations: 16 | {{- toYaml . | nindent 8 }} 17 | {{- end }} 18 | labels: 19 | {{- include "mychart1.selectorLabels" . | nindent 8 }} 20 | spec: 21 | containers: 22 | - name: {{ .Chart.Name }} 23 | image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" 24 | imagePullPolicy: {{ .Values.image.pullPolicy }} 25 | ports: 26 | - name: http 27 | containerPort: {{ .Values.service.port }} 28 | protocol: TCP 29 | livenessProbe: 30 | httpGet: 31 | path: / 32 | port: http 33 | readinessProbe: 34 | httpGet: 35 | path: / 36 | port: http 37 | -------------------------------------------------------------------------------- /33-Helm-Dependency-Import-Values-Explicit/parentchart/charts/mychart1/templates/service.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: {{ include "mychart1.fullname" . }} 5 | labels: 6 | {{- include "mychart1.labels" . | nindent 4 }} 7 | spec: 8 | type: {{ .Values.service.type }} 9 | ports: 10 | - port: {{ .Values.service.port }} 11 | targetPort: http 12 | protocol: TCP 13 | nodePort: {{ .Values.service.nodePort }} 14 | name: http 15 | selector: 16 | {{- include "mychart1.selectorLabels" . | nindent 4 }} 17 | -------------------------------------------------------------------------------- /33-Helm-Dependency-Import-Values-Explicit/parentchart/charts/mychart1/templates/tests/test-connection.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Pod 3 | metadata: 4 | name: "{{ include "mychart1.fullname" . }}-test-connection" 5 | labels: 6 | {{- include "mychart1.labels" . | nindent 4 }} 7 | annotations: 8 | "helm.sh/hook": test 9 | spec: 10 | containers: 11 | - name: wget 12 | image: busybox 13 | command: ['wget'] 14 | args: ['{{ include "mychart1.fullname" . }}:{{ .Values.service.port }}'] 15 | restartPolicy: Never 16 | -------------------------------------------------------------------------------- /33-Helm-Dependency-Import-Values-Explicit/parentchart/charts/mychart1/values.yaml: -------------------------------------------------------------------------------- 1 | # This is a YAML-formatted file. 2 | # Declare variables to be passed into your templates. 3 | 4 | replicaCount: 1 5 | image: 6 | repository: ghcr.io/stacksimplify/kubenginx 7 | pullPolicy: IfNotPresent 8 | # Overrides the image tag whose default is the chart appVersion. 9 | tag: "" 10 | 11 | nameOverride: "" 12 | fullnameOverride: "" 13 | podAnnotations: {} 14 | 15 | service: 16 | type: NodePort 17 | port: 80 18 | nodePort: 31231 19 | 20 | # Export Values - MyChart1 (Used for Import Values Explicit Usecase) 21 | exports: 22 | mychart1Data: 23 | mychart1appInfo: 24 | appName: kapp1 25 | appType: MicroService 26 | appDescription: Used for listing products 27 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /33-Helm-Dependency-Import-Values-Explicit/parentchart/charts/mychart2/.helmignore: -------------------------------------------------------------------------------- 1 | # Patterns to ignore when building packages. 2 | # This supports shell glob matching, relative path matching, and 3 | # negation (prefixed with !). Only one pattern per line. 4 | .DS_Store 5 | # Common VCS dirs 6 | .git/ 7 | .gitignore 8 | .bzr/ 9 | .bzrignore 10 | .hg/ 11 | .hgignore 12 | .svn/ 13 | # Common backup files 14 | *.swp 15 | *.bak 16 | *.tmp 17 | *.orig 18 | *~ 19 | # Various IDEs 20 | .project 21 | .idea/ 22 | *.tmproj 23 | .vscode/ 24 | -------------------------------------------------------------------------------- /33-Helm-Dependency-Import-Values-Explicit/parentchart/charts/mychart2/Chart.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v2 2 | appVersion: 4.0.0 3 | description: A Helm chart for Kubernetes 4 | name: mychart2 5 | type: application 6 | version: 0.4.0 7 | -------------------------------------------------------------------------------- /33-Helm-Dependency-Import-Values-Explicit/parentchart/charts/mychart2/templates/deployment.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: apps/v1 2 | kind: Deployment 3 | metadata: 4 | name: {{ include "mychart2.fullname" . }} 5 | labels: 6 | {{- include "mychart2.labels" . | nindent 4 }} 7 | spec: 8 | replicas: {{ .Values.global.replicaCount }} 9 | selector: 10 | matchLabels: 11 | {{- include "mychart2.selectorLabels" . | nindent 6 }} 12 | template: 13 | metadata: 14 | {{- with .Values.podAnnotations }} 15 | annotations: 16 | {{- toYaml . | nindent 8 }} 17 | {{- end }} 18 | labels: 19 | {{- include "mychart2.selectorLabels" . | nindent 8 }} 20 | spec: 21 | containers: 22 | - name: {{ .Chart.Name }} 23 | image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" 24 | imagePullPolicy: {{ .Values.image.pullPolicy }} 25 | ports: 26 | - name: http 27 | containerPort: {{ .Values.service.port }} 28 | protocol: TCP 29 | livenessProbe: 30 | httpGet: 31 | path: / 32 | port: http 33 | readinessProbe: 34 | httpGet: 35 | path: / 36 | port: http 37 | -------------------------------------------------------------------------------- /33-Helm-Dependency-Import-Values-Explicit/parentchart/charts/mychart2/templates/service.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: {{ include "mychart2.fullname" . }} 5 | labels: 6 | {{- include "mychart2.labels" . | nindent 4 }} 7 | spec: 8 | type: {{ .Values.service.type }} 9 | ports: 10 | - port: {{ .Values.service.port }} 11 | targetPort: http 12 | protocol: TCP 13 | nodePort: {{ .Values.service.nodePort }} 14 | name: http 15 | selector: 16 | {{- include "mychart2.selectorLabels" . | nindent 4 }} 17 | -------------------------------------------------------------------------------- /33-Helm-Dependency-Import-Values-Explicit/parentchart/charts/mychart2/templates/tests/test-connection.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Pod 3 | metadata: 4 | name: "{{ include "mychart2.fullname" . }}-test-connection" 5 | labels: 6 | {{- include "mychart2.labels" . | nindent 4 }} 7 | annotations: 8 | "helm.sh/hook": test 9 | spec: 10 | containers: 11 | - name: wget 12 | image: busybox 13 | command: ['wget'] 14 | args: ['{{ include "mychart2.fullname" . }}:{{ .Values.service.port }}'] 15 | restartPolicy: Never 16 | -------------------------------------------------------------------------------- /33-Helm-Dependency-Import-Values-Explicit/parentchart/charts/mychart2/values.yaml: -------------------------------------------------------------------------------- 1 | # This is a YAML-formatted file. 2 | # Declare variables to be passed into your templates. 3 | 4 | replicaCount: 1 5 | image: 6 | repository: ghcr.io/stacksimplify/kubenginx 7 | pullPolicy: IfNotPresent 8 | # Overrides the image tag whose default is the chart appVersion. 9 | tag: "" 10 | 11 | nameOverride: "" 12 | fullnameOverride: "" 13 | podAnnotations: {} 14 | 15 | # Using for testing Import Values Implicit Usecase 16 | 17 | service: 18 | type: NodePort 19 | port: 80 20 | nodePort: 31232 21 | -------------------------------------------------------------------------------- /33-Helm-Dependency-Import-Values-Explicit/parentchart/templates/configmap.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: ConfigMap 3 | metadata: 4 | name: {{ include "parentchart.fullname" . }}-import-explicit 5 | data: 6 | {{- toYaml .Values.mychart1appInfo | nindent 2 }} -------------------------------------------------------------------------------- /33-Helm-Dependency-Import-Values-Explicit/parentchart/templates/hpa.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.autoscaling.enabled }} 2 | apiVersion: autoscaling/v2 3 | kind: HorizontalPodAutoscaler 4 | metadata: 5 | name: {{ include "parentchart.fullname" . }} 6 | labels: 7 | {{- include "parentchart.labels" . | nindent 4 }} 8 | spec: 9 | scaleTargetRef: 10 | apiVersion: apps/v1 11 | kind: Deployment 12 | name: {{ include "parentchart.fullname" . }} 13 | minReplicas: {{ .Values.autoscaling.minReplicas }} 14 | maxReplicas: {{ .Values.autoscaling.maxReplicas }} 15 | metrics: 16 | {{- if .Values.autoscaling.targetCPUUtilizationPercentage }} 17 | - type: Resource 18 | resource: 19 | name: cpu 20 | target: 21 | type: Utilization 22 | averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} 23 | {{- end }} 24 | {{- if .Values.autoscaling.targetMemoryUtilizationPercentage }} 25 | - type: Resource 26 | resource: 27 | name: memory 28 | target: 29 | type: Utilization 30 | averageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }} 31 | {{- end }} 32 | {{- end }} 33 | -------------------------------------------------------------------------------- /33-Helm-Dependency-Import-Values-Explicit/parentchart/templates/service.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: {{ include "parentchart.fullname" . }} 5 | labels: 6 | {{- include "parentchart.labels" . | nindent 4 }} 7 | spec: 8 | type: {{ .Values.service.type }} 9 | ports: 10 | - port: {{ .Values.service.port }} 11 | targetPort: http 12 | protocol: TCP 13 | name: http 14 | selector: 15 | {{- include "parentchart.selectorLabels" . | nindent 4 }} 16 | -------------------------------------------------------------------------------- /33-Helm-Dependency-Import-Values-Explicit/parentchart/templates/serviceaccount.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.serviceAccount.create -}} 2 | apiVersion: v1 3 | kind: ServiceAccount 4 | metadata: 5 | name: {{ include "parentchart.serviceAccountName" . }} 6 | labels: 7 | {{- include "parentchart.labels" . | nindent 4 }} 8 | {{- with .Values.serviceAccount.annotations }} 9 | annotations: 10 | {{- toYaml . | nindent 4 }} 11 | {{- end }} 12 | {{- end }} 13 | -------------------------------------------------------------------------------- /33-Helm-Dependency-Import-Values-Explicit/parentchart/templates/tests/test-connection.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Pod 3 | metadata: 4 | name: "{{ include "parentchart.fullname" . }}-test-connection" 5 | labels: 6 | {{- include "parentchart.labels" . | nindent 4 }} 7 | annotations: 8 | "helm.sh/hook": test 9 | spec: 10 | containers: 11 | - name: wget 12 | image: busybox 13 | command: ['wget'] 14 | args: ['{{ include "parentchart.fullname" . }}:{{ .Values.service.port }}'] 15 | restartPolicy: Never 16 | -------------------------------------------------------------------------------- /34-Helm-Dependency-Import-Values-Implicit/parentchart/.helmignore: -------------------------------------------------------------------------------- 1 | # Patterns to ignore when building packages. 2 | # This supports shell glob matching, relative path matching, and 3 | # negation (prefixed with !). Only one pattern per line. 4 | .DS_Store 5 | # Common VCS dirs 6 | .git/ 7 | .gitignore 8 | .bzr/ 9 | .bzrignore 10 | .hg/ 11 | .hgignore 12 | .svn/ 13 | # Common backup files 14 | *.swp 15 | *.bak 16 | *.tmp 17 | *.orig 18 | *~ 19 | # Various IDEs 20 | .project 21 | .idea/ 22 | *.tmproj 23 | .vscode/ 24 | -------------------------------------------------------------------------------- /34-Helm-Dependency-Import-Values-Implicit/parentchart/Chart.lock: -------------------------------------------------------------------------------- 1 | dependencies: 2 | - name: mychart1 3 | repository: file://charts/mychart1 4 | version: 0.1.0 5 | - name: mychart2 6 | repository: file://charts/mychart2 7 | version: 0.4.0 8 | digest: sha256:52aded035184cd4cbd06c56158c6158c0fcf1833983bc81ba5713559922daae9 9 | generated: "2023-08-01T14:12:03.194907+05:30" 10 | -------------------------------------------------------------------------------- /34-Helm-Dependency-Import-Values-Implicit/parentchart/Chart.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v2 2 | name: parentchart 3 | description: Learn Helm Dependency Concepts 4 | type: application 5 | version: 0.1.0 6 | appVersion: "1.16.0" 7 | dependencies: 8 | - name: mychart1 9 | version: "0.1.0" 10 | repository: "file://charts/mychart1" 11 | alias: childchart1 12 | tags: 13 | - frontend 14 | - name: mychart2 15 | version: "0.4.0" 16 | repository: "file://charts/mychart2" 17 | alias: childchart2 18 | tags: 19 | - backend 20 | import-values: # Implicit Values Usecase 21 | - child: service 22 | parent: mychart2service 23 | - child: image 24 | parent: mychart2image 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /34-Helm-Dependency-Import-Values-Implicit/parentchart/charts/mychart1-0.1.0.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stacksimplify/helm-masterclass/2c76ce8db38dc5c901b4c1901707987c1e0413c1/34-Helm-Dependency-Import-Values-Implicit/parentchart/charts/mychart1-0.1.0.tgz -------------------------------------------------------------------------------- /34-Helm-Dependency-Import-Values-Implicit/parentchart/charts/mychart1/.helmignore: -------------------------------------------------------------------------------- 1 | # Patterns to ignore when building packages. 2 | # This supports shell glob matching, relative path matching, and 3 | # negation (prefixed with !). Only one pattern per line. 4 | .DS_Store 5 | # Common VCS dirs 6 | .git/ 7 | .gitignore 8 | .bzr/ 9 | .bzrignore 10 | .hg/ 11 | .hgignore 12 | .svn/ 13 | # Common backup files 14 | *.swp 15 | *.bak 16 | *.tmp 17 | *.orig 18 | *~ 19 | # Various IDEs 20 | .project 21 | .idea/ 22 | *.tmproj 23 | .vscode/ 24 | -------------------------------------------------------------------------------- /34-Helm-Dependency-Import-Values-Implicit/parentchart/charts/mychart1/Chart.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v2 2 | appVersion: 1.0.0 3 | description: A Helm chart for Kubernetes 4 | name: mychart1 5 | type: application 6 | version: 0.1.0 7 | -------------------------------------------------------------------------------- /34-Helm-Dependency-Import-Values-Implicit/parentchart/charts/mychart1/README.md: -------------------------------------------------------------------------------- 1 | # MyChart1 Helm Chart 2 | 3 | ## Step-01: Introduction 4 | - This chart will help us in learning Helm in a detailed manner 5 | 6 | ## Step-02: Installing the Chart 7 | - To install the chart with the release name `hub` run: 8 | ```t 9 | # Add Helm Repository 10 | $ helm repo list 11 | $ helm repo add stacksimplify https://stacksimplify.github.io/helm-charts 12 | $ helm repo list 13 | 14 | # Install Helm Chart 15 | $ helm install myapp1 stacksimplify/mycahrt1 16 | ``` 17 | 18 | ## Step-03: Verify if Helm Installed successfully 19 | ```t 20 | # Helm Status 21 | $ helm status --show-resources 22 | or 23 | # using kubectl commands 24 | kubectl get pods 25 | kubectl get svc 26 | 27 | # Access Application 28 | http://localhost:31231 29 | ``` 30 | 31 | ## Step-04: Uninstall the Chart 32 | ```t 33 | # Uninstall Helm Chart 34 | $ helm uninstall myapp1 35 | ``` 36 | -------------------------------------------------------------------------------- /34-Helm-Dependency-Import-Values-Implicit/parentchart/charts/mychart1/templates/deployment.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: apps/v1 2 | kind: Deployment 3 | metadata: 4 | name: {{ include "mychart1.fullname" . }} 5 | labels: 6 | {{- include "mychart1.labels" . | nindent 4 }} 7 | spec: 8 | replicas: {{ .Values.global.replicaCount }} 9 | selector: 10 | matchLabels: 11 | {{- include "mychart1.selectorLabels" . | nindent 6 }} 12 | template: 13 | metadata: 14 | {{- with .Values.podAnnotations }} 15 | annotations: 16 | {{- toYaml . | nindent 8 }} 17 | {{- end }} 18 | labels: 19 | {{- include "mychart1.selectorLabels" . | nindent 8 }} 20 | spec: 21 | containers: 22 | - name: {{ .Chart.Name }} 23 | image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" 24 | imagePullPolicy: {{ .Values.image.pullPolicy }} 25 | ports: 26 | - name: http 27 | containerPort: {{ .Values.service.port }} 28 | protocol: TCP 29 | livenessProbe: 30 | httpGet: 31 | path: / 32 | port: http 33 | readinessProbe: 34 | httpGet: 35 | path: / 36 | port: http 37 | -------------------------------------------------------------------------------- /34-Helm-Dependency-Import-Values-Implicit/parentchart/charts/mychart1/templates/service.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: {{ include "mychart1.fullname" . }} 5 | labels: 6 | {{- include "mychart1.labels" . | nindent 4 }} 7 | spec: 8 | type: {{ .Values.service.type }} 9 | ports: 10 | - port: {{ .Values.service.port }} 11 | targetPort: http 12 | protocol: TCP 13 | nodePort: {{ .Values.service.nodePort }} 14 | name: http 15 | selector: 16 | {{- include "mychart1.selectorLabels" . | nindent 4 }} 17 | -------------------------------------------------------------------------------- /34-Helm-Dependency-Import-Values-Implicit/parentchart/charts/mychart1/templates/tests/test-connection.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Pod 3 | metadata: 4 | name: "{{ include "mychart1.fullname" . }}-test-connection" 5 | labels: 6 | {{- include "mychart1.labels" . | nindent 4 }} 7 | annotations: 8 | "helm.sh/hook": test 9 | spec: 10 | containers: 11 | - name: wget 12 | image: busybox 13 | command: ['wget'] 14 | args: ['{{ include "mychart1.fullname" . }}:{{ .Values.service.port }}'] 15 | restartPolicy: Never 16 | -------------------------------------------------------------------------------- /34-Helm-Dependency-Import-Values-Implicit/parentchart/charts/mychart1/values.yaml: -------------------------------------------------------------------------------- 1 | # This is a YAML-formatted file. 2 | # Declare variables to be passed into your templates. 3 | 4 | replicaCount: 1 5 | image: 6 | repository: ghcr.io/stacksimplify/kubenginx 7 | pullPolicy: IfNotPresent 8 | # Overrides the image tag whose default is the chart appVersion. 9 | tag: "" 10 | 11 | nameOverride: "" 12 | fullnameOverride: "" 13 | podAnnotations: {} 14 | 15 | service: 16 | type: NodePort 17 | port: 80 18 | nodePort: 31231 19 | 20 | # Export Values - MyChart1 (Used for Import Values Explicit Usecase) 21 | exports: 22 | mychart1Data: 23 | mychart1appInfo: 24 | appName: kapp1 25 | appType: MicroService 26 | appDescription: Used for listing products 27 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /34-Helm-Dependency-Import-Values-Implicit/parentchart/charts/mychart2-0.4.0.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stacksimplify/helm-masterclass/2c76ce8db38dc5c901b4c1901707987c1e0413c1/34-Helm-Dependency-Import-Values-Implicit/parentchart/charts/mychart2-0.4.0.tgz -------------------------------------------------------------------------------- /34-Helm-Dependency-Import-Values-Implicit/parentchart/charts/mychart2/.helmignore: -------------------------------------------------------------------------------- 1 | # Patterns to ignore when building packages. 2 | # This supports shell glob matching, relative path matching, and 3 | # negation (prefixed with !). Only one pattern per line. 4 | .DS_Store 5 | # Common VCS dirs 6 | .git/ 7 | .gitignore 8 | .bzr/ 9 | .bzrignore 10 | .hg/ 11 | .hgignore 12 | .svn/ 13 | # Common backup files 14 | *.swp 15 | *.bak 16 | *.tmp 17 | *.orig 18 | *~ 19 | # Various IDEs 20 | .project 21 | .idea/ 22 | *.tmproj 23 | .vscode/ 24 | -------------------------------------------------------------------------------- /34-Helm-Dependency-Import-Values-Implicit/parentchart/charts/mychart2/Chart.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v2 2 | appVersion: 4.0.0 3 | description: A Helm chart for Kubernetes 4 | name: mychart2 5 | type: application 6 | version: 0.4.0 7 | -------------------------------------------------------------------------------- /34-Helm-Dependency-Import-Values-Implicit/parentchart/charts/mychart2/templates/deployment.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: apps/v1 2 | kind: Deployment 3 | metadata: 4 | name: {{ include "mychart2.fullname" . }} 5 | labels: 6 | {{- include "mychart2.labels" . | nindent 4 }} 7 | spec: 8 | replicas: {{ .Values.global.replicaCount }} 9 | selector: 10 | matchLabels: 11 | {{- include "mychart2.selectorLabels" . | nindent 6 }} 12 | template: 13 | metadata: 14 | {{- with .Values.podAnnotations }} 15 | annotations: 16 | {{- toYaml . | nindent 8 }} 17 | {{- end }} 18 | labels: 19 | {{- include "mychart2.selectorLabels" . | nindent 8 }} 20 | spec: 21 | containers: 22 | - name: {{ .Chart.Name }} 23 | image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" 24 | imagePullPolicy: {{ .Values.image.pullPolicy }} 25 | ports: 26 | - name: http 27 | containerPort: {{ .Values.service.port }} 28 | protocol: TCP 29 | livenessProbe: 30 | httpGet: 31 | path: / 32 | port: http 33 | readinessProbe: 34 | httpGet: 35 | path: / 36 | port: http 37 | -------------------------------------------------------------------------------- /34-Helm-Dependency-Import-Values-Implicit/parentchart/charts/mychart2/templates/service.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: {{ include "mychart2.fullname" . }} 5 | labels: 6 | {{- include "mychart2.labels" . | nindent 4 }} 7 | spec: 8 | type: {{ .Values.service.type }} 9 | ports: 10 | - port: {{ .Values.service.port }} 11 | targetPort: http 12 | protocol: TCP 13 | nodePort: {{ .Values.service.nodePort }} 14 | name: http 15 | selector: 16 | {{- include "mychart2.selectorLabels" . | nindent 4 }} 17 | -------------------------------------------------------------------------------- /34-Helm-Dependency-Import-Values-Implicit/parentchart/charts/mychart2/templates/tests/test-connection.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Pod 3 | metadata: 4 | name: "{{ include "mychart2.fullname" . }}-test-connection" 5 | labels: 6 | {{- include "mychart2.labels" . | nindent 4 }} 7 | annotations: 8 | "helm.sh/hook": test 9 | spec: 10 | containers: 11 | - name: wget 12 | image: busybox 13 | command: ['wget'] 14 | args: ['{{ include "mychart2.fullname" . }}:{{ .Values.service.port }}'] 15 | restartPolicy: Never 16 | -------------------------------------------------------------------------------- /34-Helm-Dependency-Import-Values-Implicit/parentchart/charts/mychart2/values.yaml: -------------------------------------------------------------------------------- 1 | # This is a YAML-formatted file. 2 | # Declare variables to be passed into your templates. 3 | 4 | replicaCount: 1 5 | image: 6 | repository: ghcr.io/stacksimplify/kubenginx 7 | pullPolicy: IfNotPresent 8 | # Overrides the image tag whose default is the chart appVersion. 9 | tag: "" 10 | 11 | nameOverride: "" 12 | fullnameOverride: "" 13 | podAnnotations: {} 14 | 15 | # Using for testing Import Values Implicit Usecase 16 | 17 | service: 18 | type: NodePort 19 | port: 80 20 | nodePort: 31232 21 | -------------------------------------------------------------------------------- /34-Helm-Dependency-Import-Values-Implicit/parentchart/templates/configmap.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: ConfigMap 3 | metadata: 4 | name: {{ include "parentchart.fullname" . }}-import-implicit 5 | data: 6 | serviceType: {{ .Values.mychart2service.type }} 7 | servicePort: {{ .Values.mychart2service.port | quote}} 8 | servicenodePort: {{ .Values.mychart2service.nodePort | quote }} 9 | imageRepository: {{ .Values.mychart2image.repository }} -------------------------------------------------------------------------------- /34-Helm-Dependency-Import-Values-Implicit/parentchart/templates/hpa.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.autoscaling.enabled }} 2 | apiVersion: autoscaling/v2 3 | kind: HorizontalPodAutoscaler 4 | metadata: 5 | name: {{ include "parentchart.fullname" . }} 6 | labels: 7 | {{- include "parentchart.labels" . | nindent 4 }} 8 | spec: 9 | scaleTargetRef: 10 | apiVersion: apps/v1 11 | kind: Deployment 12 | name: {{ include "parentchart.fullname" . }} 13 | minReplicas: {{ .Values.autoscaling.minReplicas }} 14 | maxReplicas: {{ .Values.autoscaling.maxReplicas }} 15 | metrics: 16 | {{- if .Values.autoscaling.targetCPUUtilizationPercentage }} 17 | - type: Resource 18 | resource: 19 | name: cpu 20 | target: 21 | type: Utilization 22 | averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} 23 | {{- end }} 24 | {{- if .Values.autoscaling.targetMemoryUtilizationPercentage }} 25 | - type: Resource 26 | resource: 27 | name: memory 28 | target: 29 | type: Utilization 30 | averageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }} 31 | {{- end }} 32 | {{- end }} 33 | -------------------------------------------------------------------------------- /34-Helm-Dependency-Import-Values-Implicit/parentchart/templates/service.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: {{ include "parentchart.fullname" . }} 5 | labels: 6 | {{- include "parentchart.labels" . | nindent 4 }} 7 | spec: 8 | type: {{ .Values.service.type }} 9 | ports: 10 | - port: {{ .Values.service.port }} 11 | targetPort: http 12 | protocol: TCP 13 | name: http 14 | selector: 15 | {{- include "parentchart.selectorLabels" . | nindent 4 }} 16 | -------------------------------------------------------------------------------- /34-Helm-Dependency-Import-Values-Implicit/parentchart/templates/serviceaccount.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.serviceAccount.create -}} 2 | apiVersion: v1 3 | kind: ServiceAccount 4 | metadata: 5 | name: {{ include "parentchart.serviceAccountName" . }} 6 | labels: 7 | {{- include "parentchart.labels" . | nindent 4 }} 8 | {{- with .Values.serviceAccount.annotations }} 9 | annotations: 10 | {{- toYaml . | nindent 4 }} 11 | {{- end }} 12 | {{- end }} 13 | -------------------------------------------------------------------------------- /34-Helm-Dependency-Import-Values-Implicit/parentchart/templates/tests/test-connection.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Pod 3 | metadata: 4 | name: "{{ include "parentchart.fullname" . }}-test-connection" 5 | labels: 6 | {{- include "parentchart.labels" . | nindent 4 }} 7 | annotations: 8 | "helm.sh/hook": test 9 | spec: 10 | containers: 11 | - name: wget 12 | image: busybox 13 | command: ['wget'] 14 | args: ['{{ include "parentchart.fullname" . }}:{{ .Values.service.port }}'] 15 | restartPolicy: Never 16 | -------------------------------------------------------------------------------- /35-Helm-Starters/MYCHARTS/mychart9/.helmignore: -------------------------------------------------------------------------------- 1 | # Patterns to ignore when building packages. 2 | # This supports shell glob matching, relative path matching, and 3 | # negation (prefixed with !). Only one pattern per line. 4 | .DS_Store 5 | # Common VCS dirs 6 | .git/ 7 | .gitignore 8 | .bzr/ 9 | .bzrignore 10 | .hg/ 11 | .hgignore 12 | .svn/ 13 | # Common backup files 14 | *.swp 15 | *.bak 16 | *.tmp 17 | *.orig 18 | *~ 19 | # Various IDEs 20 | .project 21 | .idea/ 22 | *.tmproj 23 | .vscode/ 24 | -------------------------------------------------------------------------------- /35-Helm-Starters/MYCHARTS/mychart9/Chart.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v2 2 | appVersion: "0.3.0" 3 | description: A Helm chart for Kubernetes 4 | name: mychart9 5 | type: application 6 | version: 0.1.0 7 | dependencies: 8 | - name: mychart4 9 | version: "0.1.0" 10 | repository: "https://stacksimplify.github.io/helm-charts/" 11 | -------------------------------------------------------------------------------- /35-Helm-Starters/MYCHARTS/mychart9/charts/mychart4-0.1.0.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stacksimplify/helm-masterclass/2c76ce8db38dc5c901b4c1901707987c1e0413c1/35-Helm-Starters/MYCHARTS/mychart9/charts/mychart4-0.1.0.tgz -------------------------------------------------------------------------------- /35-Helm-Starters/MYCHARTS/mychart9/templates/service.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: {{ include "mychart9.fullname" . }} 5 | labels: 6 | {{- include "mychart9.labels" . | nindent 4 }} 7 | spec: 8 | type: {{ .Values.service.type }} 9 | ports: 10 | - port: {{ .Values.service.port }} 11 | targetPort: http 12 | protocol: TCP 13 | name: http 14 | nodePort: {{ .Values.service.nodePort }} 15 | selector: 16 | {{- include "mychart9.selectorLabels" . | nindent 4 }} 17 | -------------------------------------------------------------------------------- /35-Helm-Starters/MYCHARTS/mychart9/values.yaml: -------------------------------------------------------------------------------- 1 | # Default values for mychart9 2 | # This is a YAML-formatted file. 3 | # Declare variables to be passed into your templates. 4 | 5 | replicaCount: 1 6 | 7 | image: 8 | repository: ghcr.io/stacksimplify/kubenginxhelm 9 | pullPolicy: IfNotPresent 10 | # Overrides the image tag whose default is the chart appVersion. 11 | tag: "" 12 | 13 | imagePullSecrets: [] 14 | nameOverride: "" 15 | fullnameOverride: "" 16 | podAnnotations: {} 17 | podSecurityContext: {} 18 | # fsGroup: 2000 19 | 20 | securityContext: {} 21 | # capabilities: 22 | # drop: 23 | # - ALL 24 | # readOnlyRootFilesystem: true 25 | # runAsNonRoot: true 26 | # runAsUser: 1000 27 | 28 | service: 29 | type: NodePort 30 | port: 80 31 | nodePort: 31239 32 | 33 | resources: {} 34 | # We usually recommend not to specify default resources and to leave this as a conscious 35 | # choice for the user. This also increases chances charts run on environments with little 36 | # resources, such as Minikube. If you do want to specify resources, uncomment the following 37 | # lines, adjust them as necessary, and remove the curly braces after 'resources:'. 38 | # limits: 39 | # cpu: 100m 40 | # memory: 128Mi 41 | # requests: 42 | # cpu: 100m 43 | # memory: 128Mi 44 | 45 | nodeSelector: {} 46 | 47 | tolerations: [] 48 | 49 | affinity: {} 50 | -------------------------------------------------------------------------------- /35-Helm-Starters/mystarterchart/.helmignore: -------------------------------------------------------------------------------- 1 | # Patterns to ignore when building packages. 2 | # This supports shell glob matching, relative path matching, and 3 | # negation (prefixed with !). Only one pattern per line. 4 | .DS_Store 5 | # Common VCS dirs 6 | .git/ 7 | .gitignore 8 | .bzr/ 9 | .bzrignore 10 | .hg/ 11 | .hgignore 12 | .svn/ 13 | # Common backup files 14 | *.swp 15 | *.bak 16 | *.tmp 17 | *.orig 18 | *~ 19 | # Various IDEs 20 | .project 21 | .idea/ 22 | *.tmproj 23 | .vscode/ 24 | -------------------------------------------------------------------------------- /35-Helm-Starters/mystarterchart/Chart.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v2 2 | name: 3 | description: A Helm chart for Kubernetes 4 | type: application 5 | version: 0.4.0 6 | appVersion: "0.4.0" 7 | dependencies: 8 | - name: mychart4 9 | version: "0.1.0" 10 | repository: "https://stacksimplify.github.io/helm-charts/" 11 | -------------------------------------------------------------------------------- /35-Helm-Starters/mystarterchart/charts/mychart4/.helmignore: -------------------------------------------------------------------------------- 1 | # Patterns to ignore when building packages. 2 | # This supports shell glob matching, relative path matching, and 3 | # negation (prefixed with !). Only one pattern per line. 4 | .DS_Store 5 | # Common VCS dirs 6 | .git/ 7 | .gitignore 8 | .bzr/ 9 | .bzrignore 10 | .hg/ 11 | .hgignore 12 | .svn/ 13 | # Common backup files 14 | *.swp 15 | *.bak 16 | *.tmp 17 | *.orig 18 | *~ 19 | # Various IDEs 20 | .project 21 | .idea/ 22 | *.tmproj 23 | .vscode/ 24 | -------------------------------------------------------------------------------- /35-Helm-Starters/mystarterchart/charts/mychart4/Chart.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v2 2 | appVersion: 1.0.0 3 | description: A Helm chart for Kubernetes 4 | name: mychart4 5 | type: application 6 | version: 0.1.0 7 | -------------------------------------------------------------------------------- /35-Helm-Starters/mystarterchart/charts/mychart4/README.md: -------------------------------------------------------------------------------- 1 | # MyChart4 Helm Chart 2 | 3 | ## Step-01: Introduction 4 | - This chart will help us in learning Helm in a detailed manner 5 | - This chart will have NodePort service configured with Dynamic Port 6 | 7 | ## Step-02: Installing the Chart 8 | - To install the chart with the release name `hub` run: 9 | ```t 10 | # Add Helm Repository 11 | $ helm repo list 12 | $ helm repo add stacksimplify https://stacksimplify.github.io/helm-charts 13 | $ helm repo list 14 | 15 | # Install Helm Chart 16 | $ helm install myapp1 stacksimplify/mycahrt4 17 | ``` 18 | 19 | ## Step-03: Verify if Helm Installed successfully 20 | ```t 21 | # Helm Status 22 | $ helm status --show-resources 23 | or 24 | # using kubectl commands 25 | kubectl get pods 26 | kubectl get svc 27 | 28 | # Access Application 29 | http://localhost: 30 | ``` 31 | 32 | ## Step-04: Uninstall the Chart 33 | ```t 34 | # Uninstall Helm Chart 35 | $ helm uninstall myapp1 36 | ``` 37 | -------------------------------------------------------------------------------- /35-Helm-Starters/mystarterchart/charts/mychart4/templates/deployment.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: apps/v1 2 | kind: Deployment 3 | metadata: 4 | name: {{ include "mychart4.fullname" . }} 5 | labels: 6 | {{- include "mychart4.labels" . | nindent 4 }} 7 | spec: 8 | replicas: {{ .Values.replicaCount }} 9 | selector: 10 | matchLabels: 11 | {{- include "mychart4.selectorLabels" . | nindent 6 }} 12 | template: 13 | metadata: 14 | {{- with .Values.podAnnotations }} 15 | annotations: 16 | {{- toYaml . | nindent 8 }} 17 | {{- end }} 18 | labels: 19 | {{- include "mychart4.selectorLabels" . | nindent 8 }} 20 | spec: 21 | containers: 22 | - name: {{ .Chart.Name }} 23 | image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" 24 | imagePullPolicy: {{ .Values.image.pullPolicy }} 25 | ports: 26 | - name: http 27 | containerPort: {{ .Values.service.port }} 28 | protocol: TCP 29 | livenessProbe: 30 | httpGet: 31 | path: / 32 | port: http 33 | readinessProbe: 34 | httpGet: 35 | path: / 36 | port: http 37 | -------------------------------------------------------------------------------- /35-Helm-Starters/mystarterchart/charts/mychart4/templates/service.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: {{ include "mychart4.fullname" . }} 5 | labels: 6 | {{- include "mychart4.labels" . | nindent 4 }} 7 | spec: 8 | type: {{ .Values.service.type }} 9 | ports: 10 | - port: {{ .Values.service.port }} 11 | targetPort: http 12 | protocol: TCP 13 | name: http 14 | selector: 15 | {{- include "mychart4.selectorLabels" . | nindent 4 }} 16 | -------------------------------------------------------------------------------- /35-Helm-Starters/mystarterchart/charts/mychart4/templates/tests/test-connection.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Pod 3 | metadata: 4 | name: "{{ include "mychart4.fullname" . }}-test-connection" 5 | labels: 6 | {{- include "mychart4.labels" . | nindent 4 }} 7 | annotations: 8 | "helm.sh/hook": test 9 | spec: 10 | containers: 11 | - name: wget 12 | image: busybox 13 | command: ['wget'] 14 | args: ['{{ include "mychart4.fullname" . }}:{{ .Values.service.port }}'] 15 | restartPolicy: Never 16 | -------------------------------------------------------------------------------- /35-Helm-Starters/mystarterchart/charts/mychart4/values.yaml: -------------------------------------------------------------------------------- 1 | # This is a YAML-formatted file. 2 | # Declare variables to be passed into your templates. 3 | 4 | replicaCount: 1 5 | image: 6 | repository: ghcr.io/stacksimplify/kubenginx 7 | pullPolicy: IfNotPresent 8 | # Overrides the image tag whose default is the chart appVersion. 9 | tag: "" 10 | 11 | nameOverride: "" 12 | fullnameOverride: "" 13 | podAnnotations: {} 14 | 15 | service: 16 | type: NodePort 17 | port: 80 -------------------------------------------------------------------------------- /35-Helm-Starters/mystarterchart/templates/service.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: {{ include ".fullname" . }} 5 | labels: 6 | {{- include ".labels" . | nindent 4 }} 7 | spec: 8 | type: {{ .Values.service.type }} 9 | ports: 10 | - port: {{ .Values.service.port }} 11 | targetPort: http 12 | protocol: TCP 13 | name: http 14 | nodePort: {{ .Values.service.nodePort }} 15 | selector: 16 | {{- include ".selectorLabels" . | nindent 4 }} 17 | -------------------------------------------------------------------------------- /35-Helm-Starters/mystarterchart/values.yaml: -------------------------------------------------------------------------------- 1 | # Default values for 2 | # This is a YAML-formatted file. 3 | # Declare variables to be passed into your templates. 4 | 5 | replicaCount: 1 6 | 7 | image: 8 | repository: ghcr.io/stacksimplify/kubenginxhelm 9 | pullPolicy: IfNotPresent 10 | # Overrides the image tag whose default is the chart appVersion. 11 | tag: "" 12 | 13 | imagePullSecrets: [] 14 | nameOverride: "" 15 | fullnameOverride: "" 16 | podAnnotations: {} 17 | podSecurityContext: {} 18 | # fsGroup: 2000 19 | 20 | securityContext: {} 21 | # capabilities: 22 | # drop: 23 | # - ALL 24 | # readOnlyRootFilesystem: true 25 | # runAsNonRoot: true 26 | # runAsUser: 1000 27 | 28 | service: 29 | type: NodePort 30 | port: 80 31 | nodePort: 31239 32 | 33 | resources: {} 34 | # We usually recommend not to specify default resources and to leave this as a conscious 35 | # choice for the user. This also increases chances charts run on environments with little 36 | # resources, such as Minikube. If you do want to specify resources, uncomment the following 37 | # lines, adjust them as necessary, and remove the curly braces after 'resources:'. 38 | # limits: 39 | # cpu: 100m 40 | # memory: 128Mi 41 | # requests: 42 | # cpu: 100m 43 | # memory: 128Mi 44 | 45 | nodeSelector: {} 46 | 47 | tolerations: [] 48 | 49 | affinity: {} 50 | -------------------------------------------------------------------------------- /37-Helm-Plugins-Build/myplugin1/plugin.yaml: -------------------------------------------------------------------------------- 1 | name: "myplugin1" 2 | version: "0.1.0" 3 | usage: "Printss Helm Environment Variables" 4 | description: |- 5 | Prints Helm Environment Variables 6 | command: "env" 7 | -------------------------------------------------------------------------------- /37-Helm-Plugins-Build/myplugin2/plugin.yaml: -------------------------------------------------------------------------------- 1 | name: "myplugin2" 2 | version: "0.1.0" 3 | usage: "helm myplugin2" 4 | description: "Print Helm plugin directory" 5 | command: echo my helm plugin directory is $HELM_PLUGINS default command 6 | platformCommand: 7 | - os: linux 8 | arch: i386 9 | command: "echo my helm plugin directory is $HELM_PLUGINS os is linux i386" 10 | - os: linux 11 | arch: amd64 12 | command: "echo my helm plugin directory is $HELM_PLUGINS os is linux amd64" 13 | - os: windows 14 | arch: amd64 15 | command: "echo my helm plugin directory is $HELM_PLUGINS os is windows amd64" 16 | -------------------------------------------------------------------------------- /37-Helm-Plugins-Build/myplugin3/app.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | echo "my helm plugin directory is $HELM_PLUGINS from SHELL SCRIPT" -------------------------------------------------------------------------------- /37-Helm-Plugins-Build/myplugin3/plugin.yaml: -------------------------------------------------------------------------------- 1 | name: "myplugin3" 2 | version: "0.1.0" 3 | usage: "helm myplugin3" 4 | description: "Print Helm plugin directory using script app.sh" 5 | command: "$HELM_PLUGIN_DIR/app.sh" 6 | -------------------------------------------------------------------------------- /38-Helm-Hooks/hooksdemo1/.helmignore: -------------------------------------------------------------------------------- 1 | # Patterns to ignore when building packages. 2 | # This supports shell glob matching, relative path matching, and 3 | # negation (prefixed with !). Only one pattern per line. 4 | .DS_Store 5 | # Common VCS dirs 6 | .git/ 7 | .gitignore 8 | .bzr/ 9 | .bzrignore 10 | .hg/ 11 | .hgignore 12 | .svn/ 13 | # Common backup files 14 | *.swp 15 | *.bak 16 | *.tmp 17 | *.orig 18 | *~ 19 | # Various IDEs 20 | .project 21 | .idea/ 22 | *.tmproj 23 | .vscode/ 24 | -------------------------------------------------------------------------------- /38-Helm-Hooks/hooksdemo1/Chart.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v2 2 | appVersion: "0.1.0" 3 | description: A Helm chart for Kubernetes 4 | name: hooksdemo1 5 | type: application 6 | version: 0.1.0 7 | -------------------------------------------------------------------------------- /38-Helm-Hooks/hooksdemo1/templates/postdelete-hookpod.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Pod 3 | metadata: 4 | name: myhook-postdelete 5 | annotations: 6 | "helm.sh/hook": "post-delete" 7 | spec: 8 | restartPolicy: Never 9 | containers: 10 | - name: myhook-postdelete-container 11 | image: busybox 12 | imagePullPolicy: IfNotPresent 13 | command: ['sh', '-c', 'echo post-delete hook Pod is running && sleep 15'] 14 | -------------------------------------------------------------------------------- /38-Helm-Hooks/hooksdemo1/templates/preinstall-hookpod.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Pod 3 | metadata: 4 | name: myhook-preinstall 5 | annotations: 6 | "helm.sh/hook": "pre-install" 7 | spec: 8 | restartPolicy: Never 9 | containers: 10 | - name: myhook-preinstall-container 11 | image: busybox 12 | imagePullPolicy: IfNotPresent 13 | command: ['sh', '-c', 'echo Pre-install hook Pod is running && sleep 15'] 14 | -------------------------------------------------------------------------------- /38-Helm-Hooks/hooksdemo1/templates/preupgrade-hookpod.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Pod 3 | metadata: 4 | name: myhook-preupgrade 5 | annotations: 6 | "helm.sh/hook": "pre-upgrade" 7 | spec: 8 | restartPolicy: Never 9 | containers: 10 | - name: myhook-preupgrade-container 11 | image: busybox 12 | imagePullPolicy: IfNotPresent 13 | command: ['sh', '-c', 'echo preupgrade hook Pod is running && sleep 15'] 14 | -------------------------------------------------------------------------------- /38-Helm-Hooks/hooksdemo1/templates/service.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: {{ include "hooksdemo1.fullname" . }} 5 | labels: 6 | {{- include "hooksdemo1.labels" . | nindent 4 }} 7 | spec: 8 | type: {{ .Values.service.type }} 9 | ports: 10 | - port: {{ .Values.service.port }} 11 | targetPort: http 12 | protocol: TCP 13 | name: http 14 | nodePort: {{ .Values.service.nodePort }} 15 | selector: 16 | {{- include "hooksdemo1.selectorLabels" . | nindent 4 }} 17 | -------------------------------------------------------------------------------- /38-Helm-Hooks/hooksdemo1/values.yaml: -------------------------------------------------------------------------------- 1 | # Default values for parentchart. 2 | # This is a YAML-formatted file. 3 | # Declare variables to be passed into your templates. 4 | 5 | replicaCount: 1 6 | 7 | image: 8 | repository: ghcr.io/stacksimplify/kubenginxhelm 9 | pullPolicy: IfNotPresent 10 | # Overrides the image tag whose default is the chart appVersion. 11 | tag: "" 12 | 13 | imagePullSecrets: [] 14 | nameOverride: "" 15 | fullnameOverride: "" 16 | 17 | podAnnotations: {} 18 | 19 | podSecurityContext: {} 20 | # fsGroup: 2000 21 | 22 | securityContext: {} 23 | # capabilities: 24 | # drop: 25 | # - ALL 26 | # readOnlyRootFilesystem: true 27 | # runAsNonRoot: true 28 | # runAsUser: 1000 29 | 30 | service: 31 | type: NodePort 32 | port: 80 33 | nodePort: 31239 34 | 35 | resources: {} 36 | # We usually recommend not to specify default resources and to leave this as a conscious 37 | # choice for the user. This also increases chances charts run on environments with little 38 | # resources, such as Minikube. If you do want to specify resources, uncomment the following 39 | # lines, adjust them as necessary, and remove the curly braces after 'resources:'. 40 | # limits: 41 | # cpu: 100m 42 | # memory: 128Mi 43 | # requests: 44 | # cpu: 100m 45 | # memory: 128Mi 46 | 47 | 48 | nodeSelector: {} 49 | 50 | tolerations: [] 51 | 52 | affinity: {} 53 | -------------------------------------------------------------------------------- /39-Helm-Hooks-Delete-Policy/hooksdemo1/.helmignore: -------------------------------------------------------------------------------- 1 | # Patterns to ignore when building packages. 2 | # This supports shell glob matching, relative path matching, and 3 | # negation (prefixed with !). Only one pattern per line. 4 | .DS_Store 5 | # Common VCS dirs 6 | .git/ 7 | .gitignore 8 | .bzr/ 9 | .bzrignore 10 | .hg/ 11 | .hgignore 12 | .svn/ 13 | # Common backup files 14 | *.swp 15 | *.bak 16 | *.tmp 17 | *.orig 18 | *~ 19 | # Various IDEs 20 | .project 21 | .idea/ 22 | *.tmproj 23 | .vscode/ 24 | -------------------------------------------------------------------------------- /39-Helm-Hooks-Delete-Policy/hooksdemo1/Chart.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v2 2 | appVersion: "0.1.0" 3 | description: A Helm chart for Kubernetes 4 | name: hooksdemo1 5 | type: application 6 | version: 0.1.0 7 | -------------------------------------------------------------------------------- /39-Helm-Hooks-Delete-Policy/hooksdemo1/templates/postdelete-hookpod.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Pod 3 | metadata: 4 | name: myhook-postdelete 5 | annotations: 6 | "helm.sh/hook": "post-delete" 7 | #"helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded 8 | spec: 9 | restartPolicy: Never 10 | containers: 11 | - name: myhook-postdelete-container 12 | image: busybox 13 | imagePullPolicy: IfNotPresent 14 | command: ['sh', '-c', 'echo post-delete hook Pod is running && sleep 15'] 15 | -------------------------------------------------------------------------------- /39-Helm-Hooks-Delete-Policy/hooksdemo1/templates/preinstall-hookpod.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Pod 3 | metadata: 4 | name: myhook-preinstall 5 | annotations: 6 | "helm.sh/hook": "pre-install" 7 | #"helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded 8 | spec: 9 | restartPolicy: Never 10 | containers: 11 | - name: myhook-preinstall-container 12 | image: busybox 13 | imagePullPolicy: IfNotPresent 14 | command: ['sh', '-c', 'echo Pre-install hook Pod is running && sleep 15'] 15 | -------------------------------------------------------------------------------- /39-Helm-Hooks-Delete-Policy/hooksdemo1/templates/preupgrade-hookpod.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Pod 3 | metadata: 4 | name: myhook-preupgrade 5 | annotations: 6 | "helm.sh/hook": "pre-upgrade" 7 | #"helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded 8 | spec: 9 | restartPolicy: Never 10 | containers: 11 | - name: myhook-preupgrade-container 12 | image: busybox 13 | imagePullPolicy: IfNotPresent 14 | command: ['sh', '-c', 'echo preupgrade hook Pod is running && sleep 15'] 15 | -------------------------------------------------------------------------------- /39-Helm-Hooks-Delete-Policy/hooksdemo1/templates/service.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: {{ include "hooksdemo1.fullname" . }} 5 | labels: 6 | {{- include "hooksdemo1.labels" . | nindent 4 }} 7 | spec: 8 | type: {{ .Values.service.type }} 9 | ports: 10 | - port: {{ .Values.service.port }} 11 | targetPort: http 12 | protocol: TCP 13 | name: http 14 | nodePort: {{ .Values.service.nodePort }} 15 | selector: 16 | {{- include "hooksdemo1.selectorLabels" . | nindent 4 }} 17 | -------------------------------------------------------------------------------- /39-Helm-Hooks-Delete-Policy/hooksdemo1/values.yaml: -------------------------------------------------------------------------------- 1 | # Default values for parentchart. 2 | # This is a YAML-formatted file. 3 | # Declare variables to be passed into your templates. 4 | 5 | replicaCount: 1 6 | 7 | image: 8 | repository: ghcr.io/stacksimplify/kubenginxhelm 9 | pullPolicy: IfNotPresent 10 | # Overrides the image tag whose default is the chart appVersion. 11 | tag: "" 12 | 13 | imagePullSecrets: [] 14 | nameOverride: "" 15 | fullnameOverride: "" 16 | 17 | podAnnotations: {} 18 | 19 | podSecurityContext: {} 20 | # fsGroup: 2000 21 | 22 | securityContext: {} 23 | # capabilities: 24 | # drop: 25 | # - ALL 26 | # readOnlyRootFilesystem: true 27 | # runAsNonRoot: true 28 | # runAsUser: 1000 29 | 30 | service: 31 | type: NodePort 32 | port: 80 33 | nodePort: 31239 34 | 35 | resources: {} 36 | # We usually recommend not to specify default resources and to leave this as a conscious 37 | # choice for the user. This also increases chances charts run on environments with little 38 | # resources, such as Minikube. If you do want to specify resources, uncomment the following 39 | # lines, adjust them as necessary, and remove the curly braces after 'resources:'. 40 | # limits: 41 | # cpu: 100m 42 | # memory: 128Mi 43 | # requests: 44 | # cpu: 100m 45 | # memory: 128Mi 46 | 47 | 48 | nodeSelector: {} 49 | 50 | tolerations: [] 51 | 52 | affinity: {} 53 | -------------------------------------------------------------------------------- /40-Helm-Hook-Weights/hooksdemo1/.helmignore: -------------------------------------------------------------------------------- 1 | # Patterns to ignore when building packages. 2 | # This supports shell glob matching, relative path matching, and 3 | # negation (prefixed with !). Only one pattern per line. 4 | .DS_Store 5 | # Common VCS dirs 6 | .git/ 7 | .gitignore 8 | .bzr/ 9 | .bzrignore 10 | .hg/ 11 | .hgignore 12 | .svn/ 13 | # Common backup files 14 | *.swp 15 | *.bak 16 | *.tmp 17 | *.orig 18 | *~ 19 | # Various IDEs 20 | .project 21 | .idea/ 22 | *.tmproj 23 | .vscode/ 24 | -------------------------------------------------------------------------------- /40-Helm-Hook-Weights/hooksdemo1/Chart.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v2 2 | appVersion: "0.1.0" 3 | description: A Helm chart for Kubernetes 4 | name: hooksdemo1 5 | type: application 6 | version: 0.1.0 7 | -------------------------------------------------------------------------------- /40-Helm-Hook-Weights/hooksdemo1/templates/preinstall-hookpod1.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Pod 3 | metadata: 4 | name: myhook-preinstall1 5 | annotations: 6 | "helm.sh/hook": "pre-install" 7 | "helm.sh/hook-delete-policy": before-hook-creation 8 | "helm.sh/hook-weight": "-2" 9 | spec: 10 | restartPolicy: Never 11 | containers: 12 | - name: myhook-preinstall-container 13 | image: busybox 14 | imagePullPolicy: IfNotPresent 15 | command: ['sh', '-c', 'echo Pre-install hook Pod is running && sleep 15'] 16 | -------------------------------------------------------------------------------- /40-Helm-Hook-Weights/hooksdemo1/templates/preinstall-hookpod2.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Pod 3 | metadata: 4 | name: myhook-preinstall2 5 | annotations: 6 | "helm.sh/hook": "pre-install" 7 | "helm.sh/hook-delete-policy": before-hook-creation 8 | "helm.sh/hook-weight": "5" 9 | spec: 10 | restartPolicy: Never 11 | containers: 12 | - name: myhook-preinstall-container 13 | image: busybox 14 | imagePullPolicy: IfNotPresent 15 | command: ['sh', '-c', 'echo Pre-install hook Pod is running && sleep 15'] 16 | -------------------------------------------------------------------------------- /40-Helm-Hook-Weights/hooksdemo1/templates/preinstall-hookpod3.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Pod 3 | metadata: 4 | name: myhook-preinstall3 5 | annotations: 6 | "helm.sh/hook": "pre-install" 7 | "helm.sh/hook-delete-policy": before-hook-creation 8 | "helm.sh/hook-weight": "6" 9 | spec: 10 | restartPolicy: Never 11 | containers: 12 | - name: myhook-preinstall-container 13 | image: busybox 14 | imagePullPolicy: IfNotPresent 15 | command: ['sh', '-c', 'echo Pre-install hook Pod is running && sleep 15'] 16 | -------------------------------------------------------------------------------- /40-Helm-Hook-Weights/hooksdemo1/templates/service.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: {{ include "hooksdemo1.fullname" . }} 5 | labels: 6 | {{- include "hooksdemo1.labels" . | nindent 4 }} 7 | spec: 8 | type: {{ .Values.service.type }} 9 | ports: 10 | - port: {{ .Values.service.port }} 11 | targetPort: http 12 | protocol: TCP 13 | name: http 14 | nodePort: {{ .Values.service.nodePort }} 15 | selector: 16 | {{- include "hooksdemo1.selectorLabels" . | nindent 4 }} 17 | -------------------------------------------------------------------------------- /40-Helm-Hook-Weights/hooksdemo1/values.yaml: -------------------------------------------------------------------------------- 1 | # Default values for parentchart. 2 | # This is a YAML-formatted file. 3 | # Declare variables to be passed into your templates. 4 | 5 | replicaCount: 1 6 | 7 | image: 8 | repository: ghcr.io/stacksimplify/kubenginxhelm 9 | pullPolicy: IfNotPresent 10 | # Overrides the image tag whose default is the chart appVersion. 11 | tag: "" 12 | 13 | imagePullSecrets: [] 14 | nameOverride: "" 15 | fullnameOverride: "" 16 | 17 | podAnnotations: {} 18 | 19 | podSecurityContext: {} 20 | # fsGroup: 2000 21 | 22 | securityContext: {} 23 | # capabilities: 24 | # drop: 25 | # - ALL 26 | # readOnlyRootFilesystem: true 27 | # runAsNonRoot: true 28 | # runAsUser: 1000 29 | 30 | service: 31 | type: NodePort 32 | port: 80 33 | nodePort: 31239 34 | 35 | resources: {} 36 | # We usually recommend not to specify default resources and to leave this as a conscious 37 | # choice for the user. This also increases chances charts run on environments with little 38 | # resources, such as Minikube. If you do want to specify resources, uncomment the following 39 | # lines, adjust them as necessary, and remove the curly braces after 'resources:'. 40 | # limits: 41 | # cpu: 100m 42 | # memory: 128Mi 43 | # requests: 44 | # cpu: 100m 45 | # memory: 128Mi 46 | 47 | 48 | nodeSelector: {} 49 | 50 | tolerations: [] 51 | 52 | affinity: {} 53 | -------------------------------------------------------------------------------- /41-Helm-Tests/mydemoapp/.helmignore: -------------------------------------------------------------------------------- 1 | # Patterns to ignore when building packages. 2 | # This supports shell glob matching, relative path matching, and 3 | # negation (prefixed with !). Only one pattern per line. 4 | .DS_Store 5 | # Common VCS dirs 6 | .git/ 7 | .gitignore 8 | .bzr/ 9 | .bzrignore 10 | .hg/ 11 | .hgignore 12 | .svn/ 13 | # Common backup files 14 | *.swp 15 | *.bak 16 | *.tmp 17 | *.orig 18 | *~ 19 | # Various IDEs 20 | .project 21 | .idea/ 22 | *.tmproj 23 | .vscode/ 24 | -------------------------------------------------------------------------------- /41-Helm-Tests/mydemoapp/Chart.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v2 2 | name: mydemoapp 3 | description: A Helm chart for Kubernetes 4 | 5 | # A chart can be either an 'application' or a 'library' chart. 6 | # 7 | # Application charts are a collection of templates that can be packaged into versioned archives 8 | # to be deployed. 9 | # 10 | # Library charts provide useful utilities or functions for the chart developer. They're included as 11 | # a dependency of application charts to inject those utilities and functions into the rendering 12 | # pipeline. Library charts do not define any templates and therefore cannot be deployed. 13 | type: application 14 | 15 | # This is the chart version. This version number should be incremented each time you make changes 16 | # to the chart and its templates, including the app version. 17 | # Versions are expected to follow Semantic Versioning (https://semver.org/) 18 | version: 0.1.0 19 | 20 | # This is the version number of the application being deployed. This version number should be 21 | # incremented each time you make changes to the application. Versions are not expected to 22 | # follow Semantic Versioning. They should reflect the version the application is using. 23 | # It is recommended to use it with quotes. 24 | appVersion: "1.16.0" 25 | -------------------------------------------------------------------------------- /41-Helm-Tests/mydemoapp/templates/hpa.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.autoscaling.enabled }} 2 | apiVersion: autoscaling/v2 3 | kind: HorizontalPodAutoscaler 4 | metadata: 5 | name: {{ include "mydemoapp.fullname" . }} 6 | labels: 7 | {{- include "mydemoapp.labels" . | nindent 4 }} 8 | spec: 9 | scaleTargetRef: 10 | apiVersion: apps/v1 11 | kind: Deployment 12 | name: {{ include "mydemoapp.fullname" . }} 13 | minReplicas: {{ .Values.autoscaling.minReplicas }} 14 | maxReplicas: {{ .Values.autoscaling.maxReplicas }} 15 | metrics: 16 | {{- if .Values.autoscaling.targetCPUUtilizationPercentage }} 17 | - type: Resource 18 | resource: 19 | name: cpu 20 | target: 21 | type: Utilization 22 | averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} 23 | {{- end }} 24 | {{- if .Values.autoscaling.targetMemoryUtilizationPercentage }} 25 | - type: Resource 26 | resource: 27 | name: memory 28 | target: 29 | type: Utilization 30 | averageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }} 31 | {{- end }} 32 | {{- end }} 33 | -------------------------------------------------------------------------------- /41-Helm-Tests/mydemoapp/templates/service.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: {{ include "mydemoapp.fullname" . }} 5 | labels: 6 | {{- include "mydemoapp.labels" . | nindent 4 }} 7 | spec: 8 | type: {{ .Values.service.type }} 9 | ports: 10 | - port: {{ .Values.service.port }} 11 | targetPort: http 12 | protocol: TCP 13 | name: http 14 | selector: 15 | {{- include "mydemoapp.selectorLabels" . | nindent 4 }} 16 | -------------------------------------------------------------------------------- /41-Helm-Tests/mydemoapp/templates/serviceaccount.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.serviceAccount.create -}} 2 | apiVersion: v1 3 | kind: ServiceAccount 4 | metadata: 5 | name: {{ include "mydemoapp.serviceAccountName" . }} 6 | labels: 7 | {{- include "mydemoapp.labels" . | nindent 4 }} 8 | {{- with .Values.serviceAccount.annotations }} 9 | annotations: 10 | {{- toYaml . | nindent 4 }} 11 | {{- end }} 12 | {{- end }} 13 | -------------------------------------------------------------------------------- /41-Helm-Tests/mydemoapp/templates/tests/test-connection.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Pod 3 | metadata: 4 | name: "{{ include "mydemoapp.fullname" . }}-test-connection" 5 | labels: 6 | {{- include "mydemoapp.labels" . | nindent 4 }} 7 | annotations: 8 | "helm.sh/hook": test 9 | spec: 10 | containers: 11 | - name: wget 12 | image: busybox 13 | command: ['wget'] 14 | args: ['{{ include "mydemoapp.fullname" . }}:{{ .Values.service.port }}'] 15 | restartPolicy: Never 16 | -------------------------------------------------------------------------------- /42-Helm-Resource-Policy/respolicytest/.helmignore: -------------------------------------------------------------------------------- 1 | # Patterns to ignore when building packages. 2 | # This supports shell glob matching, relative path matching, and 3 | # negation (prefixed with !). Only one pattern per line. 4 | .DS_Store 5 | # Common VCS dirs 6 | .git/ 7 | .gitignore 8 | .bzr/ 9 | .bzrignore 10 | .hg/ 11 | .hgignore 12 | .svn/ 13 | # Common backup files 14 | *.swp 15 | *.bak 16 | *.tmp 17 | *.orig 18 | *~ 19 | # Various IDEs 20 | .project 21 | .idea/ 22 | *.tmproj 23 | .vscode/ 24 | -------------------------------------------------------------------------------- /42-Helm-Resource-Policy/respolicytest/Chart.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v2 2 | name: respolicytest 3 | description: A Helm chart for Kubernetes 4 | 5 | # A chart can be either an 'application' or a 'library' chart. 6 | # 7 | # Application charts are a collection of templates that can be packaged into versioned archives 8 | # to be deployed. 9 | # 10 | # Library charts provide useful utilities or functions for the chart developer. They're included as 11 | # a dependency of application charts to inject those utilities and functions into the rendering 12 | # pipeline. Library charts do not define any templates and therefore cannot be deployed. 13 | type: application 14 | 15 | # This is the chart version. This version number should be incremented each time you make changes 16 | # to the chart and its templates, including the app version. 17 | # Versions are expected to follow Semantic Versioning (https://semver.org/) 18 | version: 0.1.0 19 | 20 | # This is the version number of the application being deployed. This version number should be 21 | # incremented each time you make changes to the application. Versions are not expected to 22 | # follow Semantic Versioning. They should reflect the version the application is using. 23 | # It is recommended to use it with quotes. 24 | appVersion: "1.16.0" 25 | -------------------------------------------------------------------------------- /42-Helm-Resource-Policy/respolicytest/templates/hpa.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.autoscaling.enabled }} 2 | apiVersion: autoscaling/v2 3 | kind: HorizontalPodAutoscaler 4 | metadata: 5 | name: {{ include "respolicytest.fullname" . }} 6 | labels: 7 | {{- include "respolicytest.labels" . | nindent 4 }} 8 | spec: 9 | scaleTargetRef: 10 | apiVersion: apps/v1 11 | kind: Deployment 12 | name: {{ include "respolicytest.fullname" . }} 13 | minReplicas: {{ .Values.autoscaling.minReplicas }} 14 | maxReplicas: {{ .Values.autoscaling.maxReplicas }} 15 | metrics: 16 | {{- if .Values.autoscaling.targetCPUUtilizationPercentage }} 17 | - type: Resource 18 | resource: 19 | name: cpu 20 | target: 21 | type: Utilization 22 | averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} 23 | {{- end }} 24 | {{- if .Values.autoscaling.targetMemoryUtilizationPercentage }} 25 | - type: Resource 26 | resource: 27 | name: memory 28 | target: 29 | type: Utilization 30 | averageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }} 31 | {{- end }} 32 | {{- end }} 33 | -------------------------------------------------------------------------------- /42-Helm-Resource-Policy/respolicytest/templates/service.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: {{ include "respolicytest.fullname" . }} 5 | labels: 6 | {{- include "respolicytest.labels" . | nindent 4 }} 7 | spec: 8 | type: {{ .Values.service.type }} 9 | ports: 10 | - port: {{ .Values.service.port }} 11 | targetPort: http 12 | protocol: TCP 13 | name: http 14 | selector: 15 | {{- include "respolicytest.selectorLabels" . | nindent 4 }} 16 | -------------------------------------------------------------------------------- /42-Helm-Resource-Policy/respolicytest/templates/serviceaccount.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.serviceAccount.create -}} 2 | apiVersion: v1 3 | kind: ServiceAccount 4 | metadata: 5 | name: {{ include "respolicytest.serviceAccountName" . }} 6 | labels: 7 | {{- include "respolicytest.labels" . | nindent 4 }} 8 | {{- with .Values.serviceAccount.annotations }} 9 | annotations: 10 | {{- toYaml . | nindent 4 }} 11 | {{- end }} 12 | {{- end }} 13 | -------------------------------------------------------------------------------- /42-Helm-Resource-Policy/respolicytest/templates/tests/test-connection.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Pod 3 | metadata: 4 | name: "{{ include "respolicytest.fullname" . }}-test-connection" 5 | labels: 6 | {{- include "respolicytest.labels" . | nindent 4 }} 7 | annotations: 8 | "helm.sh/hook": test 9 | spec: 10 | containers: 11 | - name: wget 12 | image: busybox 13 | command: ['wget'] 14 | args: ['{{ include "respolicytest.fullname" . }}:{{ .Values.service.port }}'] 15 | restartPolicy: Never 16 | -------------------------------------------------------------------------------- /43-Helm-Sign-and-Verify-Charts/myhelmcharts/myfirstchart-0.1.0.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stacksimplify/helm-masterclass/2c76ce8db38dc5c901b4c1901707987c1e0413c1/43-Helm-Sign-and-Verify-Charts/myhelmcharts/myfirstchart-0.1.0.tgz -------------------------------------------------------------------------------- /43-Helm-Sign-and-Verify-Charts/myhelmcharts/myfirstchart-0.1.0.tgz.prov: -------------------------------------------------------------------------------- 1 | -----BEGIN PGP SIGNED MESSAGE----- 2 | Hash: SHA512 3 | 4 | apiVersion: v2 5 | appVersion: 0.1.0 6 | description: A Helm chart for Kubernetes 7 | name: myfirstchart 8 | type: application 9 | version: 0.1.0 10 | 11 | ... 12 | files: 13 | myfirstchart-0.1.0.tgz: sha256:c39d9b25ac14f9b0df127402a045a7102ac09138642c87e77aa7fa0e462cddf0 14 | -----BEGIN PGP SIGNATURE----- 15 | 16 | wsDcBAEBCgAQBQJk4yZLCRC8QehzeDC4TgAAk80MAJw33Za6qRkZ77j56xEeXnGh 17 | BmWhNvBeaXt4AwluGxhKSbZESbt6MMI+2HQBKJU1lV6PuYMal1lboeV5jtUMqjmg 18 | F0QXxm1WB1b93QvAbGJ3Jy7JF5xxwUrM2Kh7inEDM+C2JWv8j/RXOAUzr6ntq7Id 19 | h39K4mvwOniG8lZoYMuSSaeZpo/Yhaat+z+plWKGQu5Xlb1oGtPwAo1OaUKR3vA9 20 | qbDoTb/V3l9ktiROHlzF5UkV3IlEgMGYP0rIAmPWpb6rgh+Xg75AuSRGAJbJHU8m 21 | x0byJDxtIUGWW6jr75axTwDFet+mkUoYF1UI90OCQ1hd6sYArNk7xS4ZBZPzZxcN 22 | yH6YwXptw/YnR4uffbEejyoPK8ZpL5W1hVUsIxb9RPSgkTvsr3bgLPh8/syVgaIW 23 | NMa5g08qdn787uvOAvHFXj4iuNSQUbqkksVwcixg8CkS+CSCekGf/VNTry/+tqgy 24 | R+OXfKW0r3cnRIR0SAdp3CNiebPgASnmZ4AGNrUx4A== 25 | =Zr7X 26 | -----END PGP SIGNATURE----- -------------------------------------------------------------------------------- /43-Helm-Sign-and-Verify-Charts/myhelmcharts/myfirstchart/.helmignore: -------------------------------------------------------------------------------- 1 | # Patterns to ignore when building packages. 2 | # This supports shell glob matching, relative path matching, and 3 | # negation (prefixed with !). Only one pattern per line. 4 | .DS_Store 5 | # Common VCS dirs 6 | .git/ 7 | .gitignore 8 | .bzr/ 9 | .bzrignore 10 | .hg/ 11 | .hgignore 12 | .svn/ 13 | # Common backup files 14 | *.swp 15 | *.bak 16 | *.tmp 17 | *.orig 18 | *~ 19 | # Various IDEs 20 | .project 21 | .idea/ 22 | *.tmproj 23 | .vscode/ 24 | -------------------------------------------------------------------------------- /43-Helm-Sign-and-Verify-Charts/myhelmcharts/myfirstchart/Chart.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v2 2 | appVersion: 0.1.0 3 | description: A Helm chart for Kubernetes 4 | name: myfirstchart 5 | type: application 6 | version: 0.1.0 7 | -------------------------------------------------------------------------------- /43-Helm-Sign-and-Verify-Charts/myhelmcharts/myfirstchart/templates/service.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: {{ include "myfirstchart.fullname" . }} 5 | labels: 6 | {{- include "myfirstchart.labels" . | nindent 4 }} 7 | spec: 8 | type: {{ .Values.service.type }} 9 | ports: 10 | - port: {{ .Values.service.port }} 11 | targetPort: http 12 | protocol: TCP 13 | name: http 14 | nodePort: {{ .Values.service.nodePort }} 15 | selector: 16 | {{- include "myfirstchart.selectorLabels" . | nindent 4 }} 17 | -------------------------------------------------------------------------------- /43-Helm-Sign-and-Verify-Charts/myhelmcharts/myfirstchart/values.yaml: -------------------------------------------------------------------------------- 1 | # Default values for myfirstchart 2 | # This is a YAML-formatted file. 3 | # Declare variables to be passed into your templates. 4 | 5 | replicaCount: 1 6 | 7 | image: 8 | repository: ghcr.io/stacksimplify/kubenginxhelm 9 | pullPolicy: IfNotPresent 10 | # Overrides the image tag whose default is the chart appVersion. 11 | tag: "" 12 | 13 | imagePullSecrets: [] 14 | nameOverride: "" 15 | fullnameOverride: "" 16 | podAnnotations: {} 17 | podSecurityContext: {} 18 | # fsGroup: 2000 19 | 20 | securityContext: {} 21 | # capabilities: 22 | # drop: 23 | # - ALL 24 | # readOnlyRootFilesystem: true 25 | # runAsNonRoot: true 26 | # runAsUser: 1000 27 | 28 | service: 29 | type: NodePort 30 | port: 80 31 | nodePort: 31239 32 | 33 | resources: {} 34 | # We usually recommend not to specify default resources and to leave this as a conscious 35 | # choice for the user. This also increases chances charts run on environments with little 36 | # resources, such as Minikube. If you do want to specify resources, uncomment the following 37 | # lines, adjust them as necessary, and remove the curly braces after 'resources:'. 38 | # limits: 39 | # cpu: 100m 40 | # memory: 128Mi 41 | # requests: 42 | # cpu: 100m 43 | # memory: 128Mi 44 | 45 | nodeSelector: {} 46 | 47 | tolerations: [] 48 | 49 | affinity: {} 50 | -------------------------------------------------------------------------------- /43-Helm-Sign-and-Verify-Charts/myhelmcharts/private-key/helmsigndemo1-secring-privatekey.gpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stacksimplify/helm-masterclass/2c76ce8db38dc5c901b4c1901707987c1e0413c1/43-Helm-Sign-and-Verify-Charts/myhelmcharts/private-key/helmsigndemo1-secring-privatekey.gpg -------------------------------------------------------------------------------- /43-Helm-Sign-and-Verify-Charts/myhelmcharts/public-key/dummy-publickey.gpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stacksimplify/helm-masterclass/2c76ce8db38dc5c901b4c1901707987c1e0413c1/43-Helm-Sign-and-Verify-Charts/myhelmcharts/public-key/dummy-publickey.gpg -------------------------------------------------------------------------------- /43-Helm-Sign-and-Verify-Charts/myhelmcharts/public-key/helmsigndemo1-publickey.gpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stacksimplify/helm-masterclass/2c76ce8db38dc5c901b4c1901707987c1e0413c1/43-Helm-Sign-and-Verify-Charts/myhelmcharts/public-key/helmsigndemo1-publickey.gpg -------------------------------------------------------------------------------- /44-Helm-Repo-on-GitHub/gitrepo-content/.github/workflows/release.yml: -------------------------------------------------------------------------------- 1 | name: Release Charts 2 | 3 | on: 4 | push: 5 | branches: 6 | - main 7 | 8 | jobs: 9 | release: 10 | permissions: 11 | contents: write 12 | runs-on: ubuntu-latest 13 | steps: 14 | - name: Checkout 15 | uses: actions/checkout@v3 16 | with: 17 | fetch-depth: 0 18 | 19 | - name: Configure Git 20 | run: | 21 | git config user.name "$GITHUB_ACTOR" 22 | git config user.email "$GITHUB_ACTOR@users.noreply.github.com" 23 | 24 | - name: Run chart-releaser 25 | uses: helm/chart-releaser-action@v1.5.0 26 | env: 27 | CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" -------------------------------------------------------------------------------- /44-Helm-Repo-on-GitHub/gitrepo-content/charts/myfirstchart/.helmignore: -------------------------------------------------------------------------------- 1 | # Patterns to ignore when building packages. 2 | # This supports shell glob matching, relative path matching, and 3 | # negation (prefixed with !). Only one pattern per line. 4 | .DS_Store 5 | # Common VCS dirs 6 | .git/ 7 | .gitignore 8 | .bzr/ 9 | .bzrignore 10 | .hg/ 11 | .hgignore 12 | .svn/ 13 | # Common backup files 14 | *.swp 15 | *.bak 16 | *.tmp 17 | *.orig 18 | *~ 19 | # Various IDEs 20 | .project 21 | .idea/ 22 | *.tmproj 23 | .vscode/ 24 | -------------------------------------------------------------------------------- /44-Helm-Repo-on-GitHub/gitrepo-content/charts/myfirstchart/Chart.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v2 2 | appVersion: "0.1.0" 3 | description: A Helm chart for Kubernetes 4 | name: myfirstchart 5 | type: application 6 | version: 0.1.0 7 | -------------------------------------------------------------------------------- /44-Helm-Repo-on-GitHub/gitrepo-content/charts/myfirstchart/templates/service.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: {{ include "myfirstchart.fullname" . }} 5 | labels: 6 | {{- include "myfirstchart.labels" . | nindent 4 }} 7 | spec: 8 | type: {{ .Values.service.type }} 9 | ports: 10 | - port: {{ .Values.service.port }} 11 | targetPort: http 12 | protocol: TCP 13 | name: http 14 | nodePort: {{ .Values.service.nodePort }} 15 | selector: 16 | {{- include "myfirstchart.selectorLabels" . | nindent 4 }} 17 | -------------------------------------------------------------------------------- /45-Integrate-with-ArtifactHub/artifacthub-repo.yml: -------------------------------------------------------------------------------- 1 | 2 | #repositoryID: The ID of the Artifact Hub repository where the packages will be published to (optional, but it enables verified publisher) 3 | repositoryID: 4 | owners: # (optional, used to claim repository ownership) 5 | - name: Kalyan Reddy Daida 6 | email: stacksimplify@gmail.com 7 | ignore: # (optional, packages that should not be indexed by Artifact Hub) 8 | - name: package1 9 | - name: package2 # Exact match 10 | version: beta # Regular expression (when omitted, all versions are ignored) -------------------------------------------------------------------------------- /46-Helm-Values-Validate-with-JSON-Schema/helmbasics/.helmignore: -------------------------------------------------------------------------------- 1 | # Patterns to ignore when building packages. 2 | # This supports shell glob matching, relative path matching, and 3 | # negation (prefixed with !). Only one pattern per line. 4 | .DS_Store 5 | # Common VCS dirs 6 | .git/ 7 | .gitignore 8 | .bzr/ 9 | .bzrignore 10 | .hg/ 11 | .hgignore 12 | .svn/ 13 | # Common backup files 14 | *.swp 15 | *.bak 16 | *.tmp 17 | *.orig 18 | *~ 19 | # Various IDEs 20 | .project 21 | .idea/ 22 | *.tmproj 23 | .vscode/ 24 | -------------------------------------------------------------------------------- /46-Helm-Values-Validate-with-JSON-Schema/helmbasics/Chart.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v2 2 | name: helmbasics 3 | description: A Helm chart for learning Helm Basics 4 | type: application 5 | version: 0.1.0 6 | appVersion: "0.1.0" 7 | -------------------------------------------------------------------------------- /46-Helm-Values-Validate-with-JSON-Schema/helmbasics/templates/NOTES.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stacksimplify/helm-masterclass/2c76ce8db38dc5c901b4c1901707987c1e0413c1/46-Helm-Values-Validate-with-JSON-Schema/helmbasics/templates/NOTES.txt -------------------------------------------------------------------------------- /46-Helm-Values-Validate-with-JSON-Schema/helmbasics/templates/deployment.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: apps/v1 2 | kind: Deployment 3 | metadata: 4 | name: {{ .Release.Name }}-{{ .Chart.Name }} 5 | labels: 6 | app: nginx 7 | spec: 8 | replicas: {{ .Values.replicaCount }} 9 | selector: 10 | matchLabels: 11 | app: nginx 12 | template: 13 | metadata: 14 | labels: 15 | app: nginx 16 | spec: 17 | containers: 18 | - name: nginx 19 | image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" 20 | imagePullPolicy: {{ .Values.image.pullPolicy }} 21 | ports: 22 | - containerPort: 80 23 | -------------------------------------------------------------------------------- /46-Helm-Values-Validate-with-JSON-Schema/helmbasics/values.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "title": "Generated schema for Root", 4 | "type": "object", 5 | "properties": { 6 | "replicaCount": { 7 | "type": "number" 8 | }, 9 | "image": { 10 | "type": "object", 11 | "properties": { 12 | "repository": { 13 | "type": "string" 14 | }, 15 | "pullPolicy": { 16 | "type": "string", 17 | "pattern": "^(Always|Never|IfNotPresent)$" 18 | }, 19 | "tag": { 20 | "type": "string" 21 | } 22 | }, 23 | "required": [ 24 | "repository", 25 | "pullPolicy", 26 | "tag" 27 | ] 28 | } 29 | }, 30 | "required": [ 31 | "replicaCount", 32 | "image" 33 | ] 34 | } -------------------------------------------------------------------------------- /46-Helm-Values-Validate-with-JSON-Schema/helmbasics/values.yaml: -------------------------------------------------------------------------------- 1 | 2 | replicaCount: 2 3 | 4 | image: 5 | repository: nginx 6 | pullPolicy: IfNotPresent 7 | tag: "" 8 | 9 | -------------------------------------------------------------------------------- /47-Helm-Use-OCI-based-Registries/backupfiles/myocidemo/.helmignore: -------------------------------------------------------------------------------- 1 | # Patterns to ignore when building packages. 2 | # This supports shell glob matching, relative path matching, and 3 | # negation (prefixed with !). Only one pattern per line. 4 | .DS_Store 5 | # Common VCS dirs 6 | .git/ 7 | .gitignore 8 | .bzr/ 9 | .bzrignore 10 | .hg/ 11 | .hgignore 12 | .svn/ 13 | # Common backup files 14 | *.swp 15 | *.bak 16 | *.tmp 17 | *.orig 18 | *~ 19 | # Various IDEs 20 | .project 21 | .idea/ 22 | *.tmproj 23 | .vscode/ 24 | -------------------------------------------------------------------------------- /47-Helm-Use-OCI-based-Registries/backupfiles/myocidemo/Chart.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v2 2 | name: myocidemo 3 | description: A Helm chart for Kubernetes 4 | type: application 5 | version: 0.1.0 6 | appVersion: "0.1.0" 7 | -------------------------------------------------------------------------------- /47-Helm-Use-OCI-based-Registries/backupfiles/myocidemo/templates/hpa.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.autoscaling.enabled }} 2 | apiVersion: autoscaling/v2 3 | kind: HorizontalPodAutoscaler 4 | metadata: 5 | name: {{ include "myocidemo.fullname" . }} 6 | labels: 7 | {{- include "myocidemo.labels" . | nindent 4 }} 8 | spec: 9 | scaleTargetRef: 10 | apiVersion: apps/v1 11 | kind: Deployment 12 | name: {{ include "myocidemo.fullname" . }} 13 | minReplicas: {{ .Values.autoscaling.minReplicas }} 14 | maxReplicas: {{ .Values.autoscaling.maxReplicas }} 15 | metrics: 16 | {{- if .Values.autoscaling.targetCPUUtilizationPercentage }} 17 | - type: Resource 18 | resource: 19 | name: cpu 20 | target: 21 | type: Utilization 22 | averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} 23 | {{- end }} 24 | {{- if .Values.autoscaling.targetMemoryUtilizationPercentage }} 25 | - type: Resource 26 | resource: 27 | name: memory 28 | target: 29 | type: Utilization 30 | averageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }} 31 | {{- end }} 32 | {{- end }} 33 | -------------------------------------------------------------------------------- /47-Helm-Use-OCI-based-Registries/backupfiles/myocidemo/templates/service.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: {{ include "myocidemo.fullname" . }} 5 | labels: 6 | {{- include "myocidemo.labels" . | nindent 4 }} 7 | spec: 8 | type: {{ .Values.service.type }} 9 | ports: 10 | - port: {{ .Values.service.port }} 11 | targetPort: http 12 | protocol: TCP 13 | name: http 14 | selector: 15 | {{- include "myocidemo.selectorLabels" . | nindent 4 }} 16 | -------------------------------------------------------------------------------- /47-Helm-Use-OCI-based-Registries/backupfiles/myocidemo/templates/serviceaccount.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.serviceAccount.create -}} 2 | apiVersion: v1 3 | kind: ServiceAccount 4 | metadata: 5 | name: {{ include "myocidemo.serviceAccountName" . }} 6 | labels: 7 | {{- include "myocidemo.labels" . | nindent 4 }} 8 | {{- with .Values.serviceAccount.annotations }} 9 | annotations: 10 | {{- toYaml . | nindent 4 }} 11 | {{- end }} 12 | {{- end }} 13 | -------------------------------------------------------------------------------- /47-Helm-Use-OCI-based-Registries/backupfiles/myocidemo/templates/tests/test-connection.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Pod 3 | metadata: 4 | name: "{{ include "myocidemo.fullname" . }}-test-connection" 5 | labels: 6 | {{- include "myocidemo.labels" . | nindent 4 }} 7 | annotations: 8 | "helm.sh/hook": test 9 | spec: 10 | containers: 11 | - name: wget 12 | image: busybox 13 | command: ['wget'] 14 | args: ['{{ include "myocidemo.fullname" . }}:{{ .Values.service.port }}'] 15 | restartPolicy: Never 16 | -------------------------------------------------------------------------------- /47-Helm-Use-OCI-based-Registries/migrate/myfirstchart-0.1.0.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stacksimplify/helm-masterclass/2c76ce8db38dc5c901b4c1901707987c1e0413c1/47-Helm-Use-OCI-based-Registries/migrate/myfirstchart-0.1.0.tgz -------------------------------------------------------------------------------- /47-Helm-Use-OCI-based-Registries/migrate/myfirstchart-0.2.0.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stacksimplify/helm-masterclass/2c76ce8db38dc5c901b4c1901707987c1e0413c1/47-Helm-Use-OCI-based-Registries/migrate/myfirstchart-0.2.0.tgz -------------------------------------------------------------------------------- /47-Helm-Use-OCI-based-Registries/myocidemo-0.1.0.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stacksimplify/helm-masterclass/2c76ce8db38dc5c901b4c1901707987c1e0413c1/47-Helm-Use-OCI-based-Registries/myocidemo-0.1.0.tgz -------------------------------------------------------------------------------- /47-Helm-Use-OCI-based-Registries/myocidemo-0.2.0.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stacksimplify/helm-masterclass/2c76ce8db38dc5c901b4c1901707987c1e0413c1/47-Helm-Use-OCI-based-Registries/myocidemo-0.2.0.tgz -------------------------------------------------------------------------------- /47-Helm-Use-OCI-based-Registries/myocidemo/.helmignore: -------------------------------------------------------------------------------- 1 | # Patterns to ignore when building packages. 2 | # This supports shell glob matching, relative path matching, and 3 | # negation (prefixed with !). Only one pattern per line. 4 | .DS_Store 5 | # Common VCS dirs 6 | .git/ 7 | .gitignore 8 | .bzr/ 9 | .bzrignore 10 | .hg/ 11 | .hgignore 12 | .svn/ 13 | # Common backup files 14 | *.swp 15 | *.bak 16 | *.tmp 17 | *.orig 18 | *~ 19 | # Various IDEs 20 | .project 21 | .idea/ 22 | *.tmproj 23 | .vscode/ 24 | -------------------------------------------------------------------------------- /47-Helm-Use-OCI-based-Registries/myocidemo/Chart.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v2 2 | name: myocidemo 3 | description: A Helm chart for Kubernetes 4 | type: application 5 | version: 0.1.0 6 | appVersion: "0.1.0" 7 | -------------------------------------------------------------------------------- /47-Helm-Use-OCI-based-Registries/myocidemo/templates/hpa.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.autoscaling.enabled }} 2 | apiVersion: autoscaling/v2 3 | kind: HorizontalPodAutoscaler 4 | metadata: 5 | name: {{ include "myocidemo.fullname" . }} 6 | labels: 7 | {{- include "myocidemo.labels" . | nindent 4 }} 8 | spec: 9 | scaleTargetRef: 10 | apiVersion: apps/v1 11 | kind: Deployment 12 | name: {{ include "myocidemo.fullname" . }} 13 | minReplicas: {{ .Values.autoscaling.minReplicas }} 14 | maxReplicas: {{ .Values.autoscaling.maxReplicas }} 15 | metrics: 16 | {{- if .Values.autoscaling.targetCPUUtilizationPercentage }} 17 | - type: Resource 18 | resource: 19 | name: cpu 20 | target: 21 | type: Utilization 22 | averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} 23 | {{- end }} 24 | {{- if .Values.autoscaling.targetMemoryUtilizationPercentage }} 25 | - type: Resource 26 | resource: 27 | name: memory 28 | target: 29 | type: Utilization 30 | averageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }} 31 | {{- end }} 32 | {{- end }} 33 | -------------------------------------------------------------------------------- /47-Helm-Use-OCI-based-Registries/myocidemo/templates/service.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: {{ include "myocidemo.fullname" . }} 5 | labels: 6 | {{- include "myocidemo.labels" . | nindent 4 }} 7 | spec: 8 | type: {{ .Values.service.type }} 9 | ports: 10 | - port: {{ .Values.service.port }} 11 | targetPort: http 12 | protocol: TCP 13 | name: http 14 | selector: 15 | {{- include "myocidemo.selectorLabels" . | nindent 4 }} 16 | -------------------------------------------------------------------------------- /47-Helm-Use-OCI-based-Registries/myocidemo/templates/serviceaccount.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.serviceAccount.create -}} 2 | apiVersion: v1 3 | kind: ServiceAccount 4 | metadata: 5 | name: {{ include "myocidemo.serviceAccountName" . }} 6 | labels: 7 | {{- include "myocidemo.labels" . | nindent 4 }} 8 | {{- with .Values.serviceAccount.annotations }} 9 | annotations: 10 | {{- toYaml . | nindent 4 }} 11 | {{- end }} 12 | {{- end }} 13 | -------------------------------------------------------------------------------- /47-Helm-Use-OCI-based-Registries/myocidemo/templates/tests/test-connection.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Pod 3 | metadata: 4 | name: "{{ include "myocidemo.fullname" . }}-test-connection" 5 | labels: 6 | {{- include "myocidemo.labels" . | nindent 4 }} 7 | annotations: 8 | "helm.sh/hook": test 9 | spec: 10 | containers: 11 | - name: wget 12 | image: busybox 13 | command: ['wget'] 14 | args: ['{{ include "myocidemo.fullname" . }}:{{ .Values.service.port }}'] 15 | restartPolicy: Never 16 | -------------------------------------------------------------------------------- /47-Helm-Use-OCI-based-Registries/mypackages/myocidemo-0.1.0.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stacksimplify/helm-masterclass/2c76ce8db38dc5c901b4c1901707987c1e0413c1/47-Helm-Use-OCI-based-Registries/mypackages/myocidemo-0.1.0.tgz -------------------------------------------------------------------------------- /47-Helm-Use-OCI-based-Registries/mypackages/myocidemo-0.2.0.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stacksimplify/helm-masterclass/2c76ce8db38dc5c901b4c1901707987c1e0413c1/47-Helm-Use-OCI-based-Registries/mypackages/myocidemo-0.2.0.tgz -------------------------------------------------------------------------------- /course-presentation/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stacksimplify/helm-masterclass/2c76ce8db38dc5c901b4c1901707987c1e0413c1/course-presentation/.DS_Store -------------------------------------------------------------------------------- /course-presentation/Helm-Masterclass-v3.pptx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stacksimplify/helm-masterclass/2c76ce8db38dc5c901b4c1901707987c1e0413c1/course-presentation/Helm-Masterclass-v3.pptx -------------------------------------------------------------------------------- /git-deploy.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | echo "Add files and do local commit" 4 | git add . 5 | git commit -am "Welcome to StackSimplify" 6 | 7 | echo "Pushing to Github Repository" 8 | git push 9 | -------------------------------------------------------------------------------- /images/helm-highest-rated.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stacksimplify/helm-masterclass/2c76ce8db38dc5c901b4c1901707987c1e0413c1/images/helm-highest-rated.png -------------------------------------------------------------------------------- /images/helm-masterclass.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stacksimplify/helm-masterclass/2c76ce8db38dc5c901b4c1901707987c1e0413c1/images/helm-masterclass.png --------------------------------------------------------------------------------