Skip to content

Commit 914a864

Browse files
voigtvdice
authored andcommitted
add helm chart
1 parent db891c6 commit 914a864

File tree

13 files changed

+537
-0
lines changed

13 files changed

+537
-0
lines changed

deploy/helm/.helmignore

Lines changed: 23 additions & 0 deletions
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/

deploy/helm/Chart.yaml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
apiVersion: v2
2+
name: runtime-class-manager
3+
description: A Helm chart for Kubernetes
4+
5+
# A chart can be either an 'application' or a 'library' chart.
6+
#
7+
# Application charts are a collection of templates that can be packaged into versioned archives
8+
# to be deployed.
9+
#
10+
# Library charts provide useful utilities or functions for the chart developer. They're included as
11+
# a dependency of application charts to inject those utilities and functions into the rendering
12+
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
13+
type: application
14+
15+
# This is the chart version. This version number should be incremented each time you make changes
16+
# to the chart and its templates, including the app version.
17+
# Versions are expected to follow Semantic Versioning (https://semver.org/)
18+
version: 0.1.0
19+
20+
# This is the version number of the application being deployed. This version number should be
21+
# incremented each time you make changes to the application. Versions are not expected to
22+
# follow Semantic Versioning. They should reflect the version the application is using.
23+
# It is recommended to use it with quotes.
24+
appVersion: "1.16.0"

deploy/helm/README.md

Whitespace-only changes.
Lines changed: 180 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,180 @@
1+
---
2+
apiVersion: apiextensions.k8s.io/v1
3+
kind: CustomResourceDefinition
4+
metadata:
5+
annotations:
6+
controller-gen.kubebuilder.io/version: v0.13.0
7+
name: shims.runtime.kwasm.sh
8+
spec:
9+
group: runtime.kwasm.sh
10+
names:
11+
kind: Shim
12+
listKind: ShimList
13+
plural: shims
14+
singular: shim
15+
scope: Cluster
16+
versions:
17+
- additionalPrinterColumns:
18+
- jsonPath: .spec.runtimeClass.name
19+
name: RuntimeClass
20+
type: string
21+
- jsonPath: .status.nodesReady
22+
name: Ready
23+
type: integer
24+
- jsonPath: .status.nodes
25+
name: Nodes
26+
type: integer
27+
name: v1alpha1
28+
schema:
29+
openAPIV3Schema:
30+
description: Shim is the Schema for the shims API
31+
properties:
32+
apiVersion:
33+
description: 'APIVersion defines the versioned schema of this representation
34+
of an object. Servers should convert recognized schemas to the latest
35+
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
36+
type: string
37+
kind:
38+
description: 'Kind is a string value representing the REST resource this
39+
object represents. Servers may infer this from the endpoint the client
40+
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
41+
type: string
42+
metadata:
43+
type: object
44+
spec:
45+
description: ShimSpec defines the desired state of Shim
46+
properties:
47+
fetchStrategy:
48+
properties:
49+
anonHttp:
50+
properties:
51+
location:
52+
type: string
53+
required:
54+
- location
55+
type: object
56+
type:
57+
type: string
58+
required:
59+
- anonHttp
60+
- type
61+
type: object
62+
nodeSelector:
63+
additionalProperties:
64+
type: string
65+
type: object
66+
rolloutStrategy:
67+
properties:
68+
rolling:
69+
properties:
70+
maxUpdate:
71+
type: integer
72+
required:
73+
- maxUpdate
74+
type: object
75+
type:
76+
enum:
77+
- rolling
78+
- recreate
79+
type: string
80+
required:
81+
- type
82+
type: object
83+
runtimeClass:
84+
properties:
85+
handler:
86+
type: string
87+
name:
88+
type: string
89+
required:
90+
- handler
91+
- name
92+
type: object
93+
required:
94+
- fetchStrategy
95+
- rolloutStrategy
96+
- runtimeClass
97+
type: object
98+
status:
99+
description: ShimStatus defines the observed state of Shim
100+
properties:
101+
conditions:
102+
items:
103+
description: "Condition contains details for one aspect of the current
104+
state of this API Resource. --- This struct is intended for direct
105+
use as an array at the field path .status.conditions. For example,
106+
\n type FooStatus struct{ // Represents the observations of a
107+
foo's current state. // Known .status.conditions.type are: \"Available\",
108+
\"Progressing\", and \"Degraded\" // +patchMergeKey=type // +patchStrategy=merge
109+
// +listType=map // +listMapKey=type Conditions []metav1.Condition
110+
`json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\"
111+
protobuf:\"bytes,1,rep,name=conditions\"` \n // other fields }"
112+
properties:
113+
lastTransitionTime:
114+
description: lastTransitionTime is the last time the condition
115+
transitioned from one status to another. This should be when
116+
the underlying condition changed. If that is not known, then
117+
using the time when the API field changed is acceptable.
118+
format: date-time
119+
type: string
120+
message:
121+
description: message is a human readable message indicating
122+
details about the transition. This may be an empty string.
123+
maxLength: 32768
124+
type: string
125+
observedGeneration:
126+
description: observedGeneration represents the .metadata.generation
127+
that the condition was set based upon. For instance, if .metadata.generation
128+
is currently 12, but the .status.conditions[x].observedGeneration
129+
is 9, the condition is out of date with respect to the current
130+
state of the instance.
131+
format: int64
132+
minimum: 0
133+
type: integer
134+
reason:
135+
description: reason contains a programmatic identifier indicating
136+
the reason for the condition's last transition. Producers
137+
of specific condition types may define expected values and
138+
meanings for this field, and whether the values are considered
139+
a guaranteed API. The value should be a CamelCase string.
140+
This field may not be empty.
141+
maxLength: 1024
142+
minLength: 1
143+
pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$
144+
type: string
145+
status:
146+
description: status of the condition, one of True, False, Unknown.
147+
enum:
148+
- "True"
149+
- "False"
150+
- Unknown
151+
type: string
152+
type:
153+
description: type of condition in CamelCase or in foo.example.com/CamelCase.
154+
--- Many .condition.type values are consistent across resources
155+
like Available, but because arbitrary conditions can be useful
156+
(see .node.status.conditions), the ability to deconflict is
157+
important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt)
158+
maxLength: 316
159+
pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$
160+
type: string
161+
required:
162+
- lastTransitionTime
163+
- message
164+
- reason
165+
- status
166+
- type
167+
type: object
168+
type: array
169+
nodes:
170+
type: integer
171+
nodesReady:
172+
type: integer
173+
required:
174+
- nodes
175+
- nodesReady
176+
type: object
177+
type: object
178+
served: true
179+
storage: true
180+
subresources: {}

deploy/helm/templates/NOTES.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Welcome to Runtime-Class-Manager

deploy/helm/templates/_helpers.tpl

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
{{/*
2+
Expand the name of the chart.
3+
*/}}
4+
{{- define "rcm.name" -}}
5+
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
6+
{{- end }}
7+
8+
{{/*
9+
Create a default fully qualified app name.
10+
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
11+
If release name contains chart name it will be used as a full name.
12+
*/}}
13+
{{- define "rcm.fullname" -}}
14+
{{- if .Values.fullnameOverride }}
15+
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
16+
{{- else }}
17+
{{- $name := default .Chart.Name .Values.nameOverride }}
18+
{{- if contains $name .Release.Name }}
19+
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
20+
{{- else }}
21+
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
22+
{{- end }}
23+
{{- end }}
24+
{{- end }}
25+
26+
{{/*
27+
Create chart name and version as used by the chart label.
28+
*/}}
29+
{{- define "rcm.chart" -}}
30+
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
31+
{{- end }}
32+
33+
{{/*
34+
Common labels
35+
*/}}
36+
{{- define "rcm.labels" -}}
37+
helm.sh/chart: {{ include "rcm.chart" . }}
38+
{{ include "rcm.selectorLabels" . }}
39+
{{- if .Chart.AppVersion }}
40+
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
41+
{{- end }}
42+
app.kubernetes.io/managed-by: {{ .Release.Service }}
43+
{{- end }}
44+
45+
{{/*
46+
Selector labels
47+
*/}}
48+
{{- define "rcm.selectorLabels" -}}
49+
app.kubernetes.io/name: {{ include "rcm.name" . }}
50+
app.kubernetes.io/instance: {{ .Release.Name }}
51+
{{- end }}
52+
53+
{{/*
54+
Create the name of the service account to use
55+
*/}}
56+
{{- define "rcm.serviceAccountName" -}}
57+
{{- if .Values.serviceAccount.create }}
58+
{{- default (include "rcm.fullname" .) .Values.serviceAccount.name }}
59+
{{- else }}
60+
{{- default "default" .Values.serviceAccount.name }}
61+
{{- end }}
62+
{{- end }}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
apiVersion: rbac.authorization.k8s.io/v1
2+
kind: ClusterRole
3+
metadata:
4+
creationTimestamp: null
5+
name: {{ include "rcm.fullname" . }}
6+
rules:
7+
- apiGroups:
8+
- ""
9+
resources:
10+
- nodes
11+
verbs:
12+
- get
13+
- list
14+
- watch
15+
- update
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
apiVersion: rbac.authorization.k8s.io/v1
2+
kind: ClusterRoleBinding
3+
metadata:
4+
creationTimestamp: null
5+
name: {{ include "rcm.fullname" . }}
6+
roleRef:
7+
apiGroup: rbac.authorization.k8s.io
8+
kind: ClusterRole
9+
name: {{ include "rcm.fullname" . }}
10+
subjects:
11+
- kind: ServiceAccount
12+
name: {{ include "rcm.serviceAccountName" . }}
13+
namespace: {{ .Release.Namespace }}

0 commit comments

Comments
 (0)