Browse Source

Replace dropped v1beta1 APIs with v1

Requires updating traefik as well to drop deprecated types.

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
pull/3898/head
Brad Davidson 3 years ago committed by Brad Davidson
parent
commit
a5355f0827
  1. 4
      manifests/coredns.yaml
  2. 4
      manifests/local-storage.yaml
  3. 2
      manifests/metrics-server/auth-delegator.yaml
  4. 2
      manifests/metrics-server/auth-reader.yaml
  5. 2
      manifests/metrics-server/metrics-apiservice.yaml
  6. 3
      manifests/metrics-server/metrics-server-deployment.yaml
  7. 5
      manifests/traefik.yaml
  8. 14
      pkg/deploy/zz_generated_bindata.go
  9. 40
      pkg/static/zz_generated_bindata.go
  10. 4
      scripts/airgap/image-list.txt
  11. 5
      scripts/download

4
manifests/coredns.yaml

@ -4,7 +4,7 @@ metadata:
name: coredns
namespace: kube-system
---
apiVersion: rbac.authorization.k8s.io/v1beta1
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
labels:
@ -29,7 +29,7 @@ rules:
- list
- watch
---
apiVersion: rbac.authorization.k8s.io/v1beta1
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
annotations:

4
manifests/local-storage.yaml

@ -4,7 +4,7 @@ metadata:
name: local-path-provisioner-service-account
namespace: kube-system
---
apiVersion: rbac.authorization.k8s.io/v1beta1
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: local-path-provisioner-role
@ -22,7 +22,7 @@ rules:
resources: ["storageclasses"]
verbs: ["get", "list", "watch"]
---
apiVersion: rbac.authorization.k8s.io/v1beta1
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: local-path-provisioner-bind

2
manifests/metrics-server/auth-delegator.yaml

@ -1,5 +1,5 @@
---
apiVersion: rbac.authorization.k8s.io/v1beta1
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: metrics-server:system:auth-delegator

2
manifests/metrics-server/auth-reader.yaml

@ -1,5 +1,5 @@
---
apiVersion: rbac.authorization.k8s.io/v1beta1
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: metrics-server-auth-reader

2
manifests/metrics-server/metrics-apiservice.yaml

@ -1,5 +1,5 @@
---
apiVersion: apiregistration.k8s.io/v1beta1
apiVersion: apiregistration.k8s.io/v1
kind: APIService
metadata:
name: v1beta1.metrics.k8s.io

3
manifests/metrics-server/metrics-server-deployment.yaml

@ -39,7 +39,8 @@ spec:
emptyDir: {}
containers:
- name: metrics-server
image: %{SYSTEM_DEFAULT_REGISTRY}%rancher/mirrored-metrics-server:v0.3.6
image: %{SYSTEM_DEFAULT_REGISTRY}%rancher/mirrored-metrics-server:v0.5.0
args: ['--cert-dir', '/tmp']
volumeMounts:
- name: tmp-dir
mountPath: /tmp

5
manifests/traefik.yaml

@ -1,10 +1,11 @@
---
apiVersion: helm.cattle.io/v1
kind: HelmChart
metadata:
name: traefik-crd
namespace: kube-system
spec:
chart: https://%{KUBERNETES_API}%/static/charts/traefik-crd-9.18.2.tgz
chart: https://%{KUBERNETES_API}%/static/charts/traefik-crd-10.3.0.tgz
---
apiVersion: helm.cattle.io/v1
kind: HelmChart
@ -12,7 +13,7 @@ metadata:
name: traefik
namespace: kube-system
spec:
chart: https://%{KUBERNETES_API}%/static/charts/traefik-9.18.2.tgz
chart: https://%{KUBERNETES_API}%/static/charts/traefik-10.3.0.tgz
set:
global.systemDefaultRegistry: "%{SYSTEM_DEFAULT_REGISTRY_RAW}%"
valuesContent: |-

14
pkg/deploy/zz_generated_bindata.go

File diff suppressed because one or more lines are too long

40
pkg/static/zz_generated_bindata.go

File diff suppressed because one or more lines are too long

4
scripts/airgap/image-list.txt

@ -3,6 +3,6 @@ docker.io/rancher/klipper-lb:v0.2.0
docker.io/rancher/local-path-provisioner:v0.0.20
docker.io/rancher/mirrored-coredns-coredns:1.8.4
docker.io/rancher/mirrored-library-busybox:1.32.1
docker.io/rancher/mirrored-library-traefik:2.4.8
docker.io/rancher/mirrored-metrics-server:v0.3.6
docker.io/rancher/mirrored-library-traefik:2.5.0
docker.io/rancher/mirrored-metrics-server:v0.5.0
docker.io/rancher/mirrored-pause:3.1

5
scripts/download

@ -6,7 +6,7 @@ cd $(dirname $0)/..
RUNC_VERSION=v1.0.1
ROOT_VERSION=v0.9.1
TRAEFIK_VERSION=9.18.2 # appVersion: 2.4.8
TRAEFIK_VERSION=$(awk -F/ '/traefik-([[:digit:]]+\.)/ {sub(/traefik-/, "", $6) ; sub(/\.tgz/, "", $6); print $6}' manifests/traefik.yaml)
CHARTS_DIR=build/static/charts
RUNC_DIR=build/src/github.com/opencontainers/runc
DATA_DIR=build/data
@ -67,9 +67,10 @@ download_and_package_traefik () {
crd_group=$(yq e '.spec.group' ${crd_yaml})
crd_kind=$(yq e '.spec.names.kind' ${crd_yaml})
crd_version=$(yq e '.spec.version' ${crd_yaml})
if [[ -z "$crd_version" ]]; then
if [[ -z "$crd_version" ]] || [[ "$crd_version" == "null" ]]; then
crd_version=$(yq e '.spec.versions[0].name' ${crd_yaml})
fi
echo "Found CRD with GVK ${crd_group}/${crd_version}/${crd_kind}"
crd_apis+=("${crd_group}/${crd_version}/${crd_kind}")
done

Loading…
Cancel
Save