apiVersion: apps/v1
kind: Deployment
metadata:
namespace: mutants
name: mutantops-operator
spec:
replicas: 1
selector:
matchLabels:
app: mutantops-operator
template:
metadata:
labels:
app: mutantops-operator
spec:
serviceAccountName: mutantops-operator
containers:
- name: mutantops-operator
image: ghcr.io/neiam/mutant-operator:latest
imagePullPolicy: Always
env:
- name: WATCH_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: OPERATOR_NAME
value: "mutantops-operator"
# The HTTP API stays off until this is set. Create the secret with:
# kubectl -n mutants create secret generic mutantops-api \
# --from-literal=token="$(openssl rand -hex 32)"
- name: MUTANT_API_TOKEN
valueFrom:
secretKeyRef:
name: mutantops-api
key: token
optional: true
ports:
- name: http
containerPort: 8080
---
apiVersion: v1
kind: Service
metadata:
name: mutantops-api
namespace: mutants
spec:
selector:
app: mutantops-operator
ports:
- name: http
port: 80
targetPort: http
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: mutantops-operator
namespace: mutants
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: mutantops-operator
rules:
- apiGroups:
- ""
resources:
- pods
- services
- services/finalizers
- endpoints
- persistentvolumeclaims
- events
- configmaps
- secrets
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- apps
resources:
- deployments
- daemonsets
- replicasets
- statefulsets
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- neiam.org
resources:
- mutantdeployments
- mutations
- mutations/status
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: mutantops-operator
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: mutantops-operator
subjects:
- kind: ServiceAccount
name: mutantops-operator
namespace: mutants
neiam
/mutant-operator
An Experimental Operator
public · Issues · Pulls · Labels · Forks · Compare · Actions failure · Badges · Packages
⭐
Log in to mark this repository.
2.4 KiB · text
History
c8d9978