-
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.
- Loading branch information
1 parent
1cded21
commit 1e30bfe
Showing
16 changed files
with
666 additions
and
17 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,41 @@ | ||
name: Release Helm Chart | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'v*' | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: '^1.21' | ||
|
||
- name: Install Helm | ||
uses: azure/setup-helm@v3 | ||
with: | ||
version: v3.12.3 | ||
|
||
- name: Update Helm chart version | ||
run: make helm-update | ||
|
||
- name: Package Helm chart | ||
run: | | ||
mkdir -p charts/dist | ||
make helm-package | ||
- name: Setup chart-releaser | ||
uses: helm/chart-releaser-action@v1.5.0 | ||
with: | ||
charts_dir: charts | ||
config: cr-config.yaml | ||
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
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 @@ | ||
v0.0.0-alpha |
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,15 @@ | ||
apiVersion: v2 | ||
name: kubevent | ||
description: A Helm chart for Kubevent - A Kubernetes controller that triggers jobs based on Kubernetes events | ||
type: application | ||
version: 0.1.0 | ||
appVersion: "v0.0.0-alpha" | ||
home: https://github.com/roshbhatia/kubevent | ||
keywords: | ||
- kubernetes | ||
- controller | ||
- events | ||
- jobs | ||
maintainers: | ||
- name: Roshan Bhatia | ||
url: https://github.com/roshbhatia |
114 changes: 114 additions & 0 deletions
114
charts/kubevent/crds/kubevent.roshanbhatia.com_eventtriggeredjobs.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,114 @@ | ||
apiVersion: apiextensions.k8s.io/v1 | ||
kind: CustomResourceDefinition | ||
metadata: | ||
name: eventtriggeredjobs.kubevent.roshanbhatia.com | ||
spec: | ||
group: kubevent.roshanbhatia.com | ||
names: | ||
kind: EventTriggeredJob | ||
listKind: EventTriggeredJobList | ||
plural: eventtriggeredjobs | ||
singular: eventtriggeredjob | ||
shortNames: | ||
- etj | ||
scope: Namespaced | ||
versions: | ||
- name: v1alpha1 | ||
served: true | ||
storage: true | ||
schema: | ||
openAPIV3Schema: | ||
type: object | ||
properties: | ||
apiVersion: | ||
type: string | ||
kind: | ||
type: string | ||
metadata: | ||
type: object | ||
spec: | ||
type: object | ||
required: | ||
- eventSelector | ||
- jobTemplate | ||
properties: | ||
eventSelector: | ||
type: object | ||
required: | ||
- resourceKind | ||
- eventTypes | ||
properties: | ||
resourceKind: | ||
type: string | ||
namePattern: | ||
type: string | ||
namespacePattern: | ||
type: string | ||
labelSelector: | ||
type: object | ||
properties: | ||
matchLabels: | ||
type: object | ||
additionalProperties: | ||
type: string | ||
matchExpressions: | ||
type: array | ||
items: | ||
type: object | ||
required: | ||
- key | ||
- operator | ||
properties: | ||
key: | ||
type: string | ||
operator: | ||
type: string | ||
values: | ||
type: array | ||
items: | ||
type: string | ||
eventTypes: | ||
type: array | ||
items: | ||
type: string | ||
enum: | ||
- CREATE | ||
- UPDATE | ||
- DELETE | ||
jobTemplate: | ||
type: object | ||
x-kubernetes-preserve-unknown-fields: true | ||
description: "Standard Kubernetes job template to be created when matching events are detected" | ||
status: | ||
type: object | ||
properties: | ||
jobsCreated: | ||
type: integer | ||
format: int64 | ||
lastTriggeredTime: | ||
type: string | ||
format: date-time | ||
conditions: | ||
type: array | ||
items: | ||
type: object | ||
required: | ||
- type | ||
- status | ||
properties: | ||
type: | ||
type: string | ||
status: | ||
type: string | ||
observedGeneration: | ||
type: integer | ||
format: int64 | ||
lastTransitionTime: | ||
type: string | ||
format: date-time | ||
reason: | ||
type: string | ||
message: | ||
type: string | ||
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,12 @@ | ||
Thank you for installing {{ .Chart.Name }}. | ||
|
||
Your Kubevent controller has been deployed to the {{ .Values.namespace.name }} namespace. | ||
|
||
To check the deployment status: | ||
kubectl get deployment -n {{ .Values.namespace.name }} | ||
|
||
To check the controller logs: | ||
kubectl logs -n {{ .Values.namespace.name }} -l app=kubevent-controller -f | ||
|
||
For more information about creating EventTriggeredJob resources, see: | ||
https://github.com/roshbhatia/kubevent |
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,15 @@ | ||
{{- define "kubevent.name" -}} | ||
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} | ||
{{- end }} | ||
|
||
{{- define "kubevent.labels" -}} | ||
app.kubernetes.io/name: {{ include "kubevent.name" . }} | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} | ||
app.kubernetes.io/managed-by: {{ .Release.Service }} | ||
{{- end }} | ||
|
||
{{- define "kubevent.annotations" -}} | ||
meta.helm.sh/release-name: {{ .Release.Name }} | ||
meta.helm.sh/release-namespace: {{ .Release.Namespace }} | ||
{{- end }} |
Oops, something went wrong.