From 5db0749a4ad9e69afb5bf7ffe19f3078d3aa6fca Mon Sep 17 00:00:00 2001 From: Alan Greene Date: Thu, 27 Apr 2023 13:05:07 +0100 Subject: [PATCH] Update kustomization.yaml files to replace deprecated fields Run `kustomize edit fix` on each of our kustomization.yaml files to replace use of `patchesJson6902` with `patches` since it has been deprecated in kustomize v5 and will be removed in a future release when switching to the `kustomize.config.k8s.io/v1` API --- overlays/installer/base/kustomization.yaml | 42 +++++++++---------- .../installer/read-only/kustomization.yaml | 4 +- .../installer/read-write/kustomization.yaml | 30 ++++++------- tekton/kustomization.yaml | 14 +++++++ 4 files changed, 52 insertions(+), 38 deletions(-) diff --git a/overlays/installer/base/kustomization.yaml b/overlays/installer/base/kustomization.yaml index 3b42ebc5d..6ce22db1d 100644 --- a/overlays/installer/base/kustomization.yaml +++ b/overlays/installer/base/kustomization.yaml @@ -1,4 +1,4 @@ -# Copyright 2020 The Tekton Authors +# Copyright 2020-2023 The Tekton Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -16,25 +16,25 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization resources: - - ../../../base/200-clusterrole-backend.yaml - - ../../../base/200-clusterrole-tenant.yaml - - ../../../base/200-role.yaml - - ../../../base/201-clusterrolebinding-backend.yaml - - ../../../base/201-rolebinding.yaml - - ../../../base/202-extension-crd.yaml - - ../../../base/203-serviceaccount.yaml - - ../../../base/300-deployment.yaml - - ../../../base/300-service.yaml - - ../../../base/300-config-info.yaml +- ../../../base/200-clusterrole-backend.yaml +- ../../../base/200-clusterrole-tenant.yaml +- ../../../base/200-role.yaml +- ../../../base/201-clusterrolebinding-backend.yaml +- ../../../base/201-rolebinding.yaml +- ../../../base/202-extension-crd.yaml +- ../../../base/203-serviceaccount.yaml +- ../../../base/300-deployment.yaml +- ../../../base/300-service.yaml +- ../../../base/300-config-info.yaml images: - - name: dashboardImage - newName: ko://github.com/tektoncd/dashboard/cmd/dashboard -patchesJson6902: - - target: - group: apps - version: v1 - kind: Deployment - name: tekton-dashboard - namespace: tekton-pipelines - path: ../../patches/installer/deployment-patch.yaml +- name: dashboardImage + newName: ko://github.com/tektoncd/dashboard/cmd/dashboard namespace: tekton-dashboard +patches: +- path: ../../patches/installer/deployment-patch.yaml + target: + group: apps + kind: Deployment + name: tekton-dashboard + namespace: tekton-pipelines + version: v1 diff --git a/overlays/installer/read-only/kustomization.yaml b/overlays/installer/read-only/kustomization.yaml index 25a9a4e6d..a91e73581 100644 --- a/overlays/installer/read-only/kustomization.yaml +++ b/overlays/installer/read-only/kustomization.yaml @@ -1,4 +1,4 @@ -# Copyright 2020 The Tekton Authors +# Copyright 2020-2023 The Tekton Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -16,4 +16,4 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization resources: - - ../base +- ../base diff --git a/overlays/installer/read-write/kustomization.yaml b/overlays/installer/read-write/kustomization.yaml index 152fdaa67..074361a30 100644 --- a/overlays/installer/read-write/kustomization.yaml +++ b/overlays/installer/read-write/kustomization.yaml @@ -16,18 +16,18 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization resources: - - ../base - - 100-namespace.yaml -patchesJson6902: - - target: - group: rbac.authorization.k8s.io - version: v1 - kind: ClusterRole - name: tekton-dashboard-backend - path: ../../patches/read-write/clusterrole-backend-patch.yaml - - target: - group: rbac.authorization.k8s.io - version: v1 - kind: ClusterRole - name: tekton-dashboard-tenant - path: ../../patches/read-write/clusterrole-tenant-patch.yaml +- ../base +- 100-namespace.yaml +patches: +- path: ../../patches/read-write/clusterrole-backend-patch.yaml + target: + group: rbac.authorization.k8s.io + kind: ClusterRole + name: tekton-dashboard-backend + version: v1 +- path: ../../patches/read-write/clusterrole-tenant-patch.yaml + target: + group: rbac.authorization.k8s.io + kind: ClusterRole + name: tekton-dashboard-tenant + version: v1 diff --git a/tekton/kustomization.yaml b/tekton/kustomization.yaml index d31dea716..436842822 100644 --- a/tekton/kustomization.yaml +++ b/tekton/kustomization.yaml @@ -1,3 +1,17 @@ +# Copyright 2021-2023 The Tekton Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + --- apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization