Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit d43fbe9

Browse files
author
Benn Simon
authoredAug 7, 2023
Merge pull request #5 from bennsimon/add-helm-chart
Add helm chart
2 parents 03842d6 + 2b761ca commit d43fbe9

17 files changed

+669
-0
lines changed
 

‎.github/workflows/lint-checker.yml

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Lint and Test Charts
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- "charts/**"
7+
branches: [ "main" ]
8+
9+
jobs:
10+
lint-test:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v2
15+
with:
16+
fetch-depth: 0
17+
- name: Set up Helm
18+
uses: azure/setup-helm@v1
19+
with:
20+
version: v3.5.0
21+
- uses: actions/setup-python@v2
22+
with:
23+
python-version: 3.7
24+
- name: Set up chart-testing
25+
uses: helm/chart-testing-action@v2.0.1
26+
- name: Run chart-testing (list-changed)
27+
id: list-changed
28+
run: |
29+
changed=$(ct list-changed --config ct.yaml)
30+
if [[ -n "$changed" ]]; then
31+
echo "::set-output name=changed::true"
32+
fi
33+
- name: Run chart-testing (lint)
34+
run: ct lint --config ct.yaml

‎.github/workflows/publish-chart.yml

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Kindly refer to https://github.com/helm/chart-releaser-action
2+
3+
name: Publish Charts
4+
5+
on:
6+
push:
7+
paths:
8+
- "charts/**"
9+
branches:
10+
- main
11+
12+
jobs:
13+
release:
14+
permissions:
15+
contents: write
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Checkout
19+
uses: actions/checkout@v3
20+
with:
21+
fetch-depth: 0
22+
23+
- name: Configure Git
24+
run: |
25+
git config user.name "$GITHUB_ACTOR"
26+
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
27+
28+
- name: Install Helm
29+
uses: azure/setup-helm@v3
30+
31+
- name: Run chart-releaser
32+
uses: helm/chart-releaser-action@v1.5.0 # step that writes the latest chart versions (below) depends on this step writing the latest version as the first index in the entries.<name of chart> list in the index.yaml file
33+
env:
34+
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
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/
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
dependencies:
2+
- name: crds
3+
repository: ""
4+
version: 0.1.1
5+
digest: sha256:51ac042177bfafb53bce963a37a91c38f2109778677b1f94af66531d0bab44c1
6+
generated: "2023-08-07T12:10:02.033733461+03:00"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
apiVersion: v2
2+
name: workload-scheduler-operator
3+
description: A Helm chart for Kubernetes
4+
maintainers:
5+
- name: bennsimon
6+
email: bennsimonotieno@gmail.com
7+
# A chart can be either an 'application' or a 'library' chart.
8+
#
9+
# Application charts are a collection of templates that can be packaged into versioned archives
10+
# to be deployed.
11+
#
12+
# Library charts provide useful utilities or functions for the chart developer. They're included as
13+
# a dependency of application charts to inject those utilities and functions into the rendering
14+
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
15+
type: application
16+
17+
# This is the chart version. This version number should be incremented each time you make changes
18+
# to the chart and its templates, including the app version.
19+
# Versions are expected to follow Semantic Versioning (https://semver.org/)
20+
version: 0.1.0
21+
22+
# This is the version number of the application being deployed. This version number should be
23+
# incremented each time you make changes to the application. Versions are not expected to
24+
# follow Semantic Versioning. They should reflect the version the application is using.
25+
# It is recommended to use it with quotes.
26+
appVersion: "v0.1.1-beta-r1"
27+
28+
dependencies:
29+
- name: crds
30+
version: "0.1.1"
31+
condition: crds.enabled
32+
repository: ""
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
workload-scheduler-operator helm chart
2+
===========
3+
4+
5+
6+
## TL;DR
7+
8+
```bash
9+
$ helm repo add workload-scheduler-operator https://bennsimon.github.io/workload-scheduler-operator/
10+
$ helm install workload-scheduler-operator workload-scheduler-operator/workload-scheduler-operator
11+
```
12+
13+
## Introduction
14+
15+
This chart bootstraps [workload-scheduler-operator](https://github.com/bennsimon/workload-scheduler-operator) deployment on a [Kubernetes](http://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager.
16+
17+
## Prerequisites
18+
19+
- Kubernetes 1.16+
20+
- Helm 3.1.0
21+
22+
## Installing the Chart
23+
24+
To install the chart with the release name `workload-scheduler-operator`:
25+
26+
## Configuration
27+
28+
The following table lists the configurable parameters of the Workload-scheduler-operator chart and their default values.
29+
30+
| Parameter | Description | Default |
31+
|--------------------------------------|-------------|-------------------------------------------|
32+
| `replicaCount` | | `1` |
33+
| `image.repository` | | `"bennsimon/workload-scheduler-operator"` |
34+
| `image.pullPolicy` | | `"IfNotPresent"` |
35+
| `image.tag` | | `""` |
36+
| `imagePullSecrets` | | `[]` |
37+
| `nameOverride` | | `""` |
38+
| `fullnameOverride` | | `""` |
39+
| `serviceAccount.create` | | `true` |
40+
| `serviceAccount.annotations` | | `{}` |
41+
| `serviceAccount.name` | | `""` |
42+
| `podAnnotations` | | `{}` |
43+
| `podSecurityContext` | | `{}` |
44+
| `securityContext` | | `{}` |
45+
| `resources` | | `{}` |
46+
| `livenessProbe.httpGet.path` | | `"/healthz"` |
47+
| `livenessProbe.httpGet.port` | | `8081` |
48+
| `livenessProbe.initialDelaySeconds` | | `15` |
49+
| `livenessProbe.periodSeconds` | | `20` |
50+
| `readinessProbe.httpGet.path` | | `"/readyz"` |
51+
| `readinessProbe.httpGet.port` | | `8081` |
52+
| `readinessProbe.initialDelaySeconds` | | `5` |
53+
| `readinessProbe.periodSeconds` | | `10` |
54+
| `autoscaling.enabled` | | `false` |
55+
| `nodeSelector` | | `{}` |
56+
| `tolerations` | | `[]` |
57+
| `affinity` | | `{}` |
58+
| `crds.enabled` | | `true` |
59+
| `env` | | `null` |
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
apiVersion: v2
2+
name: crds
3+
description: A Helm chart for Kubernetes
4+
maintainers:
5+
- name: bennsimon
6+
email: bennsimonotieno@gmail.com
7+
# A chart can be either an 'application' or a 'library' chart.
8+
#
9+
# Application charts are a collection of templates that can be packaged into versioned archives
10+
# to be deployed.
11+
#
12+
# Library charts provide useful utilities or functions for the chart developer. They're included as
13+
# a dependency of application charts to inject those utilities and functions into the rendering
14+
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
15+
type: application
16+
17+
# This is the chart version. This version number should be incremented each time you make changes
18+
# to the chart and its templates, including the app version.
19+
# Versions are expected to follow Semantic Versioning (https://semver.org/)
20+
version: 0.1.1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
---
2+
apiVersion: apiextensions.k8s.io/v1
3+
kind: CustomResourceDefinition
4+
metadata:
5+
annotations:
6+
controller-gen.kubebuilder.io/version: v0.12.0
7+
name: schedules.workload-scheduler.bennsimon.github.io
8+
spec:
9+
group: workload-scheduler.bennsimon.github.io
10+
names:
11+
kind: Schedule
12+
listKind: ScheduleList
13+
plural: schedules
14+
singular: schedule
15+
scope: Cluster
16+
versions:
17+
- name: v1
18+
schema:
19+
openAPIV3Schema:
20+
description: Schedule is the Schema for the schedules API
21+
properties:
22+
apiVersion:
23+
description: 'APIVersion defines the versioned schema of this representation
24+
of an object. Servers should convert recognized schemas to the latest
25+
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
26+
type: string
27+
kind:
28+
description: 'Kind is a string value representing the REST resource this
29+
object represents. Servers may infer this from the endpoint the client
30+
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
31+
type: string
32+
metadata:
33+
type: object
34+
spec:
35+
description: ScheduleSpec defines the desired state of Schedule
36+
properties:
37+
scheduleUnits:
38+
items:
39+
properties:
40+
days:
41+
items:
42+
type: string
43+
type: array
44+
end:
45+
properties:
46+
date:
47+
type: string
48+
time:
49+
type: string
50+
type: object
51+
start:
52+
properties:
53+
date:
54+
type: string
55+
time:
56+
type: string
57+
type: object
58+
type: object
59+
type: array
60+
required:
61+
- scheduleUnits
62+
type: object
63+
status:
64+
description: ScheduleStatus defines the observed state of Schedule
65+
type: object
66+
type: object
67+
served: true
68+
storage: true
69+
subresources:
70+
status: {}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
---
2+
apiVersion: apiextensions.k8s.io/v1
3+
kind: CustomResourceDefinition
4+
metadata:
5+
annotations:
6+
controller-gen.kubebuilder.io/version: v0.12.0
7+
name: workloadschedules.workload-scheduler.bennsimon.github.io
8+
spec:
9+
group: workload-scheduler.bennsimon.github.io
10+
names:
11+
kind: WorkloadSchedule
12+
listKind: WorkloadScheduleList
13+
plural: workloadschedules
14+
singular: workloadschedule
15+
scope: Cluster
16+
versions:
17+
- name: v1
18+
schema:
19+
openAPIV3Schema:
20+
description: WorkloadSchedule is the Schema for the workloadschedules API
21+
properties:
22+
apiVersion:
23+
description: 'APIVersion defines the versioned schema of this representation
24+
of an object. Servers should convert recognized schemas to the latest
25+
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
26+
type: string
27+
kind:
28+
description: 'Kind is a string value representing the REST resource this
29+
object represents. Servers may infer this from the endpoint the client
30+
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
31+
type: string
32+
metadata:
33+
type: object
34+
spec:
35+
description: WorkloadScheduleSpec defines the desired state of WorkloadSchedule
36+
properties:
37+
schedules:
38+
items:
39+
properties:
40+
desired:
41+
format: int32
42+
type: integer
43+
schedule:
44+
type: string
45+
type: object
46+
type: array
47+
selector:
48+
properties:
49+
kinds:
50+
items:
51+
type: string
52+
type: array
53+
labels:
54+
additionalProperties:
55+
type: string
56+
type: object
57+
names:
58+
items:
59+
type: string
60+
type: array
61+
namespaces:
62+
items:
63+
type: string
64+
type: array
65+
type: object
66+
type: object
67+
status:
68+
description: WorkloadScheduleStatus defines the observed state of WorkloadSchedule
69+
type: object
70+
type: object
71+
served: true
72+
storage: true
73+
subresources:
74+
status: {}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
AppVersion: {{.Chart.AppVersion }}
There was a problem loading the remainder of the diff.

0 commit comments

Comments
 (0)
Please sign in to comment.