Created
February 25, 2018 20:16
-
-
Save audip/efdc7a146f190c737b9da8db8f58be93 to your computer and use it in GitHub Desktop.
RBAC and deployment example for external dns
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
--- | |
apiVersion: v1 | |
kind: ServiceAccount | |
metadata: | |
labels: | |
app: external-dns | |
name: external-dns | |
--- | |
apiVersion: rbac.authorization.k8s.io/v1 | |
kind: ClusterRole | |
metadata: | |
labels: | |
app: external-dns | |
name: external-dns | |
rules: | |
- apiGroups: | |
- "" | |
- extensions | |
resources: | |
- ingresses | |
- services | |
verbs: | |
- get | |
- list | |
- watch | |
--- | |
apiVersion: rbac.authorization.k8s.io/v1 | |
kind: ClusterRoleBinding | |
metadata: | |
labels: | |
app: external-dns | |
name: external-dns | |
roleRef: | |
apiGroup: rbac.authorization.k8s.io | |
kind: ClusterRole | |
name: external-dns | |
subjects: | |
- kind: ServiceAccount | |
name: external-dns | |
namespace: infra | |
--- | |
apiVersion: apps/v1beta2 | |
kind: Deployment | |
metadata: | |
labels: | |
app: external-dns | |
name: external-dns | |
namespace: infra | |
spec: | |
replicas: 1 | |
selector: | |
matchLabels: | |
app: external-dns | |
strategy: | |
type: Recreate | |
template: | |
metadata: | |
labels: | |
app: external-dns | |
spec: | |
containers: | |
- name: external-dns | |
image: "registry.opensource.zalan.do/teapot/external-dns:v0.4.8" | |
imagePullPolicy: "IfNotPresent" | |
args: | |
- --log-level=info | |
- --domain-filter=domain.io. | |
- --aws-zone-type=public | |
- --policy=upsert-only | |
- --provider=aws | |
- --source=ingress | |
- --registry=txt | |
- --txt-owner-id=externaldns | |
env: | |
- name: AWS_DEFAULT_REGION | |
value: us-east-1 | |
livenessProbe: | |
httpGet: | |
path: /healthz | |
port: 7979 | |
ports: | |
- containerPort: 7979 | |
resources: | |
limits: | |
memory: 50Mi | |
requests: | |
cpu: 10m | |
memory: 50Mi | |
serviceAccountName: external-dns |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment