Skip to content

Commit

Permalink
Merge pull request #121 from ilkilab/fix/update_api_versions
Browse files Browse the repository at this point in the history
Update all API versions to be compatible with v1.15 v1.16 v1.17
  • Loading branch information
pierrevillard authored Dec 14, 2019
2 parents 93daefc + 119a5e7 commit 0839582
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 29 deletions.
4 changes: 2 additions & 2 deletions roles/post-scripts/templates/flannel.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ spec:
rule: 'RunAsAny'
---
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1beta1
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: flannel
rules:
Expand Down Expand Up @@ -76,7 +76,7 @@ rules:
- patch
---
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1beta1
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: flannel
roleRef:
Expand Down
10 changes: 1 addition & 9 deletions roles/post-scripts/templates/haproxy.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,7 @@ metadata:
data:

---
{% if 'v1.16' in kubernetes_release %}
apiVersion: apps/v1
{% else %}
apiVersion: extensions/v1beta1
{% endif %}
kind: Deployment
metadata:
labels:
Expand Down Expand Up @@ -130,11 +126,7 @@ spec:
targetPort: 8080

---
{% if 'v1.16' in kubernetes_release %}
apiVersion: apps/v1
{% else %}
apiVersion: extensions/v1beta1
{% endif %}
kind: Deployment
metadata:
labels:
Expand Down Expand Up @@ -207,4 +199,4 @@ spec:
- name: stat
port: 1024
protocol: TCP
targetPort: 1024
targetPort: 1024
10 changes: 3 additions & 7 deletions roles/post-scripts/templates/nginx.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ spec:
- vsr
---
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1beta1
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: nginx-ingress
rules:
Expand Down Expand Up @@ -135,7 +135,7 @@ rules:
- get
---
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1beta1
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: nginx-ingress
subjects:
Expand All @@ -147,11 +147,7 @@ roleRef:
name: nginx-ingress
apiGroup: rbac.authorization.k8s.io
---
{% if 'v1.16' in kubernetes_release %}
apiVersion: apps/v1
{% else %}
apiVersion: extensions/v1beta1
{% endif %}
kind: DaemonSet
metadata:
name: nginx-ingress
Expand Down Expand Up @@ -226,4 +222,4 @@ spec:
protocol: TCP
name: https
selector:
app: nginx-ingress
app: nginx-ingress
10 changes: 2 additions & 8 deletions roles/post-scripts/templates/traefik.yaml.j2
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1beta1
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: traefik-ingress-controller
rules:
Expand All @@ -24,7 +24,7 @@ rules:
- watch
---
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1beta1
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: traefik-ingress-controller
roleRef:
Expand All @@ -43,22 +43,16 @@ metadata:
namespace: kube-system
---
kind: DaemonSet
{% if 'v1.16' in kubernetes_release %}
apiVersion: apps/v1
{% else %}
apiVersion: extensions/v1beta1
{% endif %}
metadata:
name: traefik-ingress-controller
namespace: kube-system
labels:
k8s-app: traefik-ingress-lb
spec:
{% if 'v1.16' in kubernetes_release %}
selector:
matchLabels:
name: traefik-ingress-lb
{% endif %}
template:
metadata:
labels:
Expand Down
5 changes: 2 additions & 3 deletions roles/setup-master/templates/kube-apiserver.service.j2
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,17 @@ ExecStart=/usr/local/bin/kubernetes/server/bin/kube-apiserver \
--authorization-mode=Node,RBAC \
--bind-address=0.0.0.0 \
--client-ca-file=/etc/kubernetes/pki/ca.crt \
--enable-swagger-ui=true \
--etcd-cafile=/etc/kubernetes/pki/etcd/ca.crt \
--etcd-certfile=/etc/kubernetes/pki/apiserver-etcd-client.crt \
--etcd-keyfile=/etc/kubernetes/pki/apiserver-etcd-client.key \
--etcd-servers={{etcd_servers|join(',')}} \
--event-ttl=1h \
--experimental-encryption-provider-config=/var/lib/kubernetes/encryption-provider-config.yaml \
--encryption-provider-config=/var/lib/kubernetes/encryption-provider-config.yaml \
--kubelet-certificate-authority=/etc/kubernetes/pki/ca.crt \
--kubelet-client-certificate=/etc/kubernetes/pki/apiserver-kubelet-client.crt \
--kubelet-client-key=/etc/kubernetes/pki/apiserver-kubelet-client.key \
--kubelet-https=true \
--runtime-config=api/all \
--runtime-config=api/all=true \
--service-cluster-ip-range={{service_cluster_ip_range}} \
--service-node-port-range={{service_node_port_range}} \
--tls-cert-file=/etc/kubernetes/pki/ca.crt \
Expand Down

0 comments on commit 0839582

Please sign in to comment.