Skip to content

Instantly share code, notes, and snippets.

@carlin-q-scott
Created November 4, 2022 19:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save carlin-q-scott/b0c74c9364909ed0e48edcd3c6f1a366 to your computer and use it in GitHub Desktop.
Save carlin-q-scott/b0c74c9364909ed0e48edcd3c6f1a366 to your computer and use it in GitHub Desktop.
Lightweight helm-controller providing HelmChart and HelmChartConfig CRDs
apiVersion: v1
kind: ServiceAccount
metadata:
name: helm-controller
namespace: kube-system
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: helm-controller
rules:
- apiGroups:
- apiextensions.k8s.io
resources:
- customresourcedefinitions
verbs:
- get
- list
- create
- delete
- apiGroups:
- ""
resources:
- configmaps
- rolebinding
- serviceaccounts
- secrets
verbs:
- create
- delete
- list
- watch
- apiGroups:
- batch
resources:
- jobs
verbs:
- "*"
- apiGroups:
- helm.cattle.io
resources:
- "*"
verbs:
- "*"
- apiGroups:
- ""
resources:
- events
- configmaps
- deployments
- pods
verbs:
- create
- get
- patch
- update
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: helm-controller
namespace: kube-system
rules:
- apiGroups:
- ""
resources:
- configmaps
resourceNames:
- helm-controller-lock
verbs:
- "*"
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: helm-controller
namespace: kube-system
subjects:
- kind: ServiceAccount
name: helm-controller
namespace: kube-system
roleRef:
kind: Role
name: helm-controller
apiGroup: rbac.authorization.k8s.io
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: helm-controller-cluster
subjects:
- kind: ServiceAccount
name: helm-controller
namespace: kube-system
roleRef:
kind: ClusterRole
name: helm-controller
apiGroup: rbac.authorization.k8s.io
# https://raw.githubusercontent.com/k3s-io/helm-controller/master/manifests/deploy-cluster-scoped.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: helm-controller
namespace: kube-system
labels:
app: helm-controller
spec:
replicas: 1
selector:
matchLabels:
app: helm-controller
template:
metadata:
labels:
app: helm-controller
spec:
serviceAccountName: helm-controller
containers:
- name: helm-controller
image: rancher/helm-controller:v0.13.0
command: ["helm-controller"]
# args:
# - "--debug"
resources:
limits:
cpu: 100m
memory: 100M
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment