Fix #20
This commit is contained in:
parent
5ed872661b
commit
df66140844
9 changed files with 39 additions and 104 deletions
|
@ -1,20 +0,0 @@
|
|||
{{- define "gateway-crd-json" }}
|
||||
{
|
||||
"apiVersion": "apiextensions.k8s.io/{{ .Values.crd.version }}",
|
||||
"kind": "CustomResourceDefinition",
|
||||
"metadata": {
|
||||
"name": "gateways.argoproj.io"
|
||||
},
|
||||
"spec": {
|
||||
"group": "argoproj.io",
|
||||
"names": {
|
||||
"kind": "Gateway",
|
||||
"listKind": "GatewayList",
|
||||
"plural": "gateways",
|
||||
"singular": "gateway"
|
||||
},
|
||||
"scope": "Namespaced",
|
||||
"version": "v1alpha1"
|
||||
}
|
||||
}
|
||||
{{- end}}
|
|
@ -14,24 +14,3 @@ We truncate at 63 chars because some Kubernetes name fields are limited to this
|
|||
{{- $name := default .Chart.Name .Values.nameOverride -}}
|
||||
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "sensor-crd-json" }}
|
||||
{
|
||||
"apiVersion": "apiextensions.k8s.io/v1beta1",
|
||||
"kind": "CustomResourceDefinition",
|
||||
"metadata": {
|
||||
"name": "sensors.argoproj.io"
|
||||
},
|
||||
"spec": {
|
||||
"group": "argoproj.io",
|
||||
"names": {
|
||||
"kind": "Sensor",
|
||||
"listKind": "SensorList",
|
||||
"plural": "sensors",
|
||||
"singular": "sensor"
|
||||
},
|
||||
"scope": "Namespaced",
|
||||
"version": "v1alpha1"
|
||||
}
|
||||
}
|
||||
{{- end}}
|
||||
|
|
|
@ -1,20 +0,0 @@
|
|||
{{- define "sensor-crd-json" }}
|
||||
{
|
||||
"apiVersion": "apiextensions.k8s.io/{{ .Values.crd.version }}",
|
||||
"kind": "CustomResourceDefinition",
|
||||
"metadata": {
|
||||
"name": "sensors.argoproj.io"
|
||||
},
|
||||
"spec": {
|
||||
"group": "argoproj.io",
|
||||
"names": {
|
||||
"kind": "Sensor",
|
||||
"listKind": "SensorList",
|
||||
"plural": "sensors",
|
||||
"singular": "sensor"
|
||||
},
|
||||
"scope": "Namespaced",
|
||||
"version": "v1alpha1"
|
||||
}
|
||||
}
|
||||
{{- end}}
|
|
@ -1,19 +0,0 @@
|
|||
apiVersion: batch/v1
|
||||
kind: Job
|
||||
metadata:
|
||||
name: {{ .Release.Name }}-apply-gateway-crd
|
||||
annotations:
|
||||
helm.sh/hook: pre-install
|
||||
helm.sh/hook-delete-policy: hook-succeeded
|
||||
spec:
|
||||
backoffLimit: 5
|
||||
activeDeadlineSeconds: 100
|
||||
template:
|
||||
spec:
|
||||
serviceAccountName: {{ .Values.crd.jobServiceAccount }}
|
||||
containers:
|
||||
- name: kubectl-apply
|
||||
image: lachlanevenson/k8s-kubectl
|
||||
command: ["/bin/sh"]
|
||||
args: ["-c", 'echo ''{{- include "gateway-crd-json" .}}'' | kubectl apply -f -']
|
||||
restartPolicy: Never
|
|
@ -1,19 +0,0 @@
|
|||
apiVersion: batch/v1
|
||||
kind: Job
|
||||
metadata:
|
||||
name: {{ .Release.Name }}-apply-sensor-crd
|
||||
annotations:
|
||||
helm.sh/hook: pre-install
|
||||
helm.sh/hook-delete-policy: hook-succeeded
|
||||
spec:
|
||||
backoffLimit: 5
|
||||
activeDeadlineSeconds: 100
|
||||
template:
|
||||
spec:
|
||||
serviceAccountName: {{ .Values.crd.jobServiceAccount }}
|
||||
containers:
|
||||
- name: kubectl-apply
|
||||
image: lachlanevenson/k8s-kubectl
|
||||
command: ["/bin/sh"]
|
||||
args: ["-c", 'echo ''{{- include "sensor-crd-json" .}}'' | kubectl apply -f -']
|
||||
restartPolicy: Never
|
13
charts/argo-events/templates/gateway-crd.yaml
Normal file
13
charts/argo-events/templates/gateway-crd.yaml
Normal file
|
@ -0,0 +1,13 @@
|
|||
apiVersion: apiextensions.k8s.io/v1beta1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
name: gateways.argoproj.io
|
||||
spec:
|
||||
group: argoproj.io
|
||||
names:
|
||||
kind: Gateway
|
||||
listKind: GatewayList
|
||||
plural: gateways
|
||||
singular: gateway
|
||||
scope: Namespaced
|
||||
version: v1alpha1
|
|
@ -6,3 +6,16 @@ rules:
|
|||
- apiGroups: ["*"]
|
||||
resources: ["*"]
|
||||
verbs: ["*"]
|
||||
#
|
||||
# - apiGroups: ["argoproj.io"]
|
||||
# resources: ["sensors"]
|
||||
# verbs: ["get", "list", "watch", "update", "patch"]
|
||||
# - apiGroups: ["argoproj.io"]
|
||||
# resources: ["gateways"]
|
||||
# verbs: ["get", "list", "watch", "update", "patch"]
|
||||
# - apiGroups: ["argoproj.io"]
|
||||
# resources: ["workflows"]
|
||||
# verbs: ["get", "list", "watch", "update", "patch"]
|
||||
# - apiGroups: ["", "batch"]
|
||||
# resources: ["configmaps", "secrets", "pods", "services", "jobs"]
|
||||
# verbs: ["get", "watch", "list", "patch"]
|
||||
|
|
13
charts/argo-events/templates/sensor-crd.yaml
Normal file
13
charts/argo-events/templates/sensor-crd.yaml
Normal file
|
@ -0,0 +1,13 @@
|
|||
apiVersion: apiextensions.k8s.io/v1beta1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
name: sensors.argoproj.io
|
||||
spec:
|
||||
group: argoproj.io
|
||||
names:
|
||||
kind: Sensor
|
||||
listKind: SensorList
|
||||
plural: sensors
|
||||
singular: sensor
|
||||
scope: Namespaced
|
||||
version: v1alpha1
|
|
@ -1,11 +1,6 @@
|
|||
registry: metalgearsolid
|
||||
imagePullPolicy: Always
|
||||
|
||||
# Version of the Sensor CRD
|
||||
crd:
|
||||
version: v1beta1
|
||||
jobServiceAccount: default
|
||||
|
||||
# If set to true then chart set controller instance id to release name
|
||||
useReleaseAsInstanceID: true
|
||||
instanceID: 1
|
||||
|
|
Loading…
Reference in a new issue