Skip to content

Commit e42e339

Browse files
committed
Create a 'containers' chart from template
1 parent 4d95bc9 commit e42e339

12 files changed

+154
-13
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.tgz

.helmignore common/.helmignore

File renamed without changes.

Chart.yaml common/Chart.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
apiVersion: v2
2-
name: vertexlib
2+
name: vxcommon
33
description: A Vertex Helm chart template for Kubernetes
44
type: library
55
version: 0.1.0
File renamed without changes.

common/templates/_configmap.yaml

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{{- define "vxcommon.configmap.tpl" -}}
2+
apiVersion: v1
3+
kind: ConfigMap
4+
metadata:
5+
name: {{ .Release.Name | printf "%s-%s" .Chart.Name }}
6+
data: {}
7+
{{- end -}}
8+
{{- define "vxcommon.configmap" -}}
9+
{{- include "vxcommon.util.merge" (append . "vxcommon.configmap.tpl") -}}
10+
{{- end -}}

templates/_util.yaml common/templates/_util.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{{- /*
2-
vertexlib.util.merge will merge two YAML templates and output the result.
2+
vxcommon.util.merge will merge two YAML templates and output the result.
33
This takes an array of three values:
44
- the top context
55
- the template name of the overrides (destination)
66
- the template name of the base (source)
77
*/}}
8-
{{- define "vertexlib.util.merge" -}}
8+
{{- define "vxcommon.util.merge" -}}
99
{{- $top := first . -}}
1010
{{- $overrides := fromYaml (include (index . 1) $top) | default (dict ) -}}
1111
{{- $tpl := fromYaml (include (index . 2) $top) | default (dict ) -}}

containers/.helmignore

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Patterns to ignore when building packages.
2+
# This supports shell glob matching, relative path matching, and
3+
# negation (prefixed with !). Only one pattern per line.
4+
.DS_Store
5+
# Common VCS dirs
6+
.git/
7+
.gitignore
8+
.bzr/
9+
.bzrignore
10+
.hg/
11+
.hgignore
12+
.svn/
13+
# Common backup files
14+
*.swp
15+
*.bak
16+
*.tmp
17+
*.orig
18+
*~
19+
# Various IDEs
20+
.project
21+
.idea/
22+
*.tmproj
23+
.vscode/

containers/Chart.lock

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
dependencies:
2+
- name: vxcommon
3+
repository: file://../common
4+
version: 0.1.0
5+
digest: sha256:ae1a7edd6bd45bd78902608dc7f98ff3cd9db58b4b95bbccb3f0a44381256324
6+
generated: "2023-12-24T23:16:52.331952-05:00"

containers/Chart.yaml

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
apiVersion: v2
2+
name: containers
3+
description: A Helm chart for Kubernetes
4+
type: application
5+
version: 0.1.0
6+
appVersion: "1.16.0"
7+
dependencies:
8+
- name: vxcommon
9+
version: 0.1.0
10+
repository: "file://../common"

containers/templates/configmap.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{{- include "vxcommon.configmap" (list . "containers.configmap") -}}
2+
{{- define "containers.configmap" -}}
3+
{{- end -}}

containers/values.yaml

+98
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
# Default values for containers.
2+
# This is a YAML-formatted file.
3+
# Declare variables to be passed into your templates.
4+
5+
replicaCount: 1
6+
7+
image:
8+
repository: nginx
9+
pullPolicy: IfNotPresent
10+
# Overrides the image tag whose default is the chart appVersion.
11+
tag: ""
12+
13+
imagePullSecrets: []
14+
nameOverride: ""
15+
fullnameOverride: ""
16+
17+
serviceAccount:
18+
# Specifies whether a service account should be created
19+
create: true
20+
# Automatically mount a ServiceAccount's API credentials?
21+
automount: true
22+
# Annotations to add to the service account
23+
annotations: {}
24+
# The name of the service account to use.
25+
# If not set and create is true, a name is generated using the fullname template
26+
name: ""
27+
28+
podAnnotations: {}
29+
podLabels: {}
30+
31+
podSecurityContext: {}
32+
# fsGroup: 2000
33+
34+
securityContext: {}
35+
# capabilities:
36+
# drop:
37+
# - ALL
38+
# readOnlyRootFilesystem: true
39+
# runAsNonRoot: true
40+
# runAsUser: 1000
41+
42+
service:
43+
type: ClusterIP
44+
port: 80
45+
46+
ingress:
47+
enabled: false
48+
className: ""
49+
annotations: {}
50+
# kubernetes.io/ingress.class: nginx
51+
# kubernetes.io/tls-acme: "true"
52+
hosts:
53+
- host: chart-example.local
54+
paths:
55+
- path: /
56+
pathType: ImplementationSpecific
57+
tls: []
58+
# - secretName: chart-example-tls
59+
# hosts:
60+
# - chart-example.local
61+
62+
resources: {}
63+
# We usually recommend not to specify default resources and to leave this as a conscious
64+
# choice for the user. This also increases chances charts run on environments with little
65+
# resources, such as Minikube. If you do want to specify resources, uncomment the following
66+
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
67+
# limits:
68+
# cpu: 100m
69+
# memory: 128Mi
70+
# requests:
71+
# cpu: 100m
72+
# memory: 128Mi
73+
74+
autoscaling:
75+
enabled: false
76+
minReplicas: 1
77+
maxReplicas: 100
78+
targetCPUUtilizationPercentage: 80
79+
# targetMemoryUtilizationPercentage: 80
80+
81+
# Additional volumes on the output Deployment definition.
82+
volumes: []
83+
# - name: foo
84+
# secret:
85+
# secretName: mysecret
86+
# optional: false
87+
88+
# Additional volumeMounts on the output Deployment definition.
89+
volumeMounts: []
90+
# - name: foo
91+
# mountPath: "/etc/foo"
92+
# readOnly: true
93+
94+
nodeSelector: {}
95+
96+
tolerations: []
97+
98+
affinity: {}

templates/_configmap.yaml

-10
This file was deleted.

0 commit comments

Comments
 (0)