Skip to content
This repository has been archived by the owner on Oct 24, 2023. It is now read-only.

Commit

Permalink
chore: remove no-op 1.15 version checks in templates (#3851)
Browse files Browse the repository at this point in the history
  • Loading branch information
mboersma authored Sep 21, 2020
1 parent f8e34a3 commit c8f0756
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 40 deletions.
10 changes: 0 additions & 10 deletions parts/k8s/addons/azure-cloud-provider.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ subjects:
- kind: ServiceAccount
name: persistent-volume-binder
namespace: kube-system
{{- if IsKubernetesVersionGe "1.15.0"}}
---
apiVersion: rbac.authorization.k8s.io/v1{{- if not (IsKubernetesVersionGe "1.16.0")}}beta1{{end}}
kind: ClusterRole
Expand Down Expand Up @@ -81,7 +80,6 @@ subjects:
- kind: ServiceAccount
name: azure-cloud-provider
namespace: kube-system
{{- end}}
{{- if UsesCloudControllerManager}}
---
apiVersion: storage.k8s.io/v1
Expand All @@ -98,9 +96,7 @@ parameters:
kind: managed
cachingMode: ReadOnly
reclaimPolicy: Delete
{{- if IsKubernetesVersionGe "1.15.0"}}
allowVolumeExpansion: true
{{- end}}
{{- if HasAvailabilityZones}}
volumeBindingMode: WaitForFirstConsumer
allowedTopologies:
Expand All @@ -123,9 +119,7 @@ parameters:
kind: managed
cachingMode: ReadOnly
reclaimPolicy: Delete
{{- if IsKubernetesVersionGe "1.15.0"}}
allowVolumeExpansion: true
{{- end}}
{{- if HasAvailabilityZones}}
volumeBindingMode: WaitForFirstConsumer
allowedTopologies:
Expand All @@ -148,9 +142,7 @@ parameters:
kind: managed
cachingMode: ReadOnly
reclaimPolicy: Delete
{{- if IsKubernetesVersionGe "1.15.0"}}
allowVolumeExpansion: true
{{- end}}
{{- if HasAvailabilityZones}}
volumeBindingMode: WaitForFirstConsumer
allowedTopologies:
Expand All @@ -171,9 +163,7 @@ provisioner: file.csi.azure.com
parameters:
skuName: Standard_LRS
reclaimPolicy: Delete
{{- if IsKubernetesVersionGe "1.15.0"}}
allowVolumeExpansion: true
{{- end}}
volumeBindingMode: Immediate
{{else}}
{{- if NeedsStorageAccountStorageClasses}}
Expand Down
12 changes: 2 additions & 10 deletions parts/k8s/addons/pod-security-policy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -114,12 +114,9 @@ subjects:
apiGroup: rbac.authorization.k8s.io
---
apiVersion: rbac.authorization.k8s.io/v1
kind: {{if IsKubernetesVersionGe "1.15.0"}}ClusterRoleBinding{{else}}RoleBinding{{end}}
kind: ClusterRoleBinding
metadata:
name: default:privileged
{{- if not (IsKubernetesVersionGe "1.15.0")}}
namespace: kube-system
{{end}}
labels:
addonmanager.kubernetes.io/mode: Reconcile
roleRef:
Expand All @@ -128,13 +125,8 @@ roleRef:
name: psp:privileged
subjects:
- kind: Group
name: {{if IsKubernetesVersionGe "1.15.0"}}system:authenticated{{else}}system:masters{{end}}
apiGroup: rbac.authorization.k8s.io
{{- if not (IsKubernetesVersionGe "1.15.0")}}
- kind: Group
name: system:serviceaccounts:kube-system
name: system:authenticated
apiGroup: rbac.authorization.k8s.io
{{end}}
- kind: Group
name: system:nodes
apiGroup: rbac.authorization.k8s.io
Expand Down
22 changes: 2 additions & 20 deletions pkg/engine/templates_generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit c8f0756

Please sign in to comment.