SlideShare a Scribd company logo
1 of 39
Design templates and inheritance.
Best practices for K8S releases.
2022 | apprecode.com
CEO and Co-founder
BY VOLODYMYR SHYNKAR
WRITE YOUR HELM CHARTS
AS A PROFESSIONAL
[devops@stage ~]$ cat ABOUT_ME.md
7+ years of commercial DevOps experience.
Overall 9+ years of Engineering
Successfully migrated, rolled out, consulted over
20 projects in the healthcare, gambling,
automotive, fintech, ecommerce, construction
industries
Certified SAFe Agile Software Engineer
Addicted to IoT and Smart Home
Cyclist, promoter of a healthy lifestyle
[devops@stage ~]$
VOLODYMYR SHYNKAR
CEO/Co-founder at AppRecode
AGENDA
Helm - benefits and lifecycle
Helm - basic functions and templates
Helm - advanced loops and inheritance
CI/CD releases and integrations
01
02
03
04
HELM - BENEFITS
AND LIFECYCLE
01
BENEFITS Packaging way (Artifact)
Well customizable application
during deployment
Gets your CI/CD pipelines to the
next level
Ready to use community
packages as dependencies
Reduces the complexity of
creating various environments
BENEFITS
Can be reused
Versionable
Easy rollbacks
Better than your ex kubectl apply -f
How to use? It is easy!
Chart structure
~ $ helm create myapp
Creating myapp
Chart.yaml
Dependencies
What is Helm Repository?
https://charts.bitnami.com/bitnami/index.yaml
GitHub Pages
GitHub branch
S3 WSH (CloudFront)
S3 Proxy to serve repo internally
Any other web server
Dependencies
Values file
Must have
Built-in
Inteprolated? Yes, but no.
Multiple envs
Multiple values files
Override via console argument
Git branches (not the best)
How to verify and test charts?
Lint: helm lint
Print results: helm template –debug
Print results and verify with cluster:
helm install --dry-run –debug
Validate templates: helm validate
Connection tests via hooks in templates/tests:
helm.sh/hook: test
Versioning and Release
Continuous development/improvement
Keep track of the changes + change log
Different environments
Your are provide Helm charts as a service
Helm - basic functions
and templates
02
Variables
Built-in Objects
Values file
Custom variables
Global values
Named templates
Trigger deployment if ConfigMap was changed
Built-in Objects
Values file
Custom variables
Global values
Named templates
Release, Chart, Files, Capabilities, Template
Variables
Built-in Objects
Values file
Custom variables
Global values
Named templates
Interpolation in Values file
Built-in Objects
Values file
Custom variables
Global values
Named templates
Variables
Built-in Objects
Values file
Custom variables
Global values
Named templates
Sometimes you might need to use the same construction several times.
In this case you can create a custom variable {{- $fullName := include ”myapp.fullname" . -}}
Variables
Built-in Objects
Values file
Custom variables
Global values
Named templates
• Sometimes you might need to use the same inputs in several charts
• You don’t want to manage the same scope in several places
• You can mismatch or forget to update another place
Variables
Built-in Objects
Values file
Custom variables
Global values
Named templates
This template will help you to set repeated attributes which should be common for your manifects
- labels, selectors, names, complicated constructions what is that?
Variables
Built-in Objects
Values file
Custom variables
Global values
Named templates
Functions and Pipelines
Helm has over 60 available functions.
quote; squote; default; lower; upper; repeat; replace; printf;
lookup; range; with; if; indent; nindent; toYaml; camelcase
Helm - advanced loops
and inheritance
03
Loops and conditions
Finally, we came to the most exciting part.
•if/else for creating conditional blocks
•with to specify a scope
•range, which provides a "for each"-style loop
Conditions
If not | eq | or | and
{{- if and .Values.val1 (not .Values.val2) }}
Loops
Modifying scope using with
Looping with the range action
Another use case of using Custom Variable
We can reffer a root scope by $ sign.
Loops
Modifying scope using with
Looping with the range action
Another use case of using Custom Variable
We can reffer a root scope by $ sign.
Inheritance
Helm has several inheritances
• charts
• global values
• templates
Sharing Templates with Subcharts
Parent charts and subcharts can share templates. Any defined block in any
chart is available to other charts.
For example, we can define a simple template like this:
{{- define "labels" }}from: mysubchart{{ end }}
CD releases and
integrations
04
CI/CD releases for Helm charts
Release your Helm charts as any other products
https://github.com/marketplace/actions/helm-chart-releaser
CD releases with Helm
You can keep your Helm charts in code repo and just replace
image tag during release
You can reuse the Chart as dependency and override things
with short values file(s)
CD releases with Helm and GitOps
All the same as on previous slide, but GitOps operator will
take care of:
• Managing versions
• Keep state and avoid diffs
• Overview of installed resources and their statuses
• Nice UI with possibility to install other Helm charts without
touching Kubernetes at all
Helm and OperatorHub
OperatorHub.io is a new home for the Kubernetes community
to share Operators. Find an existing Operator or list your own
today.
WE ARE CODE
DEPLOY
BUILD
ARCHITECTURE
HIRING
WE ARE ARCHITECTURE
WE ARE DESIGN
DESIGN
WE ARE BUILD
WE ARE DEPLOY
WE ARE HIRING
CODE

More Related Content

What's hot

Terraform modules and best-practices - September 2018
Terraform modules and best-practices - September 2018Terraform modules and best-practices - September 2018
Terraform modules and best-practices - September 2018Anton Babenko
 
Angular 2.0 forms
Angular 2.0 formsAngular 2.0 forms
Angular 2.0 formsEyal Vardi
 
Django Architecture Introduction
Django Architecture IntroductionDjango Architecture Introduction
Django Architecture IntroductionHaiqi Chen
 
Flink Forward Berlin 2017: Patrick Lucas - Flink in Containerland
Flink Forward Berlin 2017: Patrick Lucas - Flink in ContainerlandFlink Forward Berlin 2017: Patrick Lucas - Flink in Containerland
Flink Forward Berlin 2017: Patrick Lucas - Flink in ContainerlandFlink Forward
 
An intro to Docker, Terraform, and Amazon ECS
An intro to Docker, Terraform, and Amazon ECSAn intro to Docker, Terraform, and Amazon ECS
An intro to Docker, Terraform, and Amazon ECSYevgeniy Brikman
 
Helm - Package Manager for Kubernetes
Helm - Package Manager for KubernetesHelm - Package Manager for Kubernetes
Helm - Package Manager for KubernetesKnoldus Inc.
 
Terraform -- Infrastructure as Code
Terraform -- Infrastructure as CodeTerraform -- Infrastructure as Code
Terraform -- Infrastructure as CodeMartin Schütte
 
Redux Toolkit - Quick Intro - 2022
Redux Toolkit - Quick Intro - 2022Redux Toolkit - Quick Intro - 2022
Redux Toolkit - Quick Intro - 2022Fabio Biondi
 
Automation with ansible
Automation with ansibleAutomation with ansible
Automation with ansibleKhizer Naeem
 
Ansible Integration in Foreman
Ansible Integration in ForemanAnsible Integration in Foreman
Ansible Integration in ForemanNikhil Kathole
 
Terraform modules restructured
Terraform modules restructuredTerraform modules restructured
Terraform modules restructuredAmi Mahloof
 
Owl: The New Odoo UI Framework
Owl: The New Odoo UI FrameworkOwl: The New Odoo UI Framework
Owl: The New Odoo UI FrameworkOdoo
 
Where is my bottleneck? Performance troubleshooting in Flink
Where is my bottleneck? Performance troubleshooting in FlinkWhere is my bottleneck? Performance troubleshooting in Flink
Where is my bottleneck? Performance troubleshooting in FlinkFlink Forward
 
AEM Asset and Tag API
AEM Asset and Tag APIAEM Asset and Tag API
AEM Asset and Tag APILokesh BS
 

What's hot (20)

Terraform modules and best-practices - September 2018
Terraform modules and best-practices - September 2018Terraform modules and best-practices - September 2018
Terraform modules and best-practices - September 2018
 
Angular 2.0 forms
Angular 2.0 formsAngular 2.0 forms
Angular 2.0 forms
 
Django Architecture Introduction
Django Architecture IntroductionDjango Architecture Introduction
Django Architecture Introduction
 
Flink Forward Berlin 2017: Patrick Lucas - Flink in Containerland
Flink Forward Berlin 2017: Patrick Lucas - Flink in ContainerlandFlink Forward Berlin 2017: Patrick Lucas - Flink in Containerland
Flink Forward Berlin 2017: Patrick Lucas - Flink in Containerland
 
What Is Helm
 What Is Helm What Is Helm
What Is Helm
 
Xke spring boot
Xke spring bootXke spring boot
Xke spring boot
 
An intro to Docker, Terraform, and Amazon ECS
An intro to Docker, Terraform, and Amazon ECSAn intro to Docker, Terraform, and Amazon ECS
An intro to Docker, Terraform, and Amazon ECS
 
Helm - Package Manager for Kubernetes
Helm - Package Manager for KubernetesHelm - Package Manager for Kubernetes
Helm - Package Manager for Kubernetes
 
Terraform -- Infrastructure as Code
Terraform -- Infrastructure as CodeTerraform -- Infrastructure as Code
Terraform -- Infrastructure as Code
 
Helm intro
Helm introHelm intro
Helm intro
 
Redux Toolkit - Quick Intro - 2022
Redux Toolkit - Quick Intro - 2022Redux Toolkit - Quick Intro - 2022
Redux Toolkit - Quick Intro - 2022
 
Automation with ansible
Automation with ansibleAutomation with ansible
Automation with ansible
 
Jboss Tutorial Basics
Jboss Tutorial BasicsJboss Tutorial Basics
Jboss Tutorial Basics
 
Ansible Integration in Foreman
Ansible Integration in ForemanAnsible Integration in Foreman
Ansible Integration in Foreman
 
Spring Security 5
Spring Security 5Spring Security 5
Spring Security 5
 
Terraform modules restructured
Terraform modules restructuredTerraform modules restructured
Terraform modules restructured
 
Effective terraform
Effective terraformEffective terraform
Effective terraform
 
Owl: The New Odoo UI Framework
Owl: The New Odoo UI FrameworkOwl: The New Odoo UI Framework
Owl: The New Odoo UI Framework
 
Where is my bottleneck? Performance troubleshooting in Flink
Where is my bottleneck? Performance troubleshooting in FlinkWhere is my bottleneck? Performance troubleshooting in Flink
Where is my bottleneck? Performance troubleshooting in Flink
 
AEM Asset and Tag API
AEM Asset and Tag APIAEM Asset and Tag API
AEM Asset and Tag API
 

Similar to Write your Helm charts as a professional. Design templates and inheritance. Best practices for K8S releases

Devoxx UK 2018 - A cloud application journey with helm and kubernetes
Devoxx UK 2018 - A cloud application journey with helm and kubernetesDevoxx UK 2018 - A cloud application journey with helm and kubernetes
Devoxx UK 2018 - A cloud application journey with helm and kubernetesAna-Maria Mihalceanu
 
Building a Custom Theme in Drupal 8
Building a Custom Theme in Drupal 8Building a Custom Theme in Drupal 8
Building a Custom Theme in Drupal 8Anne Tomasevich
 
Refactoring to Scala DSLs and LiftOff 2009 Recap
Refactoring to Scala DSLs and LiftOff 2009 RecapRefactoring to Scala DSLs and LiftOff 2009 Recap
Refactoring to Scala DSLs and LiftOff 2009 RecapDave Orme
 
Development workflow guide for building docker apps
Development workflow guide for building docker appsDevelopment workflow guide for building docker apps
Development workflow guide for building docker appsAbdul Khan
 
Development workflow guide for building docker apps
Development workflow guide for building docker appsDevelopment workflow guide for building docker apps
Development workflow guide for building docker appsAbdul Khan
 
Building and Maintaining a Distribution in Drupal 7 with Features
Building and Maintaining a  Distribution in Drupal 7 with FeaturesBuilding and Maintaining a  Distribution in Drupal 7 with Features
Building and Maintaining a Distribution in Drupal 7 with FeaturesNuvole
 
Building and Deployment of Drupal sites with Features and Context
Building and Deployment of Drupal sites with Features and ContextBuilding and Deployment of Drupal sites with Features and Context
Building and Deployment of Drupal sites with Features and ContextSvilen Sabev
 
Case Study _Cloud Native Transformation Deploying Integration workloads to AK...
Case Study _Cloud Native Transformation Deploying Integration workloads to AK...Case Study _Cloud Native Transformation Deploying Integration workloads to AK...
Case Study _Cloud Native Transformation Deploying Integration workloads to AK...Srikanth Prathipati
 
CD in kubernetes using helm and ksonnet. Stas Kolenkin
CD in kubernetes using helm and ksonnet. Stas KolenkinCD in kubernetes using helm and ksonnet. Stas Kolenkin
CD in kubernetes using helm and ksonnet. Stas KolenkinDataArt
 
Kubecon 2019 - Promoting Kubernetes CI/CD to the Next Level
Kubecon 2019 - Promoting Kubernetes CI/CD to the Next LevelKubecon 2019 - Promoting Kubernetes CI/CD to the Next Level
Kubecon 2019 - Promoting Kubernetes CI/CD to the Next LevelTim Pouyer
 
Advanced EPUB creation for iPad with Adobe InDesign CC - Digital Book World 2014
Advanced EPUB creation for iPad with Adobe InDesign CC - Digital Book World 2014Advanced EPUB creation for iPad with Adobe InDesign CC - Digital Book World 2014
Advanced EPUB creation for iPad with Adobe InDesign CC - Digital Book World 2014DouglasWaterfall
 
Strategies and Tips for Building Enterprise Drupal Applications - PNWDS 2013
Strategies and Tips for Building Enterprise Drupal Applications - PNWDS 2013Strategies and Tips for Building Enterprise Drupal Applications - PNWDS 2013
Strategies and Tips for Building Enterprise Drupal Applications - PNWDS 2013Mack Hardy
 
DevOps: Kubernetes + Helm with Azure
DevOps: Kubernetes + Helm with AzureDevOps: Kubernetes + Helm with Azure
DevOps: Kubernetes + Helm with AzureJessica Deen
 
Brand Your Community Using Less and Gulp
Brand Your Community Using Less and GulpBrand Your Community Using Less and Gulp
Brand Your Community Using Less and Gulpshujiui
 
Brand Your Community Using Less and Gulp
Brand Your Community Using Less and GulpBrand Your Community Using Less and Gulp
Brand Your Community Using Less and GulpSalesforce Developers
 
Kubernetes Application Deployment with Helm - A beginner Guide!
Kubernetes Application Deployment with Helm - A beginner Guide!Kubernetes Application Deployment with Helm - A beginner Guide!
Kubernetes Application Deployment with Helm - A beginner Guide!Krishna-Kumar
 

Similar to Write your Helm charts as a professional. Design templates and inheritance. Best practices for K8S releases (20)

Devoxx UK 2018 - A cloud application journey with helm and kubernetes
Devoxx UK 2018 - A cloud application journey with helm and kubernetesDevoxx UK 2018 - A cloud application journey with helm and kubernetes
Devoxx UK 2018 - A cloud application journey with helm and kubernetes
 
Best Practices with Azure & Kubernetes
Best Practices with Azure & KubernetesBest Practices with Azure & Kubernetes
Best Practices with Azure & Kubernetes
 
Building a Custom Theme in Drupal 8
Building a Custom Theme in Drupal 8Building a Custom Theme in Drupal 8
Building a Custom Theme in Drupal 8
 
Refactoring to Scala DSLs and LiftOff 2009 Recap
Refactoring to Scala DSLs and LiftOff 2009 RecapRefactoring to Scala DSLs and LiftOff 2009 Recap
Refactoring to Scala DSLs and LiftOff 2009 Recap
 
Development workflow guide for building docker apps
Development workflow guide for building docker appsDevelopment workflow guide for building docker apps
Development workflow guide for building docker apps
 
Development workflow guide for building docker apps
Development workflow guide for building docker appsDevelopment workflow guide for building docker apps
Development workflow guide for building docker apps
 
Building and Maintaining a Distribution in Drupal 7 with Features
Building and Maintaining a  Distribution in Drupal 7 with FeaturesBuilding and Maintaining a  Distribution in Drupal 7 with Features
Building and Maintaining a Distribution in Drupal 7 with Features
 
Manual
ManualManual
Manual
 
Building and Deployment of Drupal sites with Features and Context
Building and Deployment of Drupal sites with Features and ContextBuilding and Deployment of Drupal sites with Features and Context
Building and Deployment of Drupal sites with Features and Context
 
Case Study _Cloud Native Transformation Deploying Integration workloads to AK...
Case Study _Cloud Native Transformation Deploying Integration workloads to AK...Case Study _Cloud Native Transformation Deploying Integration workloads to AK...
Case Study _Cloud Native Transformation Deploying Integration workloads to AK...
 
Coding standards
Coding standards Coding standards
Coding standards
 
CD in kubernetes using helm and ksonnet. Stas Kolenkin
CD in kubernetes using helm and ksonnet. Stas KolenkinCD in kubernetes using helm and ksonnet. Stas Kolenkin
CD in kubernetes using helm and ksonnet. Stas Kolenkin
 
Kubecon 2019 - Promoting Kubernetes CI/CD to the Next Level
Kubecon 2019 - Promoting Kubernetes CI/CD to the Next LevelKubecon 2019 - Promoting Kubernetes CI/CD to the Next Level
Kubecon 2019 - Promoting Kubernetes CI/CD to the Next Level
 
Advanced EPUB creation for iPad with Adobe InDesign CC - Digital Book World 2014
Advanced EPUB creation for iPad with Adobe InDesign CC - Digital Book World 2014Advanced EPUB creation for iPad with Adobe InDesign CC - Digital Book World 2014
Advanced EPUB creation for iPad with Adobe InDesign CC - Digital Book World 2014
 
Strategies and Tips for Building Enterprise Drupal Applications - PNWDS 2013
Strategies and Tips for Building Enterprise Drupal Applications - PNWDS 2013Strategies and Tips for Building Enterprise Drupal Applications - PNWDS 2013
Strategies and Tips for Building Enterprise Drupal Applications - PNWDS 2013
 
DevOps: Kubernetes + Helm with Azure
DevOps: Kubernetes + Helm with AzureDevOps: Kubernetes + Helm with Azure
DevOps: Kubernetes + Helm with Azure
 
Brand Your Community Using Less and Gulp
Brand Your Community Using Less and GulpBrand Your Community Using Less and Gulp
Brand Your Community Using Less and Gulp
 
Brand Your Community Using Less and Gulp
Brand Your Community Using Less and GulpBrand Your Community Using Less and Gulp
Brand Your Community Using Less and Gulp
 
Arc+ EXEcutive 2010
Arc+ EXEcutive 2010Arc+ EXEcutive 2010
Arc+ EXEcutive 2010
 
Kubernetes Application Deployment with Helm - A beginner Guide!
Kubernetes Application Deployment with Helm - A beginner Guide!Kubernetes Application Deployment with Helm - A beginner Guide!
Kubernetes Application Deployment with Helm - A beginner Guide!
 

Recently uploaded

Comparative study of High-rise Building Using ETABS,SAP200 and SAFE., SAFE an...
Comparative study of High-rise Building Using ETABS,SAP200 and SAFE., SAFE an...Comparative study of High-rise Building Using ETABS,SAP200 and SAFE., SAFE an...
Comparative study of High-rise Building Using ETABS,SAP200 and SAFE., SAFE an...Erbil Polytechnic University
 
11. Properties of Liquid Fuels in Energy Engineering.pdf
11. Properties of Liquid Fuels in Energy Engineering.pdf11. Properties of Liquid Fuels in Energy Engineering.pdf
11. Properties of Liquid Fuels in Energy Engineering.pdfHafizMudaserAhmad
 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...VICTOR MAESTRE RAMIREZ
 
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort servicejennyeacort
 
US Department of Education FAFSA Week of Action
US Department of Education FAFSA Week of ActionUS Department of Education FAFSA Week of Action
US Department of Education FAFSA Week of ActionMebane Rash
 
Crystal Structure analysis and detailed information pptx
Crystal Structure analysis and detailed information pptxCrystal Structure analysis and detailed information pptx
Crystal Structure analysis and detailed information pptxachiever3003
 
Ch10-Global Supply Chain - Cadena de Suministro.pdf
Ch10-Global Supply Chain - Cadena de Suministro.pdfCh10-Global Supply Chain - Cadena de Suministro.pdf
Ch10-Global Supply Chain - Cadena de Suministro.pdfChristianCDAM
 
Work Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvvWork Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvvLewisJB
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024Mark Billinghurst
 
Industrial Safety Unit-IV workplace health and safety.ppt
Industrial Safety Unit-IV workplace health and safety.pptIndustrial Safety Unit-IV workplace health and safety.ppt
Industrial Safety Unit-IV workplace health and safety.pptNarmatha D
 
"Exploring the Essential Functions and Design Considerations of Spillways in ...
"Exploring the Essential Functions and Design Considerations of Spillways in ..."Exploring the Essential Functions and Design Considerations of Spillways in ...
"Exploring the Essential Functions and Design Considerations of Spillways in ...Erbil Polytechnic University
 
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)Dr SOUNDIRARAJ N
 
National Level Hackathon Participation Certificate.pdf
National Level Hackathon Participation Certificate.pdfNational Level Hackathon Participation Certificate.pdf
National Level Hackathon Participation Certificate.pdfRajuKanojiya4
 
THE SENDAI FRAMEWORK FOR DISASTER RISK REDUCTION
THE SENDAI FRAMEWORK FOR DISASTER RISK REDUCTIONTHE SENDAI FRAMEWORK FOR DISASTER RISK REDUCTION
THE SENDAI FRAMEWORK FOR DISASTER RISK REDUCTIONjhunlian
 
Virtual memory management in Operating System
Virtual memory management in Operating SystemVirtual memory management in Operating System
Virtual memory management in Operating SystemRashmi Bhat
 
Unit7-DC_Motors nkkjnsdkfnfcdfknfdgfggfg
Unit7-DC_Motors nkkjnsdkfnfcdfknfdgfggfgUnit7-DC_Motors nkkjnsdkfnfcdfknfdgfggfg
Unit7-DC_Motors nkkjnsdkfnfcdfknfdgfggfgsaravananr517913
 
Earthing details of Electrical Substation
Earthing details of Electrical SubstationEarthing details of Electrical Substation
Earthing details of Electrical Substationstephanwindworld
 
Correctly Loading Incremental Data at Scale
Correctly Loading Incremental Data at ScaleCorrectly Loading Incremental Data at Scale
Correctly Loading Incremental Data at ScaleAlluxio, Inc.
 
Internet of things -Arshdeep Bahga .pptx
Internet of things -Arshdeep Bahga .pptxInternet of things -Arshdeep Bahga .pptx
Internet of things -Arshdeep Bahga .pptxVelmuruganTECE
 

Recently uploaded (20)

Comparative study of High-rise Building Using ETABS,SAP200 and SAFE., SAFE an...
Comparative study of High-rise Building Using ETABS,SAP200 and SAFE., SAFE an...Comparative study of High-rise Building Using ETABS,SAP200 and SAFE., SAFE an...
Comparative study of High-rise Building Using ETABS,SAP200 and SAFE., SAFE an...
 
11. Properties of Liquid Fuels in Energy Engineering.pdf
11. Properties of Liquid Fuels in Energy Engineering.pdf11. Properties of Liquid Fuels in Energy Engineering.pdf
11. Properties of Liquid Fuels in Energy Engineering.pdf
 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...
 
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
 
US Department of Education FAFSA Week of Action
US Department of Education FAFSA Week of ActionUS Department of Education FAFSA Week of Action
US Department of Education FAFSA Week of Action
 
Crystal Structure analysis and detailed information pptx
Crystal Structure analysis and detailed information pptxCrystal Structure analysis and detailed information pptx
Crystal Structure analysis and detailed information pptx
 
Ch10-Global Supply Chain - Cadena de Suministro.pdf
Ch10-Global Supply Chain - Cadena de Suministro.pdfCh10-Global Supply Chain - Cadena de Suministro.pdf
Ch10-Global Supply Chain - Cadena de Suministro.pdf
 
Work Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvvWork Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvv
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024
 
Industrial Safety Unit-IV workplace health and safety.ppt
Industrial Safety Unit-IV workplace health and safety.pptIndustrial Safety Unit-IV workplace health and safety.ppt
Industrial Safety Unit-IV workplace health and safety.ppt
 
"Exploring the Essential Functions and Design Considerations of Spillways in ...
"Exploring the Essential Functions and Design Considerations of Spillways in ..."Exploring the Essential Functions and Design Considerations of Spillways in ...
"Exploring the Essential Functions and Design Considerations of Spillways in ...
 
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
 
National Level Hackathon Participation Certificate.pdf
National Level Hackathon Participation Certificate.pdfNational Level Hackathon Participation Certificate.pdf
National Level Hackathon Participation Certificate.pdf
 
THE SENDAI FRAMEWORK FOR DISASTER RISK REDUCTION
THE SENDAI FRAMEWORK FOR DISASTER RISK REDUCTIONTHE SENDAI FRAMEWORK FOR DISASTER RISK REDUCTION
THE SENDAI FRAMEWORK FOR DISASTER RISK REDUCTION
 
Virtual memory management in Operating System
Virtual memory management in Operating SystemVirtual memory management in Operating System
Virtual memory management in Operating System
 
Unit7-DC_Motors nkkjnsdkfnfcdfknfdgfggfg
Unit7-DC_Motors nkkjnsdkfnfcdfknfdgfggfgUnit7-DC_Motors nkkjnsdkfnfcdfknfdgfggfg
Unit7-DC_Motors nkkjnsdkfnfcdfknfdgfggfg
 
POWER SYSTEMS-1 Complete notes examples
POWER SYSTEMS-1 Complete notes  examplesPOWER SYSTEMS-1 Complete notes  examples
POWER SYSTEMS-1 Complete notes examples
 
Earthing details of Electrical Substation
Earthing details of Electrical SubstationEarthing details of Electrical Substation
Earthing details of Electrical Substation
 
Correctly Loading Incremental Data at Scale
Correctly Loading Incremental Data at ScaleCorrectly Loading Incremental Data at Scale
Correctly Loading Incremental Data at Scale
 
Internet of things -Arshdeep Bahga .pptx
Internet of things -Arshdeep Bahga .pptxInternet of things -Arshdeep Bahga .pptx
Internet of things -Arshdeep Bahga .pptx
 

Write your Helm charts as a professional. Design templates and inheritance. Best practices for K8S releases

  • 1. Design templates and inheritance. Best practices for K8S releases. 2022 | apprecode.com CEO and Co-founder BY VOLODYMYR SHYNKAR WRITE YOUR HELM CHARTS AS A PROFESSIONAL
  • 2. [devops@stage ~]$ cat ABOUT_ME.md 7+ years of commercial DevOps experience. Overall 9+ years of Engineering Successfully migrated, rolled out, consulted over 20 projects in the healthcare, gambling, automotive, fintech, ecommerce, construction industries Certified SAFe Agile Software Engineer Addicted to IoT and Smart Home Cyclist, promoter of a healthy lifestyle [devops@stage ~]$ VOLODYMYR SHYNKAR CEO/Co-founder at AppRecode
  • 3. AGENDA Helm - benefits and lifecycle Helm - basic functions and templates Helm - advanced loops and inheritance CI/CD releases and integrations 01 02 03 04
  • 4. HELM - BENEFITS AND LIFECYCLE 01
  • 5. BENEFITS Packaging way (Artifact) Well customizable application during deployment Gets your CI/CD pipelines to the next level Ready to use community packages as dependencies Reduces the complexity of creating various environments
  • 6. BENEFITS Can be reused Versionable Easy rollbacks Better than your ex kubectl apply -f
  • 7. How to use? It is easy!
  • 8. Chart structure ~ $ helm create myapp Creating myapp
  • 11. What is Helm Repository? https://charts.bitnami.com/bitnami/index.yaml GitHub Pages GitHub branch S3 WSH (CloudFront) S3 Proxy to serve repo internally Any other web server
  • 14. Multiple envs Multiple values files Override via console argument Git branches (not the best)
  • 15. How to verify and test charts? Lint: helm lint Print results: helm template –debug Print results and verify with cluster: helm install --dry-run –debug Validate templates: helm validate Connection tests via hooks in templates/tests: helm.sh/hook: test
  • 16. Versioning and Release Continuous development/improvement Keep track of the changes + change log Different environments Your are provide Helm charts as a service
  • 17. Helm - basic functions and templates 02
  • 18. Variables Built-in Objects Values file Custom variables Global values Named templates
  • 19. Trigger deployment if ConfigMap was changed Built-in Objects Values file Custom variables Global values Named templates Release, Chart, Files, Capabilities, Template
  • 20. Variables Built-in Objects Values file Custom variables Global values Named templates
  • 21. Interpolation in Values file Built-in Objects Values file Custom variables Global values Named templates
  • 22. Variables Built-in Objects Values file Custom variables Global values Named templates Sometimes you might need to use the same construction several times. In this case you can create a custom variable {{- $fullName := include ”myapp.fullname" . -}}
  • 23. Variables Built-in Objects Values file Custom variables Global values Named templates • Sometimes you might need to use the same inputs in several charts • You don’t want to manage the same scope in several places • You can mismatch or forget to update another place
  • 24. Variables Built-in Objects Values file Custom variables Global values Named templates This template will help you to set repeated attributes which should be common for your manifects - labels, selectors, names, complicated constructions what is that?
  • 25. Variables Built-in Objects Values file Custom variables Global values Named templates
  • 26. Functions and Pipelines Helm has over 60 available functions. quote; squote; default; lower; upper; repeat; replace; printf; lookup; range; with; if; indent; nindent; toYaml; camelcase
  • 27. Helm - advanced loops and inheritance 03
  • 28. Loops and conditions Finally, we came to the most exciting part. •if/else for creating conditional blocks •with to specify a scope •range, which provides a "for each"-style loop
  • 29. Conditions If not | eq | or | and {{- if and .Values.val1 (not .Values.val2) }}
  • 30. Loops Modifying scope using with Looping with the range action Another use case of using Custom Variable We can reffer a root scope by $ sign.
  • 31. Loops Modifying scope using with Looping with the range action Another use case of using Custom Variable We can reffer a root scope by $ sign.
  • 32. Inheritance Helm has several inheritances • charts • global values • templates
  • 33. Sharing Templates with Subcharts Parent charts and subcharts can share templates. Any defined block in any chart is available to other charts. For example, we can define a simple template like this: {{- define "labels" }}from: mysubchart{{ end }}
  • 35. CI/CD releases for Helm charts Release your Helm charts as any other products https://github.com/marketplace/actions/helm-chart-releaser
  • 36. CD releases with Helm You can keep your Helm charts in code repo and just replace image tag during release You can reuse the Chart as dependency and override things with short values file(s)
  • 37. CD releases with Helm and GitOps All the same as on previous slide, but GitOps operator will take care of: • Managing versions • Keep state and avoid diffs • Overview of installed resources and their statuses • Nice UI with possibility to install other Helm charts without touching Kubernetes at all
  • 38. Helm and OperatorHub OperatorHub.io is a new home for the Kubernetes community to share Operators. Find an existing Operator or list your own today.
  • 39. WE ARE CODE DEPLOY BUILD ARCHITECTURE HIRING WE ARE ARCHITECTURE WE ARE DESIGN DESIGN WE ARE BUILD WE ARE DEPLOY WE ARE HIRING CODE