From 3b5306b0789320509edbfdaa0fb4ad7259a19019 Mon Sep 17 00:00:00 2001 From: Jed Lejosne Date: Thu, 11 Aug 2022 05:46:55 -0400 Subject: [PATCH] whereabouts: bump to v0.5.4 (#847) Signed-off-by: Jed Lejosne Signed-off-by: Jed Lejosne --- ...outs-v0.5.yaml => whereabouts-v0.5.4.yaml} | 34 +++++++++++++++++-- ...outs-v0.5.yaml => whereabouts-v0.5.4.yaml} | 34 +++++++++++++++++-- ...outs-v0.5.yaml => whereabouts-v0.5.4.yaml} | 34 +++++++++++++++++-- ...outs-v0.5.yaml => whereabouts-v0.5.4.yaml} | 34 +++++++++++++++++-- hack/bump-whereabouts.sh | 1 + .../whereabouts/kustomization.yaml | 5 +-- .../whereabouts/patch-ip-reconciler-job.yaml | 14 -------- 7 files changed, 128 insertions(+), 28 deletions(-) rename cluster-provision/k8s/1.22/manifests/whereabouts/{whereabouts-v0.5.yaml => whereabouts-v0.5.4.yaml} (92%) rename cluster-provision/k8s/1.23/manifests/whereabouts/{whereabouts-v0.5.yaml => whereabouts-v0.5.4.yaml} (92%) rename cluster-provision/k8s/1.24-ipv6/manifests/whereabouts/{whereabouts-v0.5.yaml => whereabouts-v0.5.4.yaml} (92%) rename cluster-provision/k8s/1.24/manifests/whereabouts/{whereabouts-v0.5.yaml => whereabouts-v0.5.4.yaml} (92%) delete mode 100644 hack/kustomization/whereabouts/patch-ip-reconciler-job.yaml diff --git a/cluster-provision/k8s/1.22/manifests/whereabouts/whereabouts-v0.5.yaml b/cluster-provision/k8s/1.22/manifests/whereabouts/whereabouts-v0.5.4.yaml similarity index 92% rename from cluster-provision/k8s/1.22/manifests/whereabouts/whereabouts-v0.5.yaml rename to cluster-provision/k8s/1.22/manifests/whereabouts/whereabouts-v0.5.4.yaml index 2adba7b963..c84c7916d7 100644 --- a/cluster-provision/k8s/1.22/manifests/whereabouts/whereabouts-v0.5.yaml +++ b/cluster-provision/k8s/1.22/manifests/whereabouts/whereabouts-v0.5.4.yaml @@ -161,6 +161,24 @@ rules: - pods verbs: - list + - watch +- apiGroups: + - k8s.cni.cncf.io + resources: + - network-attachment-definitions + verbs: + - get + - list + - watch +- apiGroups: + - "" + - events.k8s.io + resources: + - events + verbs: + - create + - patch + - update --- apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding @@ -184,8 +202,10 @@ metadata: name: ip-reconciler namespace: kube-system spec: + concurrencyPolicy: Forbid jobTemplate: spec: + backoffLimit: 0 template: metadata: labels: @@ -195,7 +215,7 @@ spec: - command: - /ip-reconciler - -log-level=verbose - image: ghcr.io/k8snetworkplumbingwg/whereabouts:v0.5-amd64 + image: ghcr.io/k8snetworkplumbingwg/whereabouts:v0.5.4-amd64 name: whereabouts resources: requests: @@ -211,7 +231,9 @@ spec: - hostPath: path: /etc/cni/net.d name: cni-net-dir + ttlSecondsAfterFinished: 300 schedule: '*/5 * * * *' + successfulJobsHistoryLimit: 0 --- apiVersion: apps/v1 kind: DaemonSet @@ -233,12 +255,18 @@ spec: tier: node spec: containers: - - env: + - args: + - -c + - | + SLEEP=false /install-cni.sh && /ip-control-loop -log-level debug + command: + - /bin/sh + env: - name: WHEREABOUTS_NAMESPACE valueFrom: fieldRef: fieldPath: metadata.namespace - image: ghcr.io/k8snetworkplumbingwg/whereabouts:v0.5-amd64 + image: ghcr.io/k8snetworkplumbingwg/whereabouts:v0.5.4-amd64 name: whereabouts resources: limits: diff --git a/cluster-provision/k8s/1.23/manifests/whereabouts/whereabouts-v0.5.yaml b/cluster-provision/k8s/1.23/manifests/whereabouts/whereabouts-v0.5.4.yaml similarity index 92% rename from cluster-provision/k8s/1.23/manifests/whereabouts/whereabouts-v0.5.yaml rename to cluster-provision/k8s/1.23/manifests/whereabouts/whereabouts-v0.5.4.yaml index 2adba7b963..c84c7916d7 100644 --- a/cluster-provision/k8s/1.23/manifests/whereabouts/whereabouts-v0.5.yaml +++ b/cluster-provision/k8s/1.23/manifests/whereabouts/whereabouts-v0.5.4.yaml @@ -161,6 +161,24 @@ rules: - pods verbs: - list + - watch +- apiGroups: + - k8s.cni.cncf.io + resources: + - network-attachment-definitions + verbs: + - get + - list + - watch +- apiGroups: + - "" + - events.k8s.io + resources: + - events + verbs: + - create + - patch + - update --- apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding @@ -184,8 +202,10 @@ metadata: name: ip-reconciler namespace: kube-system spec: + concurrencyPolicy: Forbid jobTemplate: spec: + backoffLimit: 0 template: metadata: labels: @@ -195,7 +215,7 @@ spec: - command: - /ip-reconciler - -log-level=verbose - image: ghcr.io/k8snetworkplumbingwg/whereabouts:v0.5-amd64 + image: ghcr.io/k8snetworkplumbingwg/whereabouts:v0.5.4-amd64 name: whereabouts resources: requests: @@ -211,7 +231,9 @@ spec: - hostPath: path: /etc/cni/net.d name: cni-net-dir + ttlSecondsAfterFinished: 300 schedule: '*/5 * * * *' + successfulJobsHistoryLimit: 0 --- apiVersion: apps/v1 kind: DaemonSet @@ -233,12 +255,18 @@ spec: tier: node spec: containers: - - env: + - args: + - -c + - | + SLEEP=false /install-cni.sh && /ip-control-loop -log-level debug + command: + - /bin/sh + env: - name: WHEREABOUTS_NAMESPACE valueFrom: fieldRef: fieldPath: metadata.namespace - image: ghcr.io/k8snetworkplumbingwg/whereabouts:v0.5-amd64 + image: ghcr.io/k8snetworkplumbingwg/whereabouts:v0.5.4-amd64 name: whereabouts resources: limits: diff --git a/cluster-provision/k8s/1.24-ipv6/manifests/whereabouts/whereabouts-v0.5.yaml b/cluster-provision/k8s/1.24-ipv6/manifests/whereabouts/whereabouts-v0.5.4.yaml similarity index 92% rename from cluster-provision/k8s/1.24-ipv6/manifests/whereabouts/whereabouts-v0.5.yaml rename to cluster-provision/k8s/1.24-ipv6/manifests/whereabouts/whereabouts-v0.5.4.yaml index 2adba7b963..c84c7916d7 100644 --- a/cluster-provision/k8s/1.24-ipv6/manifests/whereabouts/whereabouts-v0.5.yaml +++ b/cluster-provision/k8s/1.24-ipv6/manifests/whereabouts/whereabouts-v0.5.4.yaml @@ -161,6 +161,24 @@ rules: - pods verbs: - list + - watch +- apiGroups: + - k8s.cni.cncf.io + resources: + - network-attachment-definitions + verbs: + - get + - list + - watch +- apiGroups: + - "" + - events.k8s.io + resources: + - events + verbs: + - create + - patch + - update --- apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding @@ -184,8 +202,10 @@ metadata: name: ip-reconciler namespace: kube-system spec: + concurrencyPolicy: Forbid jobTemplate: spec: + backoffLimit: 0 template: metadata: labels: @@ -195,7 +215,7 @@ spec: - command: - /ip-reconciler - -log-level=verbose - image: ghcr.io/k8snetworkplumbingwg/whereabouts:v0.5-amd64 + image: ghcr.io/k8snetworkplumbingwg/whereabouts:v0.5.4-amd64 name: whereabouts resources: requests: @@ -211,7 +231,9 @@ spec: - hostPath: path: /etc/cni/net.d name: cni-net-dir + ttlSecondsAfterFinished: 300 schedule: '*/5 * * * *' + successfulJobsHistoryLimit: 0 --- apiVersion: apps/v1 kind: DaemonSet @@ -233,12 +255,18 @@ spec: tier: node spec: containers: - - env: + - args: + - -c + - | + SLEEP=false /install-cni.sh && /ip-control-loop -log-level debug + command: + - /bin/sh + env: - name: WHEREABOUTS_NAMESPACE valueFrom: fieldRef: fieldPath: metadata.namespace - image: ghcr.io/k8snetworkplumbingwg/whereabouts:v0.5-amd64 + image: ghcr.io/k8snetworkplumbingwg/whereabouts:v0.5.4-amd64 name: whereabouts resources: limits: diff --git a/cluster-provision/k8s/1.24/manifests/whereabouts/whereabouts-v0.5.yaml b/cluster-provision/k8s/1.24/manifests/whereabouts/whereabouts-v0.5.4.yaml similarity index 92% rename from cluster-provision/k8s/1.24/manifests/whereabouts/whereabouts-v0.5.yaml rename to cluster-provision/k8s/1.24/manifests/whereabouts/whereabouts-v0.5.4.yaml index 2adba7b963..c84c7916d7 100644 --- a/cluster-provision/k8s/1.24/manifests/whereabouts/whereabouts-v0.5.yaml +++ b/cluster-provision/k8s/1.24/manifests/whereabouts/whereabouts-v0.5.4.yaml @@ -161,6 +161,24 @@ rules: - pods verbs: - list + - watch +- apiGroups: + - k8s.cni.cncf.io + resources: + - network-attachment-definitions + verbs: + - get + - list + - watch +- apiGroups: + - "" + - events.k8s.io + resources: + - events + verbs: + - create + - patch + - update --- apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding @@ -184,8 +202,10 @@ metadata: name: ip-reconciler namespace: kube-system spec: + concurrencyPolicy: Forbid jobTemplate: spec: + backoffLimit: 0 template: metadata: labels: @@ -195,7 +215,7 @@ spec: - command: - /ip-reconciler - -log-level=verbose - image: ghcr.io/k8snetworkplumbingwg/whereabouts:v0.5-amd64 + image: ghcr.io/k8snetworkplumbingwg/whereabouts:v0.5.4-amd64 name: whereabouts resources: requests: @@ -211,7 +231,9 @@ spec: - hostPath: path: /etc/cni/net.d name: cni-net-dir + ttlSecondsAfterFinished: 300 schedule: '*/5 * * * *' + successfulJobsHistoryLimit: 0 --- apiVersion: apps/v1 kind: DaemonSet @@ -233,12 +255,18 @@ spec: tier: node spec: containers: - - env: + - args: + - -c + - | + SLEEP=false /install-cni.sh && /ip-control-loop -log-level debug + command: + - /bin/sh + env: - name: WHEREABOUTS_NAMESPACE valueFrom: fieldRef: fieldPath: metadata.namespace - image: ghcr.io/k8snetworkplumbingwg/whereabouts:v0.5-amd64 + image: ghcr.io/k8snetworkplumbingwg/whereabouts:v0.5.4-amd64 name: whereabouts resources: limits: diff --git a/hack/bump-whereabouts.sh b/hack/bump-whereabouts.sh index 4bae7b05a2..54ec5c90d4 100755 --- a/hack/bump-whereabouts.sh +++ b/hack/bump-whereabouts.sh @@ -49,6 +49,7 @@ cd - manifests_dir=doc [[ -d ${tmp_dir}/whereabouts/doc/crds ]] && manifests_dir=doc/crds cp hack/kustomization/whereabouts/*.yaml ${tmp_dir}/whereabouts/${manifests_dir}/ +sed -i "s/##VERSION##/${whereabouts_version}/" ${tmp_dir}/whereabouts/${manifests_dir}/kustomization.yaml target_dir="cluster-provision/k8s/${provider}/manifests/whereabouts" mkdir -p ${target_dir} diff --git a/hack/kustomization/whereabouts/kustomization.yaml b/hack/kustomization/whereabouts/kustomization.yaml index eb54eb1e6c..87280ba963 100644 --- a/hack/kustomization/whereabouts/kustomization.yaml +++ b/hack/kustomization/whereabouts/kustomization.yaml @@ -7,5 +7,6 @@ resources: - ./whereabouts.cni.cncf.io_ippools.yaml - ./whereabouts.cni.cncf.io_overlappingrangeipreservations.yaml -transformers: - - patch-ip-reconciler-job.yaml +images: + - name: ghcr.io/k8snetworkplumbingwg/whereabouts + newTag: ##VERSION##-amd64 diff --git a/hack/kustomization/whereabouts/patch-ip-reconciler-job.yaml b/hack/kustomization/whereabouts/patch-ip-reconciler-job.yaml deleted file mode 100644 index 5af1fa3d48..0000000000 --- a/hack/kustomization/whereabouts/patch-ip-reconciler-job.yaml +++ /dev/null @@ -1,14 +0,0 @@ -# TODO: remove after whereabouts contains https://github.com/k8snetworkplumbingwg/whereabouts/pull/150 -apiVersion: builtin -kind: LabelTransformer -metadata: - name: patch-ip-reconciler-job -labels: - app: whereabouts -fieldSpecs: -- path: spec/jobTemplate/spec/template/metadata/labels - create: true - kind: CronJob - metadata: - name: ip-reconciler -