Files
polaris/deploy/all.yaml
2019-04-05 15:57:51 -04:00

186 lines
3.7 KiB
YAML

---
kind: Service
apiVersion: v1
metadata:
name: fairwinds-dash
spec:
selector:
app: fairwinds
ports:
- name: dashboard
protocol: TCP
port: 80
targetPort: 8080
---
apiVersion: v1
kind: Namespace
metadata:
name: fairwinds
labels:
app: fairwinds
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: fairwinds
namespace: fairwinds
labels:
app: fairwinds
---
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRole
metadata:
name: fairwinds
labels:
app: fairwinds
rules:
- apiGroups:
- ''
- 'apps'
- 'admissionregistration.k8s.io'
resources:
- '*'
verbs:
- '*'
---
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRoleBinding
metadata:
name: fairwinds
labels:
app: fairwinds
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: fairwinds
subjects:
- kind: ServiceAccount
name: fairwinds
namespace: fairwinds
---
apiVersion: v1
kind: Secret
metadata:
name: fairwinds
namespace: fairwinds
labels:
app: fairwinds
---
apiVersion: v1
kind: ConfigMap
metadata:
name: fairwinds
namespace: fairwinds
labels:
app: fairwinds
data:
config.yaml: |
resources:
cpuRequestsMissing: error
cpuLimitsMissing: error
memoryRequestsMissing: error
memoryLimitsMissing: error
images:
tagNotSpecified: error
healthChecks:
readinessProbeMissing: warning
livenessProbeMissing: warning
networking:
hostAliasSet: error
hostIPCSet: error
hostNetworkSet: error
hostPIDSet: error
hostPortSet: error
security:
runAsRootAllowed: warning
runAsPrivileged: error
notReadOnlyRootFileSystem: warning
privilegeEscalationAllowed: error
capabilities:
error:
ifAnyAdded:
- CAP_SYS_ADMIN
- CAP_NET_ADMIN
- ALL
warning:
ifAnyAddedBeyond:
- CHOWN
- DAC_OVERRIDE
- FSETID
- FOWNER
- MKNOD
- NET_RAW
- SETGID
- SETUID
- SETFCAP
- SETPCAP
- NET_BIND_SERVICE
- SYS_CHROOT
- KILL
- AUDIT_WRITE
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: fairwinds
namespace: fairwinds
labels:
app: fairwinds
spec:
replicas: 1
selector:
matchLabels:
app: fairwinds
template:
metadata:
labels:
app: fairwinds
spec:
serviceAccountName: fairwinds
containers:
- name: webhook
image: quay.io/reactiveops/fairwinds
command: ["fairwinds", "--webhook"]
imagePullPolicy: Always
ports:
- containerPort: 9876
resources:
limits:
cpu: 100m
memory: 128Mi
requests:
cpu: 100m
memory: 128Mi
volumeMounts:
- name: certs
mountPath: /tmp/cert/
- name: fairwinds
mountPath: /opt/app/config.yaml
subPath: config.yaml
readOnly: true
- name: dashboard
image: quay.io/reactiveops/fairwinds
command: ["fairwinds", "--dashboard"]
imagePullPolicy: Always
ports:
- containerPort: 8080
resources:
limits:
cpu: 100m
memory: 128Mi
requests:
cpu: 100m
memory: 128Mi
volumeMounts:
- name: fairwinds
mountPath: /opt/app/config.yaml
subPath: config.yaml
readOnly: true
volumes:
- name: fairwinds
configMap:
name: fairwinds
- name: certs
secret:
secretName: fairwinds