Last active
February 7, 2020 17:37
-
-
Save adamf/29259e65cd7dbd1fd03808daf050cdc2 to your computer and use it in GitHub Desktop.
Helm example chart testing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ helm template q /Users/adamf/Source/Q/services/example-service/example-service-chart --set q-example-service-chart.metadata.metadata.labels.f=ff --set example-service-chart.labels.foo=bar | |
--- | |
# Source: example-service-chart/templates/service.yaml | |
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: q-example-service-chart | |
labels: | |
app.kubernetes.io/name: example-service-chart | |
helm.sh/chart: example-service-chart-0.1.0 | |
app.kubernetes.io/instance: q | |
app.kubernetes.io/version: "1.0" | |
app.kubernetes.io/managed-by: Helm | |
spec: | |
type: ClusterIP | |
ports: | |
- port: 80 | |
targetPort: http | |
protocol: TCP | |
name: http | |
selector: | |
app.kubernetes.io/name: example-service-chart | |
app.kubernetes.io/instance: q | |
--- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: {{ include "example-service-chart.fullname" . }} | |
labels: | |
{{ include "example-service-chart.labels" . | indent 4 }} | |
spec: | |
type: {{ .Values.service.type }} | |
ports: | |
- port: {{ .Values.service.port }} | |
targetPort: http | |
protocol: TCP | |
name: http | |
selector: | |
app.kubernetes.io/name: {{ include "example-service-chart.name" . }} | |
app.kubernetes.io/instance: {{ .Release.Name }} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Default values for example-service-chart. | |
# This is a YAML-formatted file. | |
# Declare variables to be passed into your templates. | |
replicaCount: 1 | |
image: | |
repository: example-service | |
tag: stable | |
pullPolicy: IfNotPresent | |
imagePullSecrets: [] | |
nameOverride: "" | |
fullnameOverride: "" | |
serviceAccount: | |
# Specifies whether a service account should be created | |
create: true | |
# The name of the service account to use. | |
# If not set and create is true, a name is generated using the fullname template | |
name: | |
podSecurityContext: {} | |
# fsGroup: 2000 | |
securityContext: {} | |
# capabilities: | |
# drop: | |
# - ALL | |
# readOnlyRootFilesystem: true | |
# runAsNonRoot: true | |
# runAsUser: 1000 | |
service: | |
type: ClusterIP | |
port: 80 | |
ingress: | |
enabled: false | |
annotations: {} | |
# kubernetes.io/ingress.class: nginx | |
# kubernetes.io/tls-acme: "true" | |
hosts: | |
- host: chart-example.local | |
paths: [] | |
tls: [] | |
# - secretName: chart-example-tls | |
# hosts: | |
# - chart-example.local | |
resources: {} | |
# We usually recommend not to specify default resources and to leave this as a conscious | |
# choice for the user. This also increases chances charts run on environments with little | |
# resources, such as Minikube. If you do want to specify resources, uncomment the following | |
# lines, adjust them as necessary, and remove the curly braces after 'resources:'. | |
# limits: | |
# cpu: 100m | |
# memory: 128Mi | |
# requests: | |
# cpu: 100m | |
# memory: 128Mi | |
nodeSelector: {} | |
tolerations: [] | |
affinity: {} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment