Skip to content

Commit a4d6ccb

Browse files
committed
Add basic helm chart
This commit introduces a minimal Helm chart allowing to be deployed in Kubernetes environment. This initial version provides a foundation for future Helm-based deployments and can be extended with more features as needed. Signed-off-by: Mamduh Alassi <[email protected]>
1 parent 9a08d34 commit a4d6ccb

14 files changed

+2340
-4
lines changed

RELEASE.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
The Kubernetes Template Project is released on an as-needed basis. The process is as follows:
44

55
1. An issue is proposing a new release with a changelog since the last release
6-
1. All [OWNERS](OWNERS) must LGTM this release
7-
1. An OWNER runs `git tag -s $VERSION` and inserts the changelog and pushes the tag with `git push $VERSION`
8-
1. The release issue is closed
9-
1. An announcement email is sent to `[email protected]` with the subject `[ANNOUNCE] kubernetes-template-project $VERSION is released`
6+
2. All [OWNERS](OWNERS) must LGTM this release
7+
3. Bump the `version` and `appVersion` of the Helm chart in `charts/karpenter/Chart.yaml`
8+
4. An OWNER runs `git tag -s $VERSION` and inserts the changelog and pushes the tag with `git push $VERSION`
9+
5. The release issue is closed
10+
6. An announcement email is sent to `[email protected]` with the subject `[ANNOUNCE] kubernetes-template-project $VERSION is released`

charts/karpenter/.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/

charts/karpenter/Chart.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
apiVersion: v2
2+
name: karpenter
3+
description: A Helm chart for Kubernetes that provides an implementation of Karpenter using Cluster API as the infrastructure provider
4+
type: application
5+
version: 0.1.0
6+
appVersion: "0.1.0"

charts/karpenter/README.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# karpenter
2+
3+
A Helm chart for Kubernetes that provides an implementation of Karpenter using Cluster API as the infrastructure
4+
provider
5+
6+
![Version: 0.1.0](https://img.shields.io/badge/Version-0.1.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.1.0](https://img.shields.io/badge/AppVersion-0.1.0-informational?style=flat-square)
7+
8+
## Documentation
9+
10+
For full Karpenter documentation please checkout [https://karpenter.sh](https://karpenter.sh/docs/).
11+
12+
## Installing the Chart
13+
14+
```bash
15+
helm upgrade --install --namespace karpenter --create-namespace karpenter .
16+
```
17+
18+
## Values
19+
20+
| Key | Type | Default | Description |
21+
|------------------|--------|-------------------------------------|-------------------------------------------------------------------|
22+
| affinity | object | `{}` | Affinity rules for scheduling the pod |
23+
| arguments | list | `[]` | Arguments for the controller |
24+
| fullnameOverride | string | `""` | Overrides the chart's computed fullname |
25+
| image.pullPolicy | string | `"IfNotPresent"` | Image pull policy of the controller image |
26+
| image.tag | string | `"karpenter-clusterapi-controller"` | Tag of the controller image |
27+
| nameOverride | string | `""` | Overrides the chart's name |
28+
| nodeSelector | object | `{}` | Node selectors to schedule the pod to nodes with labels |
29+
| replicaCount | int | `1` | Number of replicas |
30+
| resources | object | `{}` | Resources for the controller container |
31+
| tolerations | list | `[]` | Tolerations to allow the pod to be scheduled to nodes with taints |
32+
| volumeMounts | list | `[]` | VolumeMounts for the controller container |
33+
| volumes | list | `[]` | Volumes for the pod |
Lines changed: 171 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,171 @@
1+
---
2+
apiVersion: apiextensions.k8s.io/v1
3+
kind: CustomResourceDefinition
4+
metadata:
5+
annotations:
6+
controller-gen.kubebuilder.io/version: v0.15.0
7+
name: clusterapinodeclasses.karpenter.cluster.x-k8s.io
8+
spec:
9+
group: karpenter.cluster.x-k8s.io
10+
names:
11+
categories:
12+
- karpenter
13+
kind: ClusterAPINodeClass
14+
listKind: ClusterAPINodeClassList
15+
plural: clusterapinodeclasses
16+
shortNames:
17+
- capinc
18+
- capincs
19+
singular: clusterapinodeclass
20+
scope: Cluster
21+
versions:
22+
- name: v1alpha1
23+
schema:
24+
openAPIV3Schema:
25+
description: ClusterAPINodeClass is the Schema for the ClusterAPINodeClass
26+
API
27+
properties:
28+
apiVersion:
29+
description: |-
30+
APIVersion defines the versioned schema of this representation of an object.
31+
Servers should convert recognized schemas to the latest internal value, and
32+
may reject unrecognized values.
33+
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
34+
type: string
35+
kind:
36+
description: |-
37+
Kind is a string value representing the REST resource this object represents.
38+
Servers may infer this from the endpoint the client submits requests to.
39+
Cannot be updated.
40+
In CamelCase.
41+
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
42+
type: string
43+
metadata:
44+
type: object
45+
spec:
46+
description: ClusterAPINodeClassSpec is the top level specification for
47+
ClusterAPINodeClasses.
48+
properties:
49+
scalableResourceSelector:
50+
description: |-
51+
scalableResourceSelector is a LabelSelector that is used to identify the Cluster API scalable
52+
resources that are participating in Karpenter provisioning. For a deeper discussion of
53+
how label selectors are used in Kubernetes, please see the following:
54+
https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/
55+
https://kubernetes.io/docs/reference/kubernetes-api/common-definitions/label-selector/
56+
properties:
57+
matchExpressions:
58+
description: matchExpressions is a list of label selector requirements.
59+
The requirements are ANDed.
60+
items:
61+
description: |-
62+
A label selector requirement is a selector that contains values, a key, and an operator that
63+
relates the key and values.
64+
properties:
65+
key:
66+
description: key is the label key that the selector applies
67+
to.
68+
type: string
69+
operator:
70+
description: |-
71+
operator represents a key's relationship to a set of values.
72+
Valid operators are In, NotIn, Exists and DoesNotExist.
73+
type: string
74+
values:
75+
description: |-
76+
values is an array of string values. If the operator is In or NotIn,
77+
the values array must be non-empty. If the operator is Exists or DoesNotExist,
78+
the values array must be empty. This array is replaced during a strategic
79+
merge patch.
80+
items:
81+
type: string
82+
type: array
83+
x-kubernetes-list-type: atomic
84+
required:
85+
- key
86+
- operator
87+
type: object
88+
type: array
89+
x-kubernetes-list-type: atomic
90+
matchLabels:
91+
additionalProperties:
92+
type: string
93+
description: |-
94+
matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
95+
map is equivalent to an element of matchExpressions, whose key field is "key", the
96+
operator is "In", and the values array contains only "value". The requirements are ANDed.
97+
type: object
98+
type: object
99+
x-kubernetes-map-type: atomic
100+
type: object
101+
status:
102+
description: ClusterAPINodeClassStatus is the status for ClusterAPINodeClasses
103+
properties:
104+
conditions:
105+
description: Conditions contains signals for health and readiness
106+
items:
107+
description: Condition aliases the upstream type and adds additional
108+
helper methods
109+
properties:
110+
lastTransitionTime:
111+
description: |-
112+
lastTransitionTime is the last time the condition transitioned from one status to another.
113+
This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.
114+
format: date-time
115+
type: string
116+
message:
117+
description: |-
118+
message is a human readable message indicating details about the transition.
119+
This may be an empty string.
120+
maxLength: 32768
121+
type: string
122+
observedGeneration:
123+
description: |-
124+
observedGeneration represents the .metadata.generation that the condition was set based upon.
125+
For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date
126+
with respect to the current state of the instance.
127+
format: int64
128+
minimum: 0
129+
type: integer
130+
reason:
131+
description: |-
132+
reason contains a programmatic identifier indicating the reason for the condition's last transition.
133+
Producers of specific condition types may define expected values and meanings for this field,
134+
and whether the values are considered a guaranteed API.
135+
The value should be a CamelCase string.
136+
This field may not be empty.
137+
maxLength: 1024
138+
minLength: 1
139+
pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$
140+
type: string
141+
status:
142+
description: status of the condition, one of True, False, Unknown.
143+
enum:
144+
- "True"
145+
- "False"
146+
- Unknown
147+
type: string
148+
type:
149+
description: |-
150+
type of condition in CamelCase or in foo.example.com/CamelCase.
151+
---
152+
Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be
153+
useful (see .node.status.conditions), the ability to deconflict is important.
154+
The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt)
155+
maxLength: 316
156+
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])$
157+
type: string
158+
required:
159+
- lastTransitionTime
160+
- message
161+
- reason
162+
- status
163+
- type
164+
type: object
165+
type: array
166+
type: object
167+
type: object
168+
served: true
169+
storage: true
170+
subresources:
171+
status: {}

0 commit comments

Comments
 (0)