Skip to content

NimTechnology

Trình bày các công nghệ CLOUD một cách dễ hiểu.

  • Kubernetes & Container
    • Docker
    • Kubernetes
      • Ingress
    • Helm Chart
    • Isito-EnvoyFilter
    • Apache Kafka
      • Kafka
      • Kafka Connect
      • Lenses
    • Vault
    • Longhorn – Storage
    • VictoriaMetrics
  • CI/CD
    • ArgoCD
    • ArgoWorkflows
    • Spinnaker
    • Jenkins
    • Harbor
    • TeamCity
    • Git
      • Bitbucket
  • Coding
    • Terraform
      • GCP – Google Cloud
      • AWS – Amazon Web Service
    • Golang
    • Laravel
    • Python
    • Jquery & JavaScript
    • Selenium
  • Log & Monitor
    • Prometheus
    • Grafana
    • ELK
      • Kibana
      • Logstash
  • BareMetal
  • Toggle search form

[helm-chart] Using “toYaml” to design helm-chart – Kubernetes

Posted on January 20, 2022January 20, 2022 By nim No Comments on [helm-chart] Using “toYaml” to design helm-chart – Kubernetes

chúng ta có values.yaml

ingress:
  annotations:
    kubernetes.io/ingress.class: nginx
    nginx.ingress.kubernetes.io/ssl-redirect: "true"
    nginx.ingress.kubernetes.io/backend-protocol: "GRPC"

template như sau:

kind: Ingress
{{ template "common.metadata" . }}
    {{- if .Values.istio.enabled }}
    istio-nosync: "true"
    {{- end }}
  annotations:
{{ toYaml .Values.ingress.annotations | indent 4 }}

{{ toYaml .Values.ingress.annotations | indent 4 }}
nghĩ là nó lấy toàn bộ data phía sau của ingress -> annotations, rồi đặt vào chỗ toYaml đã lùi 4 space

Nhìn hình là hiểu liền

Mình còn 1 sỗ ví dụ về toYaml
https://github.com/vmware-tanzu/helm-charts/blob/main/charts/velero/templates/deployment.yaml#L9-L12

  {{- with .Values.annotations }}
  annotations:
    {{- toYaml . | nindent 4 }}
  {{- end }}
Helm Chart

Post navigation

Previous Post: [issues-Kaniko] The problems on the Kaniko.
Next Post: [Logstash] Discovering Pipeline inside Logstash

More Related Articles

[Helm Chart] Tìm hiểu fullnameOverride và .fullname trong helm chart. Helm Chart
[Kustomize] How to combine Kustomize and Helm-chart! Helm Chart
[helm chart] How to use “range” in helm chart – Kubernetes Helm Chart
[Helm Chart] Tìm hiểu – (gạch giữa), _ (gạch dưới), dấu chấm “.” trong helm chart Helm Chart
[Helm-k8s] Researching to write a unit test for your helm chart – Kubernetes Helm Chart
[kubectl/helm] invalid apiVersion “client.authentication.k8s.io/v1alpha1” Helm Chart

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Tham Gia Group DevOps nhé!
Để Nim có nhiều động lực ra nhiều bài viết.
Để nhận được những thông báo mới nhất.

Recent Posts

  • [Smartctl] Instruction check the health disk of Raspberry. January 16, 2023
  • [kubectl/Argocd] How to create a kubectl config file for serviceaccount or from the cluster secret of Argocd January 12, 2023
  • [Helm/Github] Create a public Helm chart repository with GitHub Pages January 8, 2023
  • [AWS] How to increase the disk size of a Windows EC2 machine? January 4, 2023
  • [Redis] ElastiCache-Redis Cross-Region Replication|Global DataStore January 3, 2023

Archives

  • January 2023
  • December 2022
  • November 2022
  • October 2022
  • September 2022
  • August 2022
  • July 2022
  • June 2022
  • May 2022
  • April 2022
  • March 2022
  • February 2022
  • January 2022
  • December 2021
  • November 2021
  • October 2021
  • September 2021
  • August 2021
  • July 2021
  • June 2021

Categories

  • BareMetal
  • CI/CD
    • ArgoCD
    • ArgoWorkflows
    • Git
      • Bitbucket
    • Harbor
    • Jenkins
    • Spinnaker
    • TeamCity
  • Coding
    • Golang
    • Jquery & JavaScript
    • Laravel
    • Python
    • Selenium
    • Terraform
      • AWS – Amazon Web Service
      • GCP – Google Cloud
  • Kubernetes & Container
    • Apache Kafka
      • Kafka
      • Kafka Connect
      • Lenses
    • Docker
    • Helm Chart
    • Isito-EnvoyFilter
    • Kubernetes
      • Ingress
    • Longhorn – Storage
    • Vault
    • VictoriaMetrics
  • Log & Monitor
    • ELK
      • Kibana
      • Logstash
    • Grafana
    • Prometheus
  • Uncategorized
  • Admin

Copyright © 2023 NimTechnology.