shipwright-io / operator

An operator to install and configure Shipwright Builds on Kubernetes clusters.
Apache License 2.0
19 stars 17 forks source link

Source release.yaml from GitHub release #182

Closed adambkaplan closed 4 months ago

adambkaplan commented 8 months ago

Changes

The release.yaml used as the base for deploying Shipwright Builds appears to have been manipulated by a YAML linter or other processor. There are significant differentes in YAML structure and formatting between the kodata/release.yaml in tree and the release.yaml published on GitHub for the respective release (v0.12.0). This makes it difficult to verify that the operator is deploying the right thing, especially when versions are bumped.

This replaces the kodata/release.yaml in tree with the release.yaml published for v0.12.0. This will make it easy to verify that we are deploying the right version of Shipwright Builds with the operator, as well as support future workflows that let contributors update the deployed operand from a nightly release.

Fixes #184

Submitter Checklist

See the contributor guide for details on coding conventions, github and prow interactions, and the code review process.

Release Notes

Update operator to use an exact copy of the Builds v0.12.0 release as the base for its manifests.
adambkaplan commented 8 months ago

/kind cleanup

adambkaplan commented 8 months ago

/assign @divyansh42

adambkaplan commented 4 months ago

/assign @ayushsatyam146

adambkaplan commented 4 months ago

/cc @SaschaSchwarze0

Note - this is not directly tied to the v0.13.0 release. My goal here is to set a good "baseline" so when we upgrade to v0.13.0, it is easier to see what changed.

adambkaplan commented 4 months ago

The diff for kodata/release.yaml is huge because of manipulations that were done by hand to the CRD definitions.

Below is the more relevant diff at the top of the file, everything else is formatting or CRD related:

$ git diff main kodata/release.yaml
diff --git a/kodata/release.yaml b/kodata/release.yaml
index 3ce3852..fcc1b40 100644
--- a/kodata/release.yaml
+++ b/kodata/release.yaml
@@ -81,12 +81,25 @@ kind: ClusterRole
 metadata:
   name: shipwright-build-webhook
 rules:
-  - apiGroups: [""]
-    resources: ["pods", "configmaps", "services", "events", "namespaces", "limitranges", "secrets"]
-    verbs: ["get", "list", "create", "update", "delete", "patch", "watch"]
-  - apiGroups: ["admissionregistration.k8s.io", "admissionregistration.k8s.io/v1beta1"]
-    resources: ["validatingwebhookconfigurations"]
-    verbs: ["get", "list", "create", "update", "delete", "patch", "watch"]
+  - apiGroups:
+      - ""
+    resources:
+      - pods
+      - events
+      - configmaps
+      - secrets
+      - limitranges
+      - namespaces
+      - services
+    verbs:
+      - '*'
+  - apiGroups:
+      - admissionregistration.k8s.io
+      - admissionregistration.k8s.io/v1beta1
+    resources:
+      - validatingwebhookconfigurations
+    verbs:
+      - '*'

 ---
 kind: ClusterRoleBinding
@@ -332,7 +345,6 @@ apiVersion: apiextensions.k8s.io/v1
 kind: CustomResourceDefinition
 metadata:
   annotations:
-    cert-manager.io/inject-ca-from: shipwright-build/shipwright-build-webhook-cert
     controller-gen.kubebuilder.io/version: v0.11.4
   name: buildruns.shipwright.io
 spec:
ayushsatyam146 commented 4 months ago

/lgtm

adambkaplan commented 4 months ago

/approve

Self-approving as this PR has been out for a while, and we want this to land before updating release.yaml to v0.13.0

openshift-ci[bot] commented 4 months ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: adambkaplan

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files: - ~~[OWNERS](https://github.com/shipwright-io/operator/blob/main/OWNERS)~~ [adambkaplan] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment