-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from bennsimon/add-helm-chart
Add helm chart
- Loading branch information
Showing
17 changed files
with
669 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: Lint and Test Charts | ||
|
||
on: | ||
pull_request: | ||
paths: | ||
- "charts/**" | ||
branches: [ "main" ] | ||
|
||
jobs: | ||
lint-test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- name: Set up Helm | ||
uses: azure/setup-helm@v1 | ||
with: | ||
version: v3.5.0 | ||
- uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.7 | ||
- name: Set up chart-testing | ||
uses: helm/[email protected] | ||
- name: Run chart-testing (list-changed) | ||
id: list-changed | ||
run: | | ||
changed=$(ct list-changed --config ct.yaml) | ||
if [[ -n "$changed" ]]; then | ||
echo "::set-output name=changed::true" | ||
fi | ||
- name: Run chart-testing (lint) | ||
run: ct lint --config ct.yaml |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# Kindly refer to https://github.com/helm/chart-releaser-action | ||
|
||
name: Publish Charts | ||
|
||
on: | ||
push: | ||
paths: | ||
- "charts/**" | ||
branches: | ||
- main | ||
|
||
jobs: | ||
release: | ||
permissions: | ||
contents: write | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Configure Git | ||
run: | | ||
git config user.name "$GITHUB_ACTOR" | ||
git config user.email "[email protected]" | ||
- name: Install Helm | ||
uses: azure/setup-helm@v3 | ||
|
||
- name: Run chart-releaser | ||
uses: helm/[email protected] # 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 | ||
env: | ||
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Patterns to ignore when building packages. | ||
# This supports shell glob matching, relative path matching, and | ||
# negation (prefixed with !). Only one pattern per line. | ||
.DS_Store | ||
# Common VCS dirs | ||
.git/ | ||
.gitignore | ||
.bzr/ | ||
.bzrignore | ||
.hg/ | ||
.hgignore | ||
.svn/ | ||
# Common backup files | ||
*.swp | ||
*.bak | ||
*.tmp | ||
*.orig | ||
*~ | ||
# Various IDEs | ||
.project | ||
.idea/ | ||
*.tmproj | ||
.vscode/ |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
dependencies: | ||
- name: crds | ||
repository: "" | ||
version: 0.1.1 | ||
digest: sha256:51ac042177bfafb53bce963a37a91c38f2109778677b1f94af66531d0bab44c1 | ||
generated: "2023-08-07T12:10:02.033733461+03:00" |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
apiVersion: v2 | ||
name: workload-scheduler-operator | ||
description: A Helm chart for Kubernetes | ||
maintainers: | ||
- name: bennsimon | ||
email: [email protected] | ||
# A chart can be either an 'application' or a 'library' chart. | ||
# | ||
# Application charts are a collection of templates that can be packaged into versioned archives | ||
# to be deployed. | ||
# | ||
# Library charts provide useful utilities or functions for the chart developer. They're included as | ||
# a dependency of application charts to inject those utilities and functions into the rendering | ||
# pipeline. Library charts do not define any templates and therefore cannot be deployed. | ||
type: application | ||
|
||
# This is the chart version. This version number should be incremented each time you make changes | ||
# to the chart and its templates, including the app version. | ||
# Versions are expected to follow Semantic Versioning (https://semver.org/) | ||
version: 0.1.0 | ||
|
||
# This is the version number of the application being deployed. This version number should be | ||
# incremented each time you make changes to the application. Versions are not expected to | ||
# follow Semantic Versioning. They should reflect the version the application is using. | ||
# It is recommended to use it with quotes. | ||
appVersion: "v0.1.1-beta-r1" | ||
|
||
dependencies: | ||
- name: crds | ||
version: "0.1.1" | ||
condition: crds.enabled | ||
repository: "" |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
workload-scheduler-operator helm chart | ||
=========== | ||
|
||
|
||
|
||
## TL;DR | ||
|
||
```bash | ||
$ helm repo add workload-scheduler-operator https://bennsimon.github.io/workload-scheduler-operator/ | ||
$ helm install workload-scheduler-operator workload-scheduler-operator/workload-scheduler-operator | ||
``` | ||
|
||
## Introduction | ||
|
||
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. | ||
|
||
## Prerequisites | ||
|
||
- Kubernetes 1.16+ | ||
- Helm 3.1.0 | ||
|
||
## Installing the Chart | ||
|
||
To install the chart with the release name `workload-scheduler-operator`: | ||
|
||
## Configuration | ||
|
||
The following table lists the configurable parameters of the Workload-scheduler-operator chart and their default values. | ||
|
||
| Parameter | Description | Default | | ||
|--------------------------------------|-------------|-------------------------------------------| | ||
| `replicaCount` | | `1` | | ||
| `image.repository` | | `"bennsimon/workload-scheduler-operator"` | | ||
| `image.pullPolicy` | | `"IfNotPresent"` | | ||
| `image.tag` | | `""` | | ||
| `imagePullSecrets` | | `[]` | | ||
| `nameOverride` | | `""` | | ||
| `fullnameOverride` | | `""` | | ||
| `serviceAccount.create` | | `true` | | ||
| `serviceAccount.annotations` | | `{}` | | ||
| `serviceAccount.name` | | `""` | | ||
| `podAnnotations` | | `{}` | | ||
| `podSecurityContext` | | `{}` | | ||
| `securityContext` | | `{}` | | ||
| `resources` | | `{}` | | ||
| `livenessProbe.httpGet.path` | | `"/healthz"` | | ||
| `livenessProbe.httpGet.port` | | `8081` | | ||
| `livenessProbe.initialDelaySeconds` | | `15` | | ||
| `livenessProbe.periodSeconds` | | `20` | | ||
| `readinessProbe.httpGet.path` | | `"/readyz"` | | ||
| `readinessProbe.httpGet.port` | | `8081` | | ||
| `readinessProbe.initialDelaySeconds` | | `5` | | ||
| `readinessProbe.periodSeconds` | | `10` | | ||
| `autoscaling.enabled` | | `false` | | ||
| `nodeSelector` | | `{}` | | ||
| `tolerations` | | `[]` | | ||
| `affinity` | | `{}` | | ||
| `crds.enabled` | | `true` | | ||
| `env` | | `null` | |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
apiVersion: v2 | ||
name: crds | ||
description: A Helm chart for Kubernetes | ||
maintainers: | ||
- name: bennsimon | ||
email: [email protected] | ||
# A chart can be either an 'application' or a 'library' chart. | ||
# | ||
# Application charts are a collection of templates that can be packaged into versioned archives | ||
# to be deployed. | ||
# | ||
# Library charts provide useful utilities or functions for the chart developer. They're included as | ||
# a dependency of application charts to inject those utilities and functions into the rendering | ||
# pipeline. Library charts do not define any templates and therefore cannot be deployed. | ||
type: application | ||
|
||
# This is the chart version. This version number should be incremented each time you make changes | ||
# to the chart and its templates, including the app version. | ||
# Versions are expected to follow Semantic Versioning (https://semver.org/) | ||
version: 0.1.1 |
70 changes: 70 additions & 0 deletions
70
charts/workload-scheduler-operator/charts/crds/crds/crd-schedule.yaml
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
--- | ||
apiVersion: apiextensions.k8s.io/v1 | ||
kind: CustomResourceDefinition | ||
metadata: | ||
annotations: | ||
controller-gen.kubebuilder.io/version: v0.12.0 | ||
name: schedules.workload-scheduler.bennsimon.github.io | ||
spec: | ||
group: workload-scheduler.bennsimon.github.io | ||
names: | ||
kind: Schedule | ||
listKind: ScheduleList | ||
plural: schedules | ||
singular: schedule | ||
scope: Cluster | ||
versions: | ||
- name: v1 | ||
schema: | ||
openAPIV3Schema: | ||
description: Schedule is the Schema for the schedules API | ||
properties: | ||
apiVersion: | ||
description: 'APIVersion defines the versioned schema of this representation | ||
of an object. Servers should convert recognized schemas to the latest | ||
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' | ||
type: string | ||
kind: | ||
description: 'Kind is a string value representing the REST resource this | ||
object represents. Servers may infer this from the endpoint the client | ||
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' | ||
type: string | ||
metadata: | ||
type: object | ||
spec: | ||
description: ScheduleSpec defines the desired state of Schedule | ||
properties: | ||
scheduleUnits: | ||
items: | ||
properties: | ||
days: | ||
items: | ||
type: string | ||
type: array | ||
end: | ||
properties: | ||
date: | ||
type: string | ||
time: | ||
type: string | ||
type: object | ||
start: | ||
properties: | ||
date: | ||
type: string | ||
time: | ||
type: string | ||
type: object | ||
type: object | ||
type: array | ||
required: | ||
- scheduleUnits | ||
type: object | ||
status: | ||
description: ScheduleStatus defines the observed state of Schedule | ||
type: object | ||
type: object | ||
served: true | ||
storage: true | ||
subresources: | ||
status: {} |
74 changes: 74 additions & 0 deletions
74
charts/workload-scheduler-operator/charts/crds/crds/crd-workloadschedule.yaml
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
--- | ||
apiVersion: apiextensions.k8s.io/v1 | ||
kind: CustomResourceDefinition | ||
metadata: | ||
annotations: | ||
controller-gen.kubebuilder.io/version: v0.12.0 | ||
name: workloadschedules.workload-scheduler.bennsimon.github.io | ||
spec: | ||
group: workload-scheduler.bennsimon.github.io | ||
names: | ||
kind: WorkloadSchedule | ||
listKind: WorkloadScheduleList | ||
plural: workloadschedules | ||
singular: workloadschedule | ||
scope: Cluster | ||
versions: | ||
- name: v1 | ||
schema: | ||
openAPIV3Schema: | ||
description: WorkloadSchedule is the Schema for the workloadschedules API | ||
properties: | ||
apiVersion: | ||
description: 'APIVersion defines the versioned schema of this representation | ||
of an object. Servers should convert recognized schemas to the latest | ||
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' | ||
type: string | ||
kind: | ||
description: 'Kind is a string value representing the REST resource this | ||
object represents. Servers may infer this from the endpoint the client | ||
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' | ||
type: string | ||
metadata: | ||
type: object | ||
spec: | ||
description: WorkloadScheduleSpec defines the desired state of WorkloadSchedule | ||
properties: | ||
schedules: | ||
items: | ||
properties: | ||
desired: | ||
format: int32 | ||
type: integer | ||
schedule: | ||
type: string | ||
type: object | ||
type: array | ||
selector: | ||
properties: | ||
kinds: | ||
items: | ||
type: string | ||
type: array | ||
labels: | ||
additionalProperties: | ||
type: string | ||
type: object | ||
names: | ||
items: | ||
type: string | ||
type: array | ||
namespaces: | ||
items: | ||
type: string | ||
type: array | ||
type: object | ||
type: object | ||
status: | ||
description: WorkloadScheduleStatus defines the observed state of WorkloadSchedule | ||
type: object | ||
type: object | ||
served: true | ||
storage: true | ||
subresources: | ||
status: {} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
AppVersion: {{.Chart.AppVersion }} |
Oops, something went wrong.