Add service account and RBAC
This commit is contained in:
parent
68eea939a3
commit
799e277fe0
2 changed files with 85 additions and 0 deletions
|
|
@ -3,6 +3,7 @@ FROM alpine:3.16
|
||||||
ARG RELEASE_VERSION_ARG
|
ARG RELEASE_VERSION_ARG
|
||||||
|
|
||||||
ENV RELEASE_VERSION=$RELEASE_VERSION_ARG
|
ENV RELEASE_VERSION=$RELEASE_VERSION_ARG
|
||||||
|
ENV TZ="Etc/UTC"
|
||||||
|
|
||||||
WORKDIR /scripts
|
WORKDIR /scripts
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,89 @@ kind: Namespace
|
||||||
metadata:
|
metadata:
|
||||||
name: easyhaproxy
|
name: easyhaproxy
|
||||||
|
|
||||||
|
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ServiceAccount
|
||||||
|
metadata:
|
||||||
|
name: easyhaproxy-ingress
|
||||||
|
namespace: easyhaproxy
|
||||||
|
|
||||||
|
---
|
||||||
|
kind: ClusterRole
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
metadata:
|
||||||
|
name: easyhaproxy-ingress
|
||||||
|
rules:
|
||||||
|
- apiGroups:
|
||||||
|
- ""
|
||||||
|
resources:
|
||||||
|
# - configmaps
|
||||||
|
# - endpoints
|
||||||
|
# - nodes
|
||||||
|
- pods
|
||||||
|
- services
|
||||||
|
- namespaces
|
||||||
|
# - events
|
||||||
|
- serviceaccounts
|
||||||
|
verbs:
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- watch
|
||||||
|
- apiGroups:
|
||||||
|
- "extensions"
|
||||||
|
- "networking.k8s.io"
|
||||||
|
resources:
|
||||||
|
- ingresses
|
||||||
|
# - ingresses/status
|
||||||
|
# - ingressclasses
|
||||||
|
verbs:
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- watch
|
||||||
|
# - apiGroups:
|
||||||
|
# - "extensions"
|
||||||
|
# - "networking.k8s.io"
|
||||||
|
# resources:
|
||||||
|
# - ingresses/status
|
||||||
|
# verbs:
|
||||||
|
# - update
|
||||||
|
- apiGroups:
|
||||||
|
- ""
|
||||||
|
resources:
|
||||||
|
- secrets
|
||||||
|
verbs:
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
# - watch
|
||||||
|
# - create
|
||||||
|
# - patch
|
||||||
|
# - update
|
||||||
|
# - apiGroups:
|
||||||
|
# - "discovery.k8s.io"
|
||||||
|
# resources:
|
||||||
|
# - endpointslices
|
||||||
|
# verbs:
|
||||||
|
# - get
|
||||||
|
# - list
|
||||||
|
# - watch
|
||||||
|
|
||||||
|
---
|
||||||
|
kind: ClusterRoleBinding
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
metadata:
|
||||||
|
name: easyhaproxy-ingress
|
||||||
|
namespace: easyhaproxy
|
||||||
|
roleRef:
|
||||||
|
apiGroup: rbac.authorization.k8s.io
|
||||||
|
kind: ClusterRole
|
||||||
|
name: easyhaproxy-ingress
|
||||||
|
subjects:
|
||||||
|
- kind: ServiceAccount
|
||||||
|
name: easyhaproxy-ingress
|
||||||
|
namespace: easyhaproxy
|
||||||
|
|
||||||
|
|
||||||
---
|
---
|
||||||
apiVersion: apps/v1
|
apiVersion: apps/v1
|
||||||
kind: DaemonSet
|
kind: DaemonSet
|
||||||
|
|
@ -19,6 +102,7 @@ spec:
|
||||||
labels:
|
labels:
|
||||||
app: easyhaproxy-ingress
|
app: easyhaproxy-ingress
|
||||||
spec:
|
spec:
|
||||||
|
serviceAccountName: easyhaproxy-ingress
|
||||||
containers:
|
containers:
|
||||||
- image: byjg/easy-haproxy:test
|
- image: byjg/easy-haproxy:test
|
||||||
imagePullPolicy: Always
|
imagePullPolicy: Always
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue