How to Build Docker Image with Helm Chart Or VM Image Using Maven and Packer. Part 3 Helm Chart
Part 3. Helm Chart
Helm Chart
Helm Chart acts as a template for Kubernetes deployments, so we can create a template to suit our specific needs. It is perfectly possible to use Helm only to create plain Kubernetes manifests and then install them on the cluster using the standard methods (such as kubectl) and/or Spinnaker with custom Application Configurations pipelines.
The copy/paste madness
That you need — it’s just specify basic information about your service.
Treat it as a contract between Developers and Operations.
serverConfigs:
command: ["twemcache"]
args:
- -u
- twemcache
- -m
- "896" resources:
limits:
cpu: 500m
memory: 1024Mi
requests:
memory: 1024Mi
cpu: 500m service:
spec:
type: ClusterIP
ports:
- name: twemcached
port: 22211
protocol: TCP
targetPort: 11211
Maven will automatically merge it with all vital options.
---
fullnameOverride: ""
nameOverride: ""
image:
repository: "us.gcr.io/.../twemcached"
tag: "2.0"
pullPolicy: "IfNotPresent"appConfigs: {}
serverConfigs:
raw: []
replicas: 1
terminationGracePeriodSeconds: 60
priorityClassName: null
securityContext: {}
hostNetwork: false
dnsPolicy: null
ingress:
enable: false
annotations: {}
spec: {}
podDisruptionBudget:
enable: false
spec:
minAvailable: 1
horizontalPodAutoscaler:
enable: false
apiVersion: "autoscaling/v1"
spec: {}
configMap:
annotations:
statefulSet:
enable: false
serviceName: null
updateStrategy: "RollingUpdate"
podManagementPolicy: "OrderedReady"
volumeClaimTemplates:
enable: true
metadata:
annotations: null
storageClassName: "standard"
resources:
requests:
storage: "10Gi"
cronJob:
enable: false
cronJobs: []
deployment:
enable: true
annotations:
strategy:
type: "RollingUpdate"
rollingUpdate:
maxSurge: "100%"
maxUnavailable: "25%"
spec:
template:
annotations:
prometheus.io/scrape: "false"
prometheus.io/port: "8081"
env: []
command:
- "twemcache"
args:
- "-u"
- "twemcache"
- "-m"
- "896"
ports: []
lifecycle: {}
affinity: {}
tolerations: []
topologySpreadConstraints: []
resources:
limits:
cpu: "500m"
memory: "1024Mi"
requests:
memory: "1024Mi"
cpu: "500m"
livenessProbe: null
readinessProbe: null
startupProbe: null
serviceAccount:
create: false
service:
enable: true
metadata:
annotations: {}
spec:
type: "ClusterIP"
ports:
- name: "twemcached"
port: 22211
protocol: "TCP"
targetPort: 11211
volumeMounts:
- mountPath: "/appconfigs"
name: "appconfigs"
volumes: []
containers:
fluentbit:
enable: false
image:
repository: "fluent/fluent-bit"
tag: 1.4
volumeMounts: []
env: []
livenessProbe: null
readinessProbe: null
lifecycle: {}
resources:
limits:
cpu: "1000m"
memory: "128Mi"
requests:
memory: "128Mi"
cpu: "200m"
ports:
- name: "data"
containerPort: 24224
- name: "http"
containerPort: 2020