Skip to content

gurpreetsinghkhanna/punjab-InfraOps

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Digit Helm Deployment Common Chart

The common library chart has templates which eases deployment of a service on to Digit with recommended platform defaults which can further be customized to service or environment needs while abstracting the need to know kubernetes manifest syntax.

This helps us push defaults and changes to most, if not all, services deployed onto Digit.

Requirements

The default values file values.yaml has defaults for all manifest files, which can be overrides by service values file or environment override file.

The service template file _service.yaml used for generating a service manifest.

The ingress template file _ingress.yaml used for generating ingress manifest.

The deployment template file _deployment.yaml used for generating a deployment manifest.

Values template

Parameter Description Default
namespace Default namespace for the service egov
replicas Number of Pods to be created 1
httpPort Default port number for the service 8080
appType Application Type to configure defaults for appType, "java-spring" only type with defaults for now. For more details check values.yaml
labels Labels for the service, for example,
app: "egov-mdms-service"
group: "core"
''
ingress.enabled To add ingress controller for the service false
ingress.zuul When ingress is enabled, routes the request via Zuul API gateway false
ingress.context When ingress is enabled, exposes the following context path to the internet, example user ``
ingress.waf.enabled When ingress is enabled, Enable Web Application Firewall for the service true
image.pullPolicy To pull a Docker image from Docker repository, By default skip pulling an image if it already exists IfNotPresent
image.tag Docker image tag for the service latest
affinity.preferSpreadAcrossAZ To spread deployment replicas across multiple availability zones in cloud environment true
initContainers.dbMigration.enabled Add Flyway DB migration container for the service, requires schemaTable configuration! false
initContainers.dbMigration.schemaTable Schema table for the flyway db migration, required, if db migration enabled, ''
initContainers.dbMigration.image.pullPolicy Pulls the DB migration docker images from Docker repository IfNotPresent
initContainers.dbMigration.image.tag Docker image tag for the initcontainer latest
initContainers.dbMigration.env Allows the specification of additional environment variables. Passed through the tpl function and thus to be configured a string For Eg:
env: |
        - name: "FLYWAY_USER"
            valueFrom:
                secretKeyRef:
                        name: db
                        key: flyway-username
For more details check values.yaml
initContainers.gitSync.enabled To add a gitSync init container which clones a repository using configured ssh read token false
initContainers.gitSync.repo Git repository to be checked out, required, if gitSync enabled, example, [email protected]:egovernments/egov-mdms-data ''
initContainers.gitSync.branch Git repository branch to be checked out, required, if gitSync enabled, example, master ''
gitSync.image.repository Docker image of the gitSync init container k8s.gcr.io/git-sync
gitSync.image.tag Docker image tag of the gitSync init container v3.1.1
gitSync.image.pullPolicy Docker image pull policy for gitSync init container IfNotPresent
gitSync.env Allows the specification of additional environment variables. Passed through the tpl function and thus to be configured a string For Eg:
env: |
        - name: "GIT_SYNC_REPO"
            value: "{{ .Values.initContainers.gitSync.repo }}"
For more details check values.yaml
healthChecks.enabled To enable/disable healthchecks [Liveness probes and Readiness probes] for a pod false
healthChecks.livenessProbe Allows the specification of additional environment variables. Passed through the tpl function and thus to be configured a string For Eg:
livenessProbe: |
        httpGet:
                path: "{{ .Values.healthChecks.livenessProbePath }}"
        initialDelaySeconds: 60
For more details check values.yaml
healthChecks.livenessProbe.httpGet.path Context path of the service to check the liveness of a pod {{ .Values.healthChecks.livenessProbePath }}
healthChecks.livenessProbe.httpGet.port Port number of the service to check the liveness of a pod {{ .Values.httpPort }}
healthChecks.readinessProbe Allows the specification of additional environment variables. Passed through the tpl function and thus to be configured a string For Eg:
readinessProbe: |
        httpGet:
                path: "{{ .Values.healthChecks.readinessProbePath }}"
        initialDelaySeconds: 60
For more details check values.yaml
healthChecks.readinessProbe.httpGet.path Context path of the service to check the readiness of a pod {{ .Values.healthChecks.readinessProbePath }}
healthChecks.readinessProbe.httpGet.port Port number of the service to check the readiness of a pod {{ .Values.httpPort }}
lifecycle.preStop.exec.command Executes the command in the pod before stopping - sh
- -c
- "sleep 10"
memory_limits To set the memory limit for the pod 512Mi
resources To set the resource limits for the pod. Allows the specification of additional environment variables. Passed through the tpl function and thus to be configured a string resources: |
    {{- if eq .Values.appType "java-spring" -}}
    requests:
        memory: {{ .Values.memory_limits | quote }}
    limits:
        memory: {{ .Values.memory_limits | quote }}
    {{- end -}}
extraEnv.java Allows the specification of additional environment variables for Java. Passed through the tpl function and thus to be configured a string For Eg:
java: |
        - name: SPRING_DATASOURCE_URL
            valueFrom:
                configMapKeyRef:
                    name: egov-config
                    key: db-url
For more details check values.yaml
jaeger Jaeger API tracing environment variables to send traces to Jaeger Agent. Allows the specification of additional environment variables. Passed through the tpl function and thus to be configured a string For Eg:
jaeger: |
        - name: JAEGER_AGENT_PORT
            port: 6831
For more details check values.yaml
extraVolumes To add additional volumes to the service. Allows the specification of additional environment variables. Passed through the tpl function and thus to be configured a string For Eg:
extraVolumes: |
    - name: new-volume
        configMap:
            name: service-new-volume
extraVolumeMounts To mount additional volumes to the service in a desired mount path. Allows the specification of additional environment variables. Passed through the tpl function and thus to be configured a string For Eg:
extraVolumeMounts: |
    - mountPath: /opt/service-path/file.conf
        configMap:
            name: new-volume
            subPath: file.conf
extraInitContainers Additional init containers, e. g. for providing themes, etc. Passed through the tpl function and thus to be configured a string ""
extraContainers Additional sidecar containers, e. g. for a database proxy, such as Google's cloudsql-proxy. Passed through the tpl function and thus to be configured a string ""

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • HCL 33.9%
  • Mustache 16.1%
  • Shell 14.6%
  • Python 12.9%
  • Go 7.2%
  • Smarty 5.9%
  • Other 9.4%