Skip to content

Commit

Permalink
ch3/etcd-operator-deployment: Update Deployment api loc for k8s 1.16+
Browse files Browse the repository at this point in the history
K8s 1.16+ stops serving the deprecated versions of the Deployment at the older APIs and rejects calls to API < apps/v1.
See: https://kubernetes.io/blog/2019/07/18/api-deprecations-in-1-16/
This changeset adapted from coreos/etcd-operator#2127
  • Loading branch information
joshix authored Nov 15, 2019
1 parent e71b11e commit 5157040
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions ch03/etcd-operator-deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,35 +1,28 @@
apiVersion: extensions/v1beta1
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
name: etcdoperator
name: etcd-operator
spec:
replicas: 1
selector:
matchLabels:
name: etcd-operator
app: etcd-operator
replicas: 1
template:
metadata:
labels:
name: etcd-operator
app: etcd-operator
spec:
containers:
- name: etcd-operator
image: quay.io/coreos/etcd-operator:v0.9.4
command:
- etcd-operator
- --create-crd=false
env:
- name: MY_POD_NAMESPACE
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: metadata.namespace
- name: MY_POD_NAME
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: metadata.name
imagePullPolicy: IfNotPresent
serviceAccountName: etcd-operator-sa

0 comments on commit 5157040

Please sign in to comment.