From b2e3d0487b7fad4b43dbc9c5257a2f02b1c27bf7 Mon Sep 17 00:00:00 2001 From: Brandon Palm Date: Thu, 23 Jul 2026 11:45:33 -0500 Subject: [PATCH] OCPBUGS-85579: Move Console resources from bundle to runtime with capability detection --- .../cert-manager-acme-issuer-sample.yaml | 2 - .../cert-manager-certificate-sample.yaml | 2 - .../cert-manager-example-quickstart.yaml | 5 - .../console/cert-manager-issuer-sample.yaml | 2 - ...ole.openshift.io_v1_consoleyamlsample.yaml | 28 - ...ole.openshift.io_v1_consoleyamlsample.yaml | 26 - ...ole.openshift.io_v1_consolequickstart.yaml | 203 ---- ...ole.openshift.io_v1_consoleyamlsample.yaml | 20 - ...anager-operator.clusterserviceversion.yaml | 15 + config/console/kustomization.yaml | 6 - config/manifests/kustomization.yaml | 1 - config/rbac/role.yaml | 15 + .../cert_manager_controller_set.go | 7 + .../certmanager/console_resources.go | 194 ++++ .../certmanager/console_resources_test.go | 326 +++++++ pkg/operator/assets/bindata.go | 346 +++++++ pkg/operator/starter.go | 8 + test/e2e/console_resources_test.go | 128 +++ test/go.mod | 6 +- test/go.sum | 10 + .../console/v1/applicationmenuspec.go | 39 + .../console/v1/clidownloadlink.go | 34 + .../console/v1/consoleclidownload.go | 260 +++++ .../console/v1/consoleclidownloadspec.go | 51 + .../console/v1/consoleexternalloglink.go | 260 +++++ .../console/v1/consoleexternalloglinkspec.go | 64 ++ .../console/v1/consolelink.go | 260 +++++ .../console/v1/consolelinkspec.go | 70 ++ .../console/v1/consolenotification.go | 260 +++++ .../console/v1/consolenotificationspec.go | 71 ++ .../console/v1/consoleplugin.go | 262 ++++++ .../console/v1/consolepluginbackend.go | 46 + .../console/v1/consoleplugincsp.go | 67 ++ .../console/v1/consoleplugini18n.go | 35 + .../console/v1/consolepluginproxy.go | 72 ++ .../console/v1/consolepluginproxyendpoint.go | 47 + .../v1/consolepluginproxyserviceconfig.go | 48 + .../console/v1/consolepluginservice.go | 59 ++ .../console/v1/consolepluginspec.go | 116 +++ .../console/v1/consolequickstart.go | 261 +++++ .../console/v1/consolequickstartspec.go | 146 +++ .../console/v1/consolequickstarttask.go | 57 ++ .../console/v1/consolequickstarttaskreview.go | 37 + .../v1/consolequickstarttasksummary.go | 36 + .../console/v1/consolesample.go | 261 +++++ .../v1/consolesamplecontainerimportsource.go | 45 + ...nsolesamplecontainerimportsourceservice.go | 30 + .../v1/consolesamplegitimportsource.go | 36 + .../consolesamplegitimportsourcerepository.go | 62 ++ .../v1/consolesamplegitimportsourceservice.go | 30 + .../console/v1/consolesamplesource.go | 51 + .../console/v1/consolesamplespec.go | 147 +++ .../console/v1/consoleyamlsample.go | 260 +++++ .../console/v1/consoleyamlsamplespec.go | 76 ++ .../applyconfigurations/console/v1/link.go | 36 + .../console/v1/namespacedashboardspec.go | 44 + .../applyconfigurations/internal/internal.go | 888 ++++++++++++++++++ .../console/applyconfigurations/utils.go | 98 ++ .../console/clientset/versioned/clientset.go | 104 ++ .../versioned/fake/clientset_generated.go | 126 +++ .../console/clientset/versioned/fake/doc.go | 4 + .../clientset/versioned/fake/register.go | 40 + .../console/clientset/versioned/scheme/doc.go | 4 + .../clientset/versioned/scheme/register.go | 40 + .../typed/console/v1/console_client.go | 120 +++ .../typed/console/v1/consoleclidownload.go | 54 ++ .../console/v1/consoleexternalloglink.go | 54 ++ .../versioned/typed/console/v1/consolelink.go | 54 ++ .../typed/console/v1/consolenotification.go | 54 ++ .../typed/console/v1/consoleplugin.go | 54 ++ .../typed/console/v1/consolequickstart.go | 54 ++ .../typed/console/v1/consolesample.go | 54 ++ .../typed/console/v1/consoleyamlsample.go | 54 ++ .../versioned/typed/console/v1/doc.go | 4 + .../versioned/typed/console/v1/fake/doc.go | 4 + .../console/v1/fake/fake_console_client.go | 52 + .../v1/fake/fake_consoleclidownload.go | 37 + .../v1/fake/fake_consoleexternalloglink.go | 37 + .../typed/console/v1/fake/fake_consolelink.go | 33 + .../v1/fake/fake_consolenotification.go | 37 + .../console/v1/fake/fake_consoleplugin.go | 35 + .../console/v1/fake/fake_consolequickstart.go | 37 + .../console/v1/fake/fake_consolesample.go | 35 + .../console/v1/fake/fake_consoleyamlsample.go | 37 + .../typed/console/v1/generated_expansion.go | 19 + vendor/modules.txt | 8 + 86 files changed, 7021 insertions(+), 296 deletions(-) rename {config => bindata}/console/cert-manager-acme-issuer-sample.yaml (92%) rename {config => bindata}/console/cert-manager-certificate-sample.yaml (90%) rename {config => bindata}/console/cert-manager-example-quickstart.yaml (97%) rename {config => bindata}/console/cert-manager-issuer-sample.yaml (88%) delete mode 100644 bundle/manifests/cert-manager-acme-issuer-sample_console.openshift.io_v1_consoleyamlsample.yaml delete mode 100644 bundle/manifests/cert-manager-certificate-sample_console.openshift.io_v1_consoleyamlsample.yaml delete mode 100644 bundle/manifests/cert-manager-example_console.openshift.io_v1_consolequickstart.yaml delete mode 100644 bundle/manifests/cert-manager-issuer-sample_console.openshift.io_v1_consoleyamlsample.yaml delete mode 100644 config/console/kustomization.yaml create mode 100644 pkg/controller/certmanager/console_resources.go create mode 100644 pkg/controller/certmanager/console_resources_test.go create mode 100644 test/e2e/console_resources_test.go create mode 100644 vendor/github.com/openshift/client-go/console/applyconfigurations/console/v1/applicationmenuspec.go create mode 100644 vendor/github.com/openshift/client-go/console/applyconfigurations/console/v1/clidownloadlink.go create mode 100644 vendor/github.com/openshift/client-go/console/applyconfigurations/console/v1/consoleclidownload.go create mode 100644 vendor/github.com/openshift/client-go/console/applyconfigurations/console/v1/consoleclidownloadspec.go create mode 100644 vendor/github.com/openshift/client-go/console/applyconfigurations/console/v1/consoleexternalloglink.go create mode 100644 vendor/github.com/openshift/client-go/console/applyconfigurations/console/v1/consoleexternalloglinkspec.go create mode 100644 vendor/github.com/openshift/client-go/console/applyconfigurations/console/v1/consolelink.go create mode 100644 vendor/github.com/openshift/client-go/console/applyconfigurations/console/v1/consolelinkspec.go create mode 100644 vendor/github.com/openshift/client-go/console/applyconfigurations/console/v1/consolenotification.go create mode 100644 vendor/github.com/openshift/client-go/console/applyconfigurations/console/v1/consolenotificationspec.go create mode 100644 vendor/github.com/openshift/client-go/console/applyconfigurations/console/v1/consoleplugin.go create mode 100644 vendor/github.com/openshift/client-go/console/applyconfigurations/console/v1/consolepluginbackend.go create mode 100644 vendor/github.com/openshift/client-go/console/applyconfigurations/console/v1/consoleplugincsp.go create mode 100644 vendor/github.com/openshift/client-go/console/applyconfigurations/console/v1/consoleplugini18n.go create mode 100644 vendor/github.com/openshift/client-go/console/applyconfigurations/console/v1/consolepluginproxy.go create mode 100644 vendor/github.com/openshift/client-go/console/applyconfigurations/console/v1/consolepluginproxyendpoint.go create mode 100644 vendor/github.com/openshift/client-go/console/applyconfigurations/console/v1/consolepluginproxyserviceconfig.go create mode 100644 vendor/github.com/openshift/client-go/console/applyconfigurations/console/v1/consolepluginservice.go create mode 100644 vendor/github.com/openshift/client-go/console/applyconfigurations/console/v1/consolepluginspec.go create mode 100644 vendor/github.com/openshift/client-go/console/applyconfigurations/console/v1/consolequickstart.go create mode 100644 vendor/github.com/openshift/client-go/console/applyconfigurations/console/v1/consolequickstartspec.go create mode 100644 vendor/github.com/openshift/client-go/console/applyconfigurations/console/v1/consolequickstarttask.go create mode 100644 vendor/github.com/openshift/client-go/console/applyconfigurations/console/v1/consolequickstarttaskreview.go create mode 100644 vendor/github.com/openshift/client-go/console/applyconfigurations/console/v1/consolequickstarttasksummary.go create mode 100644 vendor/github.com/openshift/client-go/console/applyconfigurations/console/v1/consolesample.go create mode 100644 vendor/github.com/openshift/client-go/console/applyconfigurations/console/v1/consolesamplecontainerimportsource.go create mode 100644 vendor/github.com/openshift/client-go/console/applyconfigurations/console/v1/consolesamplecontainerimportsourceservice.go create mode 100644 vendor/github.com/openshift/client-go/console/applyconfigurations/console/v1/consolesamplegitimportsource.go create mode 100644 vendor/github.com/openshift/client-go/console/applyconfigurations/console/v1/consolesamplegitimportsourcerepository.go create mode 100644 vendor/github.com/openshift/client-go/console/applyconfigurations/console/v1/consolesamplegitimportsourceservice.go create mode 100644 vendor/github.com/openshift/client-go/console/applyconfigurations/console/v1/consolesamplesource.go create mode 100644 vendor/github.com/openshift/client-go/console/applyconfigurations/console/v1/consolesamplespec.go create mode 100644 vendor/github.com/openshift/client-go/console/applyconfigurations/console/v1/consoleyamlsample.go create mode 100644 vendor/github.com/openshift/client-go/console/applyconfigurations/console/v1/consoleyamlsamplespec.go create mode 100644 vendor/github.com/openshift/client-go/console/applyconfigurations/console/v1/link.go create mode 100644 vendor/github.com/openshift/client-go/console/applyconfigurations/console/v1/namespacedashboardspec.go create mode 100644 vendor/github.com/openshift/client-go/console/applyconfigurations/internal/internal.go create mode 100644 vendor/github.com/openshift/client-go/console/applyconfigurations/utils.go create mode 100644 vendor/github.com/openshift/client-go/console/clientset/versioned/clientset.go create mode 100644 vendor/github.com/openshift/client-go/console/clientset/versioned/fake/clientset_generated.go create mode 100644 vendor/github.com/openshift/client-go/console/clientset/versioned/fake/doc.go create mode 100644 vendor/github.com/openshift/client-go/console/clientset/versioned/fake/register.go create mode 100644 vendor/github.com/openshift/client-go/console/clientset/versioned/scheme/doc.go create mode 100644 vendor/github.com/openshift/client-go/console/clientset/versioned/scheme/register.go create mode 100644 vendor/github.com/openshift/client-go/console/clientset/versioned/typed/console/v1/console_client.go create mode 100644 vendor/github.com/openshift/client-go/console/clientset/versioned/typed/console/v1/consoleclidownload.go create mode 100644 vendor/github.com/openshift/client-go/console/clientset/versioned/typed/console/v1/consoleexternalloglink.go create mode 100644 vendor/github.com/openshift/client-go/console/clientset/versioned/typed/console/v1/consolelink.go create mode 100644 vendor/github.com/openshift/client-go/console/clientset/versioned/typed/console/v1/consolenotification.go create mode 100644 vendor/github.com/openshift/client-go/console/clientset/versioned/typed/console/v1/consoleplugin.go create mode 100644 vendor/github.com/openshift/client-go/console/clientset/versioned/typed/console/v1/consolequickstart.go create mode 100644 vendor/github.com/openshift/client-go/console/clientset/versioned/typed/console/v1/consolesample.go create mode 100644 vendor/github.com/openshift/client-go/console/clientset/versioned/typed/console/v1/consoleyamlsample.go create mode 100644 vendor/github.com/openshift/client-go/console/clientset/versioned/typed/console/v1/doc.go create mode 100644 vendor/github.com/openshift/client-go/console/clientset/versioned/typed/console/v1/fake/doc.go create mode 100644 vendor/github.com/openshift/client-go/console/clientset/versioned/typed/console/v1/fake/fake_console_client.go create mode 100644 vendor/github.com/openshift/client-go/console/clientset/versioned/typed/console/v1/fake/fake_consoleclidownload.go create mode 100644 vendor/github.com/openshift/client-go/console/clientset/versioned/typed/console/v1/fake/fake_consoleexternalloglink.go create mode 100644 vendor/github.com/openshift/client-go/console/clientset/versioned/typed/console/v1/fake/fake_consolelink.go create mode 100644 vendor/github.com/openshift/client-go/console/clientset/versioned/typed/console/v1/fake/fake_consolenotification.go create mode 100644 vendor/github.com/openshift/client-go/console/clientset/versioned/typed/console/v1/fake/fake_consoleplugin.go create mode 100644 vendor/github.com/openshift/client-go/console/clientset/versioned/typed/console/v1/fake/fake_consolequickstart.go create mode 100644 vendor/github.com/openshift/client-go/console/clientset/versioned/typed/console/v1/fake/fake_consolesample.go create mode 100644 vendor/github.com/openshift/client-go/console/clientset/versioned/typed/console/v1/fake/fake_consoleyamlsample.go create mode 100644 vendor/github.com/openshift/client-go/console/clientset/versioned/typed/console/v1/generated_expansion.go diff --git a/config/console/cert-manager-acme-issuer-sample.yaml b/bindata/console/cert-manager-acme-issuer-sample.yaml similarity index 92% rename from config/console/cert-manager-acme-issuer-sample.yaml rename to bindata/console/cert-manager-acme-issuer-sample.yaml index ae04d2fab..40e3d7e4a 100644 --- a/config/console/cert-manager-acme-issuer-sample.yaml +++ b/bindata/console/cert-manager-acme-issuer-sample.yaml @@ -2,8 +2,6 @@ apiVersion: console.openshift.io/v1 kind: ConsoleYAMLSample metadata: name: cert-manager-acme-issuer-sample - annotations: - capability.openshift.io/name: Console spec: targetResource: apiVersion: cert-manager.io/v1 diff --git a/config/console/cert-manager-certificate-sample.yaml b/bindata/console/cert-manager-certificate-sample.yaml similarity index 90% rename from config/console/cert-manager-certificate-sample.yaml rename to bindata/console/cert-manager-certificate-sample.yaml index 23b565989..b83b514ac 100644 --- a/config/console/cert-manager-certificate-sample.yaml +++ b/bindata/console/cert-manager-certificate-sample.yaml @@ -2,8 +2,6 @@ apiVersion: console.openshift.io/v1 kind: ConsoleYAMLSample metadata: name: cert-manager-certificate-sample - annotations: - capability.openshift.io/name: Console spec: targetResource: apiVersion: cert-manager.io/v1 diff --git a/config/console/cert-manager-example-quickstart.yaml b/bindata/console/cert-manager-example-quickstart.yaml similarity index 97% rename from config/console/cert-manager-example-quickstart.yaml rename to bindata/console/cert-manager-example-quickstart.yaml index f1f192aa3..127c2b206 100644 --- a/config/console/cert-manager-example-quickstart.yaml +++ b/bindata/console/cert-manager-example-quickstart.yaml @@ -2,11 +2,6 @@ apiVersion: console.openshift.io/v1 kind: ConsoleQuickStart metadata: name: cert-manager-example - annotations: - capability.openshift.io/name: Console - include.release.openshift.io/ibm-cloud-managed: "true" - include.release.openshift.io/self-managed-high-availability: "true" - include.release.openshift.io/single-node-developer: "true" spec: displayName: cert-manager Operator for Red Hat OpenShift Example tags: diff --git a/config/console/cert-manager-issuer-sample.yaml b/bindata/console/cert-manager-issuer-sample.yaml similarity index 88% rename from config/console/cert-manager-issuer-sample.yaml rename to bindata/console/cert-manager-issuer-sample.yaml index 3100ed5b7..3bc9ebd71 100644 --- a/config/console/cert-manager-issuer-sample.yaml +++ b/bindata/console/cert-manager-issuer-sample.yaml @@ -2,8 +2,6 @@ apiVersion: console.openshift.io/v1 kind: ConsoleYAMLSample metadata: name: cert-manager-issuer-sample - annotations: - capability.openshift.io/name: Console spec: targetResource: apiVersion: cert-manager.io/v1 diff --git a/bundle/manifests/cert-manager-acme-issuer-sample_console.openshift.io_v1_consoleyamlsample.yaml b/bundle/manifests/cert-manager-acme-issuer-sample_console.openshift.io_v1_consoleyamlsample.yaml deleted file mode 100644 index 31f27a2e0..000000000 --- a/bundle/manifests/cert-manager-acme-issuer-sample_console.openshift.io_v1_consoleyamlsample.yaml +++ /dev/null @@ -1,28 +0,0 @@ -apiVersion: console.openshift.io/v1 -kind: ConsoleYAMLSample -metadata: - annotations: - capability.openshift.io/name: Console - name: cert-manager-acme-issuer-sample -spec: - description: An example ACME Issuer for Let's Encrypt production certificates with - HTTP-01 challenge - targetResource: - apiVersion: cert-manager.io/v1 - kind: Issuer - title: Example ACME Issuer (Let's Encrypt) - yaml: |- - apiVersion: cert-manager.io/v1 - kind: Issuer - metadata: - name: letsencrypt-prod - namespace: default - spec: - acme: - server: https://acme-v02.api.letsencrypt.org/directory - privateKeySecretRef: - name: letsencrypt-prod-account-key - solvers: - - http01: - ingress: - ingressClassName: openshift-default diff --git a/bundle/manifests/cert-manager-certificate-sample_console.openshift.io_v1_consoleyamlsample.yaml b/bundle/manifests/cert-manager-certificate-sample_console.openshift.io_v1_consoleyamlsample.yaml deleted file mode 100644 index 64b78b490..000000000 --- a/bundle/manifests/cert-manager-certificate-sample_console.openshift.io_v1_consoleyamlsample.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: console.openshift.io/v1 -kind: ConsoleYAMLSample -metadata: - annotations: - capability.openshift.io/name: Console - name: cert-manager-certificate-sample -spec: - description: A simple Certificate example - targetResource: - apiVersion: cert-manager.io/v1 - kind: Certificate - title: Example Certificate - yaml: |- - apiVersion: cert-manager.io/v1 - kind: Certificate - metadata: - name: example-cert - namespace: default - spec: - secretName: example-tls - commonName: example.com - dnsNames: - - example.com - issuerRef: - name: selfsigned-issuer - kind: Issuer diff --git a/bundle/manifests/cert-manager-example_console.openshift.io_v1_consolequickstart.yaml b/bundle/manifests/cert-manager-example_console.openshift.io_v1_consolequickstart.yaml deleted file mode 100644 index 37847c281..000000000 --- a/bundle/manifests/cert-manager-example_console.openshift.io_v1_consolequickstart.yaml +++ /dev/null @@ -1,203 +0,0 @@ -apiVersion: console.openshift.io/v1 -kind: ConsoleQuickStart -metadata: - annotations: - capability.openshift.io/name: Console - include.release.openshift.io/ibm-cloud-managed: "true" - include.release.openshift.io/self-managed-high-availability: "true" - include.release.openshift.io/single-node-developer: "true" - name: cert-manager-example -spec: - conclusion: |- - Great job! You've successfully created your first Issuer and Certificate. - - ### Next Steps: - - - For production, use Let's Encrypt (ACME Issuer) instead of self-signed certificates - - Explore ClusterIssuer for cluster-wide certificate management - - Check out the [cert-manager documentation](https://docs.redhat.com/en/documentation/openshift_container_platform/latest/html/security_and_compliance/cert-manager-operator-for-red-hat-openshift) to learn more - description: Create and issue TLS certificates using the cert-manager Operator for - Red Hat OpenShift - displayName: cert-manager Operator for Red Hat OpenShift Example - durationMinutes: 10 - introduction: |- - # cert-manager Operator for Red Hat OpenShift - - The cert-manager Operator for Red Hat OpenShift enables you to create and sign TLS certificates from an external PKI for your workloads - running on an OpenShift cluster. - - ### Expected Learning - - With this Quick Start, you will learn about the following CRDs provided by the cert-manager operator: - 1. **Issuer** - defines a certificate authority that can sign certificates - 2. **Certificate** - defines the desired certificate and its properties - - This Quick Start will walk you through creating your first certificate: - - Create a self-signed Issuer (for testing) - - Create a Certificate signed by that Issuer - - View the generated certificate in a Kubernetes Secret - - Learn how to use it in your applications - - **Note**: For production, you would use Let's Encrypt (ACME), HashiCorp Vault, or your organization's CA instead of self-signed certificates. - prerequisites: - - You completed the "Install the cert-manager Operator for Red Hat OpenShift" quick - start. - - You have a namespace in which to deploy the example CRs. - tags: - - example - - operator - - certificates - tasks: - - description: |- - ### To navigate to the installed operator: - 1. Go to the **Installed Operators** from the [Ecosystem]{{highlight qs-nav-ecosystem}} section of the navigation. - 2. In the **Search by name** field, type `cert-manager`. - 3. Look for **cert-manager Operator for Red Hat OpenShift**. If you had completed the prerequisite Quick Start, the tile should appear. - 4. Click on the installed operator - - You will be brought to the **Operator Details** page and be presented with **Provided APIs** - review: - failedTaskHelp: This task isn't verified yet. Try the task again. - instructions: |- - #### Verify you see a list of **Provided APIs**: - The list should include `Issuer`, `ClusterIssuer`, and `Certificate` - summary: - failed: Try the steps again. - success: You are in the right place, and ready to start the rest of the Quick - Start - title: Navigate to installed cert-manager operator - - description: |- - ### Create or select a project to work in - 1. Find the **Project** dropdown menu at the top of the screen. - 2. Select or create the project in which you want to work in. - - **Note**: For this example, we'll create an `Issuer` which is namespace-scoped. If you want to issue certificates - across multiple namespaces, you can create a `ClusterIssuer` instead. - review: - failedTaskHelp: Try the task again. - instructions: '#### Verify the name in the **Project** dropdown menu is the - expected project' - summary: - failed: Try the steps again. - success: You are in the right place. - title: Select a project - - description: |- - ### To create a self-signed Issuer - - An Issuer represents a certificate authority that can sign certificates. We'll create a self-signed Issuer - for this example. This is useful for testing and development. - - 1. Find the `Issuer` Custom Resource in the list of **Provided APIs** or in the top side-scrolling menu bar. - - From the list of **Provided APIs**, click the **Create instance** link. - - From the **top side-scrolling menu bar**, click **Issuer** and then click **Create Issuer**. - - 2. Switch to **YAML view** in the editor. - - 3. On the right sidebar, look for the **Samples** section and select **"Example Self-Signed Issuer"**. - - 4. Click **Try it** to populate the editor with the sample YAML. - - 5. Click the **Create** button to create the Issuer. - review: - failedTaskHelp: This task isn't verified yet. Try the task again. - instructions: |- - #### Verify the Issuer was successfully created: - 1. You should see the Issuer listed with the name `selfsigned-issuer` - 2. Check that the **Ready** condition shows **True** in the Conditions section - summary: - failed: Try the steps again. - success: You just created a self-signed Issuer! Now we can create certificates. - title: Create a self-signed Issuer - - description: |- - ### To create a Certificate - - Now we'll create a certificate that will be signed by our Issuer. - - 1. Find the `Certificate` Custom Resource in the list of **Provided APIs** or in the top side-scrolling menu bar. - - From the list of **Provided APIs**, click the **Create instance** link. - - From the **top side-scrolling menu bar**, click **Certificate** and then click **Create Certificate**. - - 2. Switch to **YAML view** in the editor. - - 3. On the right sidebar, look for the **Samples** section and select **"Example Certificate"**. - - 4. Click **Try it** to populate the editor with the sample YAML. - - 5. Click the **Create** button to create the Certificate. - review: - failedTaskHelp: This task isn't verified yet. Try the task again. - instructions: |- - #### Verify the Certificate was successfully created: - 1. You should see the Certificate listed with the name `example-cert`. - 2. Check that the **Ready** condition shows **True**. - 3. Navigate to the [Workloads]{{highlight qs-nav-workloads}} section and click **Secrets** - 4. You should see a new Secret named `example-tls`. - summary: - failed: Try the steps again. - success: You just created your first certificate! cert-manager has issued it - and stored it in a Secret. - title: Create a Certificate - - description: |- - ### To inspect the certificate - - Let's look at the Secret that contains the certificate. - - 1. Make sure you're in the [Workloads]{{highlight qs-nav-workloads}} section, click **Secrets**. - 2. Click on the **example-tls** Secret. - 3. You should see the certificate data with keys: - - `tls.crt` - The certificate. - - `tls.key` - The private key. - - `ca.crt` - The CA certificate. - review: - failedTaskHelp: This task isn't verified yet. Try the task again. - instructions: |- - #### Verify you can see the certificate data: - Is the Secret `example-tls` present with `tls.crt` and `tls.key`? - summary: - failed: Try the steps again. - success: Great! Your certificate is ready to use. - title: View the certificate - - description: |- - ### How to use certificates - - Now you can use this certificate in your applications. Here's a simple example for an OpenShift Route: - - ```yaml - apiVersion: route.openshift.io/v1 - kind: Route - metadata: - name: my-app - spec: - to: - kind: Service - name: my-service - tls: - termination: edge - externalCertificate: - name: example-tls - ``` - - Or in an Ingress: - - ```yaml - apiVersion: networking.k8s.io/v1 - kind: Ingress - metadata: - name: my-app - spec: - tls: - - secretName: example-tls - rules: - - host: example.com - ``` - - **Note**: cert-manager will automatically renew certificates before they expire! - review: - failedTaskHelp: Review the examples above. - instructions: |- - #### Do you understand how to use certificates? - Certificates can be referenced in Routes and Ingress resources. - summary: - failed: Review the examples again. - success: You now know how to create and use certificates! - title: Use the certificate diff --git a/bundle/manifests/cert-manager-issuer-sample_console.openshift.io_v1_consoleyamlsample.yaml b/bundle/manifests/cert-manager-issuer-sample_console.openshift.io_v1_consoleyamlsample.yaml deleted file mode 100644 index 3e8fffad4..000000000 --- a/bundle/manifests/cert-manager-issuer-sample_console.openshift.io_v1_consoleyamlsample.yaml +++ /dev/null @@ -1,20 +0,0 @@ -apiVersion: console.openshift.io/v1 -kind: ConsoleYAMLSample -metadata: - annotations: - capability.openshift.io/name: Console - name: cert-manager-issuer-sample -spec: - description: A simple self-signed Issuer for development and testing - targetResource: - apiVersion: cert-manager.io/v1 - kind: Issuer - title: Example Self-Signed Issuer - yaml: |- - apiVersion: cert-manager.io/v1 - kind: Issuer - metadata: - name: selfsigned-issuer - namespace: default - spec: - selfSigned: {} diff --git a/bundle/manifests/cert-manager-operator.clusterserviceversion.yaml b/bundle/manifests/cert-manager-operator.clusterserviceversion.yaml index 2832f06b5..264250d24 100644 --- a/bundle/manifests/cert-manager-operator.clusterserviceversion.yaml +++ b/bundle/manifests/cert-manager-operator.clusterserviceversion.yaml @@ -587,6 +587,21 @@ spec: - patch - update - watch + - apiGroups: + - config.openshift.io + resources: + - clusterversions + verbs: + - get + - apiGroups: + - console.openshift.io + resources: + - consolequickstarts + - consoleyamlsamples + verbs: + - create + - get + - update - apiGroups: - coordination.k8s.io resources: diff --git a/config/console/kustomization.yaml b/config/console/kustomization.yaml deleted file mode 100644 index 599549b5a..000000000 --- a/config/console/kustomization.yaml +++ /dev/null @@ -1,6 +0,0 @@ -resources: -- cert-manager-example-quickstart.yaml -- cert-manager-issuer-sample.yaml -- cert-manager-certificate-sample.yaml -- cert-manager-acme-issuer-sample.yaml - diff --git a/config/manifests/kustomization.yaml b/config/manifests/kustomization.yaml index 0a4b22e0f..1bbf49121 100644 --- a/config/manifests/kustomization.yaml +++ b/config/manifests/kustomization.yaml @@ -5,7 +5,6 @@ resources: - ../default - ../samples - ../scorecard -- ../console # [WEBHOOK] To enable webhooks, uncomment all the sections with [WEBHOOK] prefix. # Do NOT uncomment sections with prefix [CERTMANAGER], as OLM does not support cert-manager. diff --git a/config/rbac/role.yaml b/config/rbac/role.yaml index 60136088a..3d46685f0 100644 --- a/config/rbac/role.yaml +++ b/config/rbac/role.yaml @@ -178,6 +178,21 @@ rules: - patch - update - watch +- apiGroups: + - config.openshift.io + resources: + - clusterversions + verbs: + - get +- apiGroups: + - console.openshift.io + resources: + - consolequickstarts + - consoleyamlsamples + verbs: + - create + - get + - update - apiGroups: - coordination.k8s.io resources: diff --git a/pkg/controller/certmanager/cert_manager_controller_set.go b/pkg/controller/certmanager/cert_manager_controller_set.go index 08981cb33..0b3915c85 100644 --- a/pkg/controller/certmanager/cert_manager_controller_set.go +++ b/pkg/controller/certmanager/cert_manager_controller_set.go @@ -4,7 +4,9 @@ import ( "k8s.io/client-go/informers" "k8s.io/client-go/kubernetes" + configv1client "github.com/openshift/client-go/config/clientset/versioned" configinformers "github.com/openshift/client-go/config/informers/externalversions" + consoleclient "github.com/openshift/client-go/console/clientset/versioned" "github.com/openshift/library-go/pkg/controller/factory" "github.com/openshift/library-go/pkg/operator/events" "github.com/openshift/library-go/pkg/operator/resource/resourceapply" @@ -24,6 +26,7 @@ type CertManagerControllerSet struct { certManagerCAInjectorDeploymentController factory.Controller certManagerNetworkPolicyStaticResourcesController factory.Controller certManagerNetworkPolicyUserDefinedController factory.Controller + consoleResourcesController factory.Controller } func NewCertManagerControllerSet( @@ -34,6 +37,8 @@ func NewCertManagerControllerSet( operatorClient v1helpers.OperatorClientWithFinalizers, certManagerOperatorInformers certmanoperatorinformers.SharedInformerFactory, kubeClientContainer *resourceapply.ClientHolder, + configClient configv1client.Interface, + consoleClient consoleclient.Interface, eventRecorder events.Recorder, targetVersion string, versionRecorder status.VersionGetter, @@ -49,6 +54,7 @@ func NewCertManagerControllerSet( certManagerCAInjectorDeploymentController: NewCertManagerCAInjectorDeploymentController(operatorClient, certManagerOperatorInformers, infraInformers, kubeClient, kubeInformersForTargetNamespace, eventRecorder, targetVersion, versionRecorder, trustedCAConfigmapName, cloudCredentialsSecretName), certManagerNetworkPolicyStaticResourcesController: NewCertManagerNetworkPolicyStaticResourcesController(operatorClient, kubeClientContainer, kubeInformersForNamespaces, certManagerOperatorInformers, eventRecorder), certManagerNetworkPolicyUserDefinedController: NewCertManagerNetworkPolicyUserDefinedController(operatorClient, certManagerOperatorInformers, kubeClient, kubeInformersForNamespaces, eventRecorder), + consoleResourcesController: NewConsoleResourcesController(operatorClient, configClient, consoleClient, eventRecorder), } } @@ -62,5 +68,6 @@ func (c *CertManagerControllerSet) ToArray() []factory.Controller { c.certManagerCAInjectorDeploymentController, c.certManagerNetworkPolicyStaticResourcesController, c.certManagerNetworkPolicyUserDefinedController, + c.consoleResourcesController, } } diff --git a/pkg/controller/certmanager/console_resources.go b/pkg/controller/certmanager/console_resources.go new file mode 100644 index 000000000..6d304fec5 --- /dev/null +++ b/pkg/controller/certmanager/console_resources.go @@ -0,0 +1,194 @@ +package certmanager + +import ( + "context" + "errors" + "fmt" + "slices" + "time" + + apierrors "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/api/equality" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/klog/v2" + sigyaml "sigs.k8s.io/yaml" + + configv1 "github.com/openshift/api/config/v1" + consolev1 "github.com/openshift/api/console/v1" + configv1client "github.com/openshift/client-go/config/clientset/versioned" + consoleclient "github.com/openshift/client-go/console/clientset/versioned" + "github.com/openshift/library-go/pkg/controller/factory" + "github.com/openshift/library-go/pkg/operator/events" + "github.com/openshift/library-go/pkg/operator/v1helpers" + + "github.com/openshift/cert-manager-operator/pkg/operator/assets" +) + +const ( + consoleResourcesControllerName = operatorName + "-console-resources" +) + +var ( + ConsoleYAMLSampleGVR = schema.GroupVersionResource{ + Group: "console.openshift.io", + Version: "v1", + Resource: "consoleyamlsamples", + } + + ConsoleQuickStartGVR = schema.GroupVersionResource{ + Group: "console.openshift.io", + Version: "v1", + Resource: "consolequickstarts", + } + + yamlSampleAssetFiles = []string{ + "console/cert-manager-acme-issuer-sample.yaml", + "console/cert-manager-certificate-sample.yaml", + "console/cert-manager-issuer-sample.yaml", + } + + quickStartAssetFiles = []string{ + "console/cert-manager-example-quickstart.yaml", + } +) + +// +kubebuilder:rbac:groups=config.openshift.io,resources=clusterversions,verbs=get +// +kubebuilder:rbac:groups=console.openshift.io,resources=consoleyamlsamples;consolequickstarts,verbs=get;create;update + +type consoleResourcesController struct { + configClient configv1client.Interface + consoleClient consoleclient.Interface + eventRecorder events.Recorder + yamlSamples []*consolev1.ConsoleYAMLSample + quickStarts []*consolev1.ConsoleQuickStart +} + +func loadAssets[T any](files []string) []*T { + result := make([]*T, 0, len(files)) + for _, file := range files { + data, err := assets.Asset(file) + if err != nil { + panic(fmt.Sprintf("failed to read console asset %s: %v", file, err)) + } + var obj T + if err := sigyaml.UnmarshalStrict(data, &obj); err != nil { + panic(fmt.Sprintf("failed to decode console asset %s: %v", file, err)) + } + result = append(result, &obj) + } + return result +} + +func NewConsoleResourcesController( + operatorClient v1helpers.OperatorClient, + configClient configv1client.Interface, + consoleClient consoleclient.Interface, + eventRecorder events.Recorder, +) factory.Controller { + c := &consoleResourcesController{ + configClient: configClient, + consoleClient: consoleClient, + eventRecorder: eventRecorder.WithComponentSuffix("console-resources"), + yamlSamples: loadAssets[consolev1.ConsoleYAMLSample](yamlSampleAssetFiles), + quickStarts: loadAssets[consolev1.ConsoleQuickStart](quickStartAssetFiles), + } + + return factory.New(). + WithInformers(operatorClient.Informer()). + ResyncEvery(10*time.Minute). + WithSync(c.sync). + ToController(consoleResourcesControllerName, c.eventRecorder) +} + +func (c *consoleResourcesController) sync(ctx context.Context, _ factory.SyncContext) error { + enabled, err := c.hasConsoleCapability(ctx) + if err != nil { + return fmt.Errorf("failed to check Console capability: %w", err) + } + + if !enabled { + klog.V(4).Info("Console capability is not enabled, skipping Console resource creation") + return nil + } + + var errs []error + for _, desired := range c.yamlSamples { + if err := c.applyYAMLSample(ctx, desired); err != nil { + errs = append(errs, fmt.Errorf("failed to apply ConsoleYAMLSample/%s: %w", desired.Name, err)) + } + } + for _, desired := range c.quickStarts { + if err := c.applyQuickStart(ctx, desired); err != nil { + errs = append(errs, fmt.Errorf("failed to apply ConsoleQuickStart/%s: %w", desired.Name, err)) + } + } + + return errors.Join(errs...) +} + +func (c *consoleResourcesController) applyYAMLSample(ctx context.Context, desired *consolev1.ConsoleYAMLSample) error { + client := c.consoleClient.ConsoleV1().ConsoleYAMLSamples() + existing, err := client.Get(ctx, desired.Name, metav1.GetOptions{}) + if apierrors.IsNotFound(err) { + if _, err = client.Create(ctx, desired, metav1.CreateOptions{}); err != nil { + return err + } + c.eventRecorder.Eventf("ConsoleYAMLSampleCreated", "Created ConsoleYAMLSample %q", desired.Name) + return nil + } + if err != nil { + return err + } + if equality.Semantic.DeepEqual(existing.Spec, desired.Spec) { + return nil + } + toUpdate := existing.DeepCopy() + toUpdate.Spec = desired.Spec + if _, err = client.Update(ctx, toUpdate, metav1.UpdateOptions{}); err != nil { + return err + } + c.eventRecorder.Eventf("ConsoleYAMLSampleUpdated", "Updated ConsoleYAMLSample %q", desired.Name) + return nil +} + +func (c *consoleResourcesController) applyQuickStart(ctx context.Context, desired *consolev1.ConsoleQuickStart) error { + client := c.consoleClient.ConsoleV1().ConsoleQuickStarts() + existing, err := client.Get(ctx, desired.Name, metav1.GetOptions{}) + if apierrors.IsNotFound(err) { + if _, err = client.Create(ctx, desired, metav1.CreateOptions{}); err != nil { + return err + } + c.eventRecorder.Eventf("ConsoleQuickStartCreated", "Created ConsoleQuickStart %q", desired.Name) + return nil + } + if err != nil { + return err + } + if equality.Semantic.DeepEqual(existing.Spec, desired.Spec) { + return nil + } + toUpdate := existing.DeepCopy() + toUpdate.Spec = desired.Spec + if _, err = client.Update(ctx, toUpdate, metav1.UpdateOptions{}); err != nil { + return err + } + c.eventRecorder.Eventf("ConsoleQuickStartUpdated", "Updated ConsoleQuickStart %q", desired.Name) + return nil +} + +func (c *consoleResourcesController) hasConsoleCapability(ctx context.Context) (bool, error) { + version, err := c.configClient.ConfigV1().ClusterVersions().Get(ctx, "version", metav1.GetOptions{}) + if apierrors.IsNotFound(err) { + klog.V(4).Info("ClusterVersion resource not available (e.g. MicroShift); assuming Console capability is disabled") + return false, nil + } + if err != nil { + return false, fmt.Errorf("failed to get ClusterVersion: %w", err) + } + + return slices.Contains( + version.Status.Capabilities.EnabledCapabilities, + configv1.ClusterVersionCapabilityConsole, + ), nil +} diff --git a/pkg/controller/certmanager/console_resources_test.go b/pkg/controller/certmanager/console_resources_test.go new file mode 100644 index 000000000..62aa5cd3b --- /dev/null +++ b/pkg/controller/certmanager/console_resources_test.go @@ -0,0 +1,326 @@ +package certmanager + +import ( + "context" + "fmt" + "strings" + "testing" + + apierrors "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + clienttesting "k8s.io/client-go/testing" + "k8s.io/utils/clock" + + configv1 "github.com/openshift/api/config/v1" + consolev1 "github.com/openshift/api/console/v1" + configfake "github.com/openshift/client-go/config/clientset/versioned/fake" + consolefake "github.com/openshift/client-go/console/clientset/versioned/fake" + "github.com/openshift/library-go/pkg/operator/events" +) + +func clusterVersionWithCapabilities(caps ...configv1.ClusterVersionCapability) *configv1.ClusterVersion { + return &configv1.ClusterVersion{ + ObjectMeta: metav1.ObjectMeta{Name: "version"}, + Status: configv1.ClusterVersionStatus{ + Capabilities: configv1.ClusterVersionCapabilitiesStatus{ + EnabledCapabilities: caps, + }, + }, + } +} + +func newTestController(t *testing.T, configClient *configfake.Clientset, consoleClient *consolefake.Clientset) *consoleResourcesController { + t.Helper() + return &consoleResourcesController{ + configClient: configClient, + consoleClient: consoleClient, + eventRecorder: events.NewInMemoryRecorder("test", clock.RealClock{}), + yamlSamples: loadAssets[consolev1.ConsoleYAMLSample](yamlSampleAssetFiles), + quickStarts: loadAssets[consolev1.ConsoleQuickStart](quickStartAssetFiles), + } +} + +func TestHasConsoleCapability(t *testing.T) { + tests := []struct { + name string + caps []configv1.ClusterVersionCapability + expected bool + }{ + { + name: "console enabled", + caps: []configv1.ClusterVersionCapability{configv1.ClusterVersionCapabilityConsole, configv1.ClusterVersionCapabilityIngress}, + expected: true, + }, + { + name: "console disabled", + caps: []configv1.ClusterVersionCapability{configv1.ClusterVersionCapabilityIngress, configv1.ClusterVersionCapabilityStorage}, + expected: false, + }, + { + name: "no capabilities", + caps: nil, + expected: false, + }, + { + name: "console only capability", + caps: []configv1.ClusterVersionCapability{configv1.ClusterVersionCapabilityConsole}, + expected: true, + }, + { + name: "empty capabilities list", + caps: []configv1.ClusterVersionCapability{}, + expected: false, + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + cv := clusterVersionWithCapabilities(tt.caps...) + client := configfake.NewClientset(cv) + c := &consoleResourcesController{configClient: client} + + got, err := c.hasConsoleCapability(context.Background()) + if err != nil { + t.Fatalf("unexpected error: %v", err) + } + if got != tt.expected { + t.Errorf("hasConsoleCapability() = %v, want %v", got, tt.expected) + } + }) + } +} + +func TestHasConsoleCapabilityClusterVersionNotFound(t *testing.T) { + client := configfake.NewClientset() + c := &consoleResourcesController{configClient: client} + + got, err := c.hasConsoleCapability(context.Background()) + if err != nil { + t.Fatalf("expected no error when ClusterVersion is not found (e.g. MicroShift), got: %v", err) + } + if got { + t.Error("expected false when ClusterVersion does not exist") + } +} + +func TestHasConsoleCapabilityResourceNotFound(t *testing.T) { + client := configfake.NewClientset() + client.PrependReactor("get", "clusterversions", func(action clienttesting.Action) (bool, runtime.Object, error) { + return true, nil, &apierrors.StatusError{ + ErrStatus: metav1.Status{ + Status: metav1.StatusFailure, + Code: 404, + Reason: metav1.StatusReasonNotFound, + Message: "the server could not find the requested resource", + }, + } + }) + c := &consoleResourcesController{configClient: client} + + got, err := c.hasConsoleCapability(context.Background()) + if err != nil { + t.Fatalf("expected no error for resource-type-not-found (MicroShift), got: %v", err) + } + if got { + t.Error("expected false when ClusterVersion resource type does not exist") + } +} + +func TestSyncConsoleDisabled(t *testing.T) { + cv := clusterVersionWithCapabilities(configv1.ClusterVersionCapabilityIngress, configv1.ClusterVersionCapabilityStorage) + configClient := configfake.NewClientset(cv) + consoleClient := consolefake.NewClientset() + + c := newTestController(t, configClient, consoleClient) + + if err := c.sync(context.Background(), nil); err != nil { + t.Fatalf("sync() returned error: %v", err) + } + + if len(consoleClient.Actions()) != 0 { + t.Errorf("expected no console client actions when Console disabled, got %d", len(consoleClient.Actions())) + } +} + +func TestSyncConsoleEnabled(t *testing.T) { + cv := clusterVersionWithCapabilities(configv1.ClusterVersionCapabilityConsole) + configClient := configfake.NewClientset(cv) + consoleClient := consolefake.NewClientset() + + c := newTestController(t, configClient, consoleClient) + + err := c.sync(context.Background(), nil) + if err != nil { + t.Fatalf("sync() returned error: %v", err) + } + + samples, err := consoleClient.ConsoleV1().ConsoleYAMLSamples().List(context.Background(), metav1.ListOptions{}) + if err != nil { + t.Fatalf("failed to list ConsoleYAMLSamples: %v", err) + } + if len(samples.Items) != len(yamlSampleAssetFiles) { + t.Errorf("expected %d ConsoleYAMLSamples, got %d", len(yamlSampleAssetFiles), len(samples.Items)) + } + + quickStarts, err := consoleClient.ConsoleV1().ConsoleQuickStarts().List(context.Background(), metav1.ListOptions{}) + if err != nil { + t.Fatalf("failed to list ConsoleQuickStarts: %v", err) + } + if len(quickStarts.Items) != len(quickStartAssetFiles) { + t.Errorf("expected %d ConsoleQuickStarts, got %d", len(quickStartAssetFiles), len(quickStarts.Items)) + } +} + +func TestSyncSkipsWhenClusterVersionMissing(t *testing.T) { + configClient := configfake.NewClientset() + consoleClient := consolefake.NewClientset() + + c := newTestController(t, configClient, consoleClient) + + err := c.sync(context.Background(), nil) + if err != nil { + t.Fatalf("sync() should succeed when ClusterVersion is missing (e.g. MicroShift), got: %v", err) + } + + if len(consoleClient.Actions()) != 0 { + t.Errorf("expected no console client actions when ClusterVersion is missing, got %d", len(consoleClient.Actions())) + } +} + +func TestSyncErrorPropagationFromCapabilityCheck(t *testing.T) { + configClient := configfake.NewClientset() + configClient.PrependReactor("get", "clusterversions", func(action clienttesting.Action) (bool, runtime.Object, error) { + return true, nil, fmt.Errorf("connection refused") + }) + consoleClient := consolefake.NewClientset() + + c := newTestController(t, configClient, consoleClient) + + err := c.sync(context.Background(), nil) + if err == nil { + t.Fatal("sync() should return error on transient failure") + } + if !strings.Contains(err.Error(), "failed to check Console capability") { + t.Errorf("error should wrap capability check failure, got: %v", err) + } + + if len(consoleClient.Actions()) != 0 { + t.Errorf("expected no console client actions when capability check fails, got %d", len(consoleClient.Actions())) + } +} + +func TestSyncAttemptsAllAssetsOnError(t *testing.T) { + cv := clusterVersionWithCapabilities(configv1.ClusterVersionCapabilityConsole) + configClient := configfake.NewClientset(cv) + consoleClient := consolefake.NewClientset() + + consoleClient.PrependReactor("get", "*", func(action clienttesting.Action) (bool, runtime.Object, error) { + return true, nil, fmt.Errorf("simulated error") + }) + + c := newTestController(t, configClient, consoleClient) + totalAssets := len(c.yamlSamples) + len(c.quickStarts) + + err := c.sync(context.Background(), nil) + if err == nil { + t.Fatal("sync() should return error when all assets fail") + } + + getActions := 0 + for _, action := range consoleClient.Actions() { + if action.GetVerb() == "get" { + getActions++ + } + } + + if getActions < totalAssets { + t.Errorf("expected at least %d get actions (one per asset), got %d; sync may be aborting early", + totalAssets, getActions) + } +} + +func TestSyncNoAssetsNoError(t *testing.T) { + cv := clusterVersionWithCapabilities(configv1.ClusterVersionCapabilityConsole) + configClient := configfake.NewClientset(cv) + consoleClient := consolefake.NewClientset() + + c := &consoleResourcesController{ + configClient: configClient, + consoleClient: consoleClient, + eventRecorder: events.NewInMemoryRecorder("test", clock.RealClock{}), + } + + if err := c.sync(context.Background(), nil); err != nil { + t.Fatalf("sync() with no assets should succeed, got: %v", err) + } + + if len(consoleClient.Actions()) != 0 { + t.Errorf("expected no console client actions with empty assets, got %d", len(consoleClient.Actions())) + } +} + +func TestSyncIdempotent(t *testing.T) { + cv := clusterVersionWithCapabilities(configv1.ClusterVersionCapabilityConsole) + configClient := configfake.NewClientset(cv) + consoleClient := consolefake.NewClientset() + + c := newTestController(t, configClient, consoleClient) + + if err := c.sync(context.Background(), nil); err != nil { + t.Fatalf("first sync() failed: %v", err) + } + + if err := c.sync(context.Background(), nil); err != nil { + t.Fatalf("second sync() failed: %v", err) + } + + samples, _ := consoleClient.ConsoleV1().ConsoleYAMLSamples().List(context.Background(), metav1.ListOptions{}) + if len(samples.Items) != len(yamlSampleAssetFiles) { + t.Errorf("expected %d ConsoleYAMLSamples after second sync, got %d", len(yamlSampleAssetFiles), len(samples.Items)) + } +} + +func TestSyncReturnsAggregatedErrors(t *testing.T) { + cv := clusterVersionWithCapabilities(configv1.ClusterVersionCapabilityConsole) + configClient := configfake.NewClientset(cv) + consoleClient := consolefake.NewClientset() + + consoleClient.PrependReactor("get", "*", func(action clienttesting.Action) (bool, runtime.Object, error) { + return true, nil, fmt.Errorf("simulated error for %s", action.GetResource().Resource) + }) + + c := newTestController(t, configClient, consoleClient) + + err := c.sync(context.Background(), nil) + if err == nil { + t.Fatal("sync() should return error when all assets fail") + } + + errStr := err.Error() + if !strings.Contains(errStr, "ConsoleYAMLSample") { + t.Errorf("aggregated error should mention ConsoleYAMLSample, got: %v", err) + } + if !strings.Contains(errStr, "ConsoleQuickStart") { + t.Errorf("aggregated error should mention ConsoleQuickStart, got: %v", err) + } +} + +func TestConsoleAssetContent(t *testing.T) { + yamlSamples := loadAssets[consolev1.ConsoleYAMLSample](yamlSampleAssetFiles) + expectedNames := []string{ + "cert-manager-acme-issuer-sample", + "cert-manager-certificate-sample", + "cert-manager-issuer-sample", + } + for i, sample := range yamlSamples { + if sample.Name != expectedNames[i] { + t.Errorf("yamlSample[%d] name = %q, want %q", i, sample.Name, expectedNames[i]) + } + } + + quickStarts := loadAssets[consolev1.ConsoleQuickStart](quickStartAssetFiles) + if len(quickStarts) != 1 || quickStarts[0].Name != "cert-manager-example" { + t.Errorf("quickStart name = %q, want %q", quickStarts[0].Name, "cert-manager-example") + } +} diff --git a/pkg/operator/assets/bindata.go b/pkg/operator/assets/bindata.go index 6183e9b47..56e814627 100644 --- a/pkg/operator/assets/bindata.go +++ b/pkg/operator/assets/bindata.go @@ -43,6 +43,10 @@ // bindata/cert-manager-deployment/webhook/cert-manager-webhook-subjectaccessreviews-crb.yaml // bindata/cert-manager-deployment/webhook/cert-manager-webhook-svc.yaml // bindata/cert-manager-deployment/webhook/cert-manager-webhook-validatingwebhookconfiguration.yaml +// bindata/console/cert-manager-acme-issuer-sample.yaml +// bindata/console/cert-manager-certificate-sample.yaml +// bindata/console/cert-manager-example-quickstart.yaml +// bindata/console/cert-manager-issuer-sample.yaml // bindata/istio-csr/cert-manager-istio-csr-clusterrole.yaml // bindata/istio-csr/cert-manager-istio-csr-clusterrolebinding.yaml // bindata/istio-csr/cert-manager-istio-csr-deployment.yaml @@ -2295,6 +2299,338 @@ func certManagerDeploymentWebhookCertManagerWebhookValidatingwebhookconfiguratio return a, nil } +var _consoleCertManagerAcmeIssuerSampleYaml = []byte(`apiVersion: console.openshift.io/v1 +kind: ConsoleYAMLSample +metadata: + name: cert-manager-acme-issuer-sample +spec: + targetResource: + apiVersion: cert-manager.io/v1 + kind: Issuer + title: Example ACME Issuer (Let's Encrypt) + description: An example ACME Issuer for Let's Encrypt production certificates with HTTP-01 challenge + yaml: |- + apiVersion: cert-manager.io/v1 + kind: Issuer + metadata: + name: letsencrypt-prod + namespace: default + spec: + acme: + server: https://acme-v02.api.letsencrypt.org/directory + privateKeySecretRef: + name: letsencrypt-prod-account-key + solvers: + - http01: + ingress: + ingressClassName: openshift-default +`) + +func consoleCertManagerAcmeIssuerSampleYamlBytes() ([]byte, error) { + return _consoleCertManagerAcmeIssuerSampleYaml, nil +} + +func consoleCertManagerAcmeIssuerSampleYaml() (*asset, error) { + bytes, err := consoleCertManagerAcmeIssuerSampleYamlBytes() + if err != nil { + return nil, err + } + + info := bindataFileInfo{name: "console/cert-manager-acme-issuer-sample.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} + a := &asset{bytes: bytes, info: info} + return a, nil +} + +var _consoleCertManagerCertificateSampleYaml = []byte(`apiVersion: console.openshift.io/v1 +kind: ConsoleYAMLSample +metadata: + name: cert-manager-certificate-sample +spec: + targetResource: + apiVersion: cert-manager.io/v1 + kind: Certificate + title: Example Certificate + description: A simple Certificate example + yaml: |- + apiVersion: cert-manager.io/v1 + kind: Certificate + metadata: + name: example-cert + namespace: default + spec: + secretName: example-tls + commonName: example.com + dnsNames: + - example.com + issuerRef: + name: selfsigned-issuer + kind: Issuer + +`) + +func consoleCertManagerCertificateSampleYamlBytes() ([]byte, error) { + return _consoleCertManagerCertificateSampleYaml, nil +} + +func consoleCertManagerCertificateSampleYaml() (*asset, error) { + bytes, err := consoleCertManagerCertificateSampleYamlBytes() + if err != nil { + return nil, err + } + + info := bindataFileInfo{name: "console/cert-manager-certificate-sample.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} + a := &asset{bytes: bytes, info: info} + return a, nil +} + +var _consoleCertManagerExampleQuickstartYaml = []byte(`apiVersion: console.openshift.io/v1 +kind: ConsoleQuickStart +metadata: + name: cert-manager-example +spec: + displayName: cert-manager Operator for Red Hat OpenShift Example + tags: + - example + - operator + - certificates + durationMinutes: 10 + prerequisites: + - You completed the "Install the cert-manager Operator for Red Hat OpenShift" quick start. + - You have a namespace in which to deploy the example CRs. + description: |- + Create and issue TLS certificates using the cert-manager Operator for Red Hat OpenShift + introduction: |- + # cert-manager Operator for Red Hat OpenShift + + The cert-manager Operator for Red Hat OpenShift enables you to create and sign TLS certificates from an external PKI for your workloads + running on an OpenShift cluster. + + ### Expected Learning + + With this Quick Start, you will learn about the following CRDs provided by the cert-manager operator: + 1. **Issuer** - defines a certificate authority that can sign certificates + 2. **Certificate** - defines the desired certificate and its properties + + This Quick Start will walk you through creating your first certificate: + - Create a self-signed Issuer (for testing) + - Create a Certificate signed by that Issuer + - View the generated certificate in a Kubernetes Secret + - Learn how to use it in your applications + + **Note**: For production, you would use Let's Encrypt (ACME), HashiCorp Vault, or your organization's CA instead of self-signed certificates. + tasks: + - title: Navigate to installed cert-manager operator + description: |- + ### To navigate to the installed operator: + 1. Go to the **Installed Operators** from the [Ecosystem]{{highlight qs-nav-ecosystem}} section of the navigation. + 2. In the **Search by name** field, type ` + "`" + `cert-manager` + "`" + `. + 3. Look for **cert-manager Operator for Red Hat OpenShift**. If you had completed the prerequisite Quick Start, the tile should appear. + 4. Click on the installed operator + + You will be brought to the **Operator Details** page and be presented with **Provided APIs** + review: + instructions: |- + #### Verify you see a list of **Provided APIs**: + The list should include ` + "`" + `Issuer` + "`" + `, ` + "`" + `ClusterIssuer` + "`" + `, and ` + "`" + `Certificate` + "`" + ` + failedTaskHelp: This task isn't verified yet. Try the task again. + summary: + success: You are in the right place, and ready to start the rest of the Quick Start + failed: Try the steps again. + - title: Select a project + description: |- + ### Create or select a project to work in + 1. Find the **Project** dropdown menu at the top of the screen. + 2. Select or create the project in which you want to work in. + + **Note**: For this example, we'll create an ` + "`" + `Issuer` + "`" + ` which is namespace-scoped. If you want to issue certificates + across multiple namespaces, you can create a ` + "`" + `ClusterIssuer` + "`" + ` instead. + review: + instructions: |- + #### Verify the name in the **Project** dropdown menu is the expected project + failedTaskHelp: Try the task again. + summary: + success: You are in the right place. + failed: Try the steps again. + - title: Create a self-signed Issuer + description: |- + ### To create a self-signed Issuer + + An Issuer represents a certificate authority that can sign certificates. We'll create a self-signed Issuer + for this example. This is useful for testing and development. + + 1. Find the ` + "`" + `Issuer` + "`" + ` Custom Resource in the list of **Provided APIs** or in the top side-scrolling menu bar. + - From the list of **Provided APIs**, click the **Create instance** link. + - From the **top side-scrolling menu bar**, click **Issuer** and then click **Create Issuer**. + + 2. Switch to **YAML view** in the editor. + + 3. On the right sidebar, look for the **Samples** section and select **"Example Self-Signed Issuer"**. + + 4. Click **Try it** to populate the editor with the sample YAML. + + 5. Click the **Create** button to create the Issuer. + review: + instructions: |- + #### Verify the Issuer was successfully created: + 1. You should see the Issuer listed with the name ` + "`" + `selfsigned-issuer` + "`" + ` + 2. Check that the **Ready** condition shows **True** in the Conditions section + failedTaskHelp: This task isn't verified yet. Try the task again. + summary: + success: You just created a self-signed Issuer! Now we can create certificates. + failed: Try the steps again. + - title: Create a Certificate + description: |- + ### To create a Certificate + + Now we'll create a certificate that will be signed by our Issuer. + + 1. Find the ` + "`" + `Certificate` + "`" + ` Custom Resource in the list of **Provided APIs** or in the top side-scrolling menu bar. + - From the list of **Provided APIs**, click the **Create instance** link. + - From the **top side-scrolling menu bar**, click **Certificate** and then click **Create Certificate**. + + 2. Switch to **YAML view** in the editor. + + 3. On the right sidebar, look for the **Samples** section and select **"Example Certificate"**. + + 4. Click **Try it** to populate the editor with the sample YAML. + + 5. Click the **Create** button to create the Certificate. + review: + instructions: |- + #### Verify the Certificate was successfully created: + 1. You should see the Certificate listed with the name ` + "`" + `example-cert` + "`" + `. + 2. Check that the **Ready** condition shows **True**. + 3. Navigate to the [Workloads]{{highlight qs-nav-workloads}} section and click **Secrets** + 4. You should see a new Secret named ` + "`" + `example-tls` + "`" + `. + failedTaskHelp: This task isn't verified yet. Try the task again. + summary: + success: You just created your first certificate! cert-manager has issued it and stored it in a Secret. + failed: Try the steps again. + - title: View the certificate + description: |- + ### To inspect the certificate + + Let's look at the Secret that contains the certificate. + + 1. Make sure you're in the [Workloads]{{highlight qs-nav-workloads}} section, click **Secrets**. + 2. Click on the **example-tls** Secret. + 3. You should see the certificate data with keys: + - ` + "`" + `tls.crt` + "`" + ` - The certificate. + - ` + "`" + `tls.key` + "`" + ` - The private key. + - ` + "`" + `ca.crt` + "`" + ` - The CA certificate. + review: + instructions: |- + #### Verify you can see the certificate data: + Is the Secret ` + "`" + `example-tls` + "`" + ` present with ` + "`" + `tls.crt` + "`" + ` and ` + "`" + `tls.key` + "`" + `? + failedTaskHelp: This task isn't verified yet. Try the task again. + summary: + success: Great! Your certificate is ready to use. + failed: Try the steps again. + - title: Use the certificate + description: |- + ### How to use certificates + + Now you can use this certificate in your applications. Here's a simple example for an OpenShift Route: + + ` + "`" + `` + "`" + `` + "`" + `yaml + apiVersion: route.openshift.io/v1 + kind: Route + metadata: + name: my-app + spec: + to: + kind: Service + name: my-service + tls: + termination: edge + externalCertificate: + name: example-tls + ` + "`" + `` + "`" + `` + "`" + ` + + Or in an Ingress: + + ` + "`" + `` + "`" + `` + "`" + `yaml + apiVersion: networking.k8s.io/v1 + kind: Ingress + metadata: + name: my-app + spec: + tls: + - secretName: example-tls + rules: + - host: example.com + ` + "`" + `` + "`" + `` + "`" + ` + + **Note**: cert-manager will automatically renew certificates before they expire! + review: + instructions: |- + #### Do you understand how to use certificates? + Certificates can be referenced in Routes and Ingress resources. + failedTaskHelp: Review the examples above. + summary: + success: You now know how to create and use certificates! + failed: Review the examples again. + conclusion: |- + Great job! You've successfully created your first Issuer and Certificate. + + ### Next Steps: + + - For production, use Let's Encrypt (ACME Issuer) instead of self-signed certificates + - Explore ClusterIssuer for cluster-wide certificate management + - Check out the [cert-manager documentation](https://docs.redhat.com/en/documentation/openshift_container_platform/latest/html/security_and_compliance/cert-manager-operator-for-red-hat-openshift) to learn more +`) + +func consoleCertManagerExampleQuickstartYamlBytes() ([]byte, error) { + return _consoleCertManagerExampleQuickstartYaml, nil +} + +func consoleCertManagerExampleQuickstartYaml() (*asset, error) { + bytes, err := consoleCertManagerExampleQuickstartYamlBytes() + if err != nil { + return nil, err + } + + info := bindataFileInfo{name: "console/cert-manager-example-quickstart.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} + a := &asset{bytes: bytes, info: info} + return a, nil +} + +var _consoleCertManagerIssuerSampleYaml = []byte(`apiVersion: console.openshift.io/v1 +kind: ConsoleYAMLSample +metadata: + name: cert-manager-issuer-sample +spec: + targetResource: + apiVersion: cert-manager.io/v1 + kind: Issuer + title: Example Self-Signed Issuer + description: A simple self-signed Issuer for development and testing + yaml: |- + apiVersion: cert-manager.io/v1 + kind: Issuer + metadata: + name: selfsigned-issuer + namespace: default + spec: + selfSigned: {} + +`) + +func consoleCertManagerIssuerSampleYamlBytes() ([]byte, error) { + return _consoleCertManagerIssuerSampleYaml, nil +} + +func consoleCertManagerIssuerSampleYaml() (*asset, error) { + bytes, err := consoleCertManagerIssuerSampleYamlBytes() + if err != nil { + return nil, err + } + + info := bindataFileInfo{name: "console/cert-manager-issuer-sample.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} + a := &asset{bytes: bytes, info: info} + return a, nil +} + var _istioCsrCertManagerIstioCsrClusterroleYaml = []byte(`kind: ClusterRole apiVersion: rbac.authorization.k8s.io/v1 metadata: @@ -3772,6 +4108,10 @@ var _bindata = map[string]func() (*asset, error){ "cert-manager-deployment/webhook/cert-manager-webhook-subjectaccessreviews-crb.yaml": certManagerDeploymentWebhookCertManagerWebhookSubjectaccessreviewsCrbYaml, "cert-manager-deployment/webhook/cert-manager-webhook-svc.yaml": certManagerDeploymentWebhookCertManagerWebhookSvcYaml, "cert-manager-deployment/webhook/cert-manager-webhook-validatingwebhookconfiguration.yaml": certManagerDeploymentWebhookCertManagerWebhookValidatingwebhookconfigurationYaml, + "console/cert-manager-acme-issuer-sample.yaml": consoleCertManagerAcmeIssuerSampleYaml, + "console/cert-manager-certificate-sample.yaml": consoleCertManagerCertificateSampleYaml, + "console/cert-manager-example-quickstart.yaml": consoleCertManagerExampleQuickstartYaml, + "console/cert-manager-issuer-sample.yaml": consoleCertManagerIssuerSampleYaml, "istio-csr/cert-manager-istio-csr-clusterrole.yaml": istioCsrCertManagerIstioCsrClusterroleYaml, "istio-csr/cert-manager-istio-csr-clusterrolebinding.yaml": istioCsrCertManagerIstioCsrClusterrolebindingYaml, "istio-csr/cert-manager-istio-csr-deployment.yaml": istioCsrCertManagerIstioCsrDeploymentYaml, @@ -3903,6 +4243,12 @@ var _bintree = &bintree{nil, map[string]*bintree{ "cert-manager-webhook-validatingwebhookconfiguration.yaml": {certManagerDeploymentWebhookCertManagerWebhookValidatingwebhookconfigurationYaml, map[string]*bintree{}}, }}, }}, + "console": {nil, map[string]*bintree{ + "cert-manager-acme-issuer-sample.yaml": {consoleCertManagerAcmeIssuerSampleYaml, map[string]*bintree{}}, + "cert-manager-certificate-sample.yaml": {consoleCertManagerCertificateSampleYaml, map[string]*bintree{}}, + "cert-manager-example-quickstart.yaml": {consoleCertManagerExampleQuickstartYaml, map[string]*bintree{}}, + "cert-manager-issuer-sample.yaml": {consoleCertManagerIssuerSampleYaml, map[string]*bintree{}}, + }}, "istio-csr": {nil, map[string]*bintree{ "cert-manager-istio-csr-clusterrole.yaml": {istioCsrCertManagerIstioCsrClusterroleYaml, map[string]*bintree{}}, "cert-manager-istio-csr-clusterrolebinding.yaml": {istioCsrCertManagerIstioCsrClusterrolebindingYaml, map[string]*bintree{}}, diff --git a/pkg/operator/starter.go b/pkg/operator/starter.go index 188f73d35..6dd3259a0 100644 --- a/pkg/operator/starter.go +++ b/pkg/operator/starter.go @@ -13,6 +13,7 @@ import ( configv1 "github.com/openshift/api/config/v1" configv1client "github.com/openshift/client-go/config/clientset/versioned" configinformers "github.com/openshift/client-go/config/informers/externalversions" + consoleclient "github.com/openshift/client-go/console/clientset/versioned" "github.com/openshift/library-go/pkg/controller/controllercmd" "github.com/openshift/library-go/pkg/operator/resource/resourceapply" "github.com/openshift/library-go/pkg/operator/status" @@ -87,6 +88,11 @@ func RunOperator(ctx context.Context, cc *controllercmd.ControllerContext) error return err } + consoleClient, err := consoleclient.NewForConfig(cc.KubeConfig) + if err != nil { + return err + } + infraGVR := configv1.GroupVersion.WithResource("infrastructures") optInfraInformer, err := utils.InitInformerIfAvailable( utils.NewResourceDiscoverer(infraGVR, configClient.Discovery()), @@ -106,6 +112,8 @@ func RunOperator(ctx context.Context, cc *controllercmd.ControllerContext) error operatorClient, certManagerInformers, resourceapply.NewKubeClientHolder(kubeClient).WithAPIExtensionsClient(apiExtensionsClient), + configClient, + consoleClient, cc.EventRecorder, status.VersionForOperandFromEnv(), versionRecorder, diff --git a/test/e2e/console_resources_test.go b/test/e2e/console_resources_test.go new file mode 100644 index 000000000..06a48b4de --- /dev/null +++ b/test/e2e/console_resources_test.go @@ -0,0 +1,128 @@ +//go:build e2e +// +build e2e + +package e2e + +import ( + "context" + "fmt" + "slices" + + . "github.com/onsi/ginkgo/v2" + . "github.com/onsi/gomega" + + configapiv1 "github.com/openshift/api/config/v1" + "github.com/openshift/library-go/pkg/operator/resource/resourceread" + + apierrors "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/util/wait" + + "github.com/openshift/cert-manager-operator/pkg/controller/certmanager" + "github.com/openshift/cert-manager-operator/pkg/operator/assets" +) + +var consoleExpectedAssets = []struct { + file string + name string + gvr schema.GroupVersionResource +}{ + {file: "console/cert-manager-acme-issuer-sample.yaml", name: "cert-manager-acme-issuer-sample", gvr: certmanager.ConsoleYAMLSampleGVR}, + {file: "console/cert-manager-certificate-sample.yaml", name: "cert-manager-certificate-sample", gvr: certmanager.ConsoleYAMLSampleGVR}, + {file: "console/cert-manager-issuer-sample.yaml", name: "cert-manager-issuer-sample", gvr: certmanager.ConsoleYAMLSampleGVR}, + {file: "console/cert-manager-example-quickstart.yaml", name: "cert-manager-example", gvr: certmanager.ConsoleQuickStartGVR}, +} + +func hasConsoleCapability(ctx context.Context) (bool, error) { + version, err := configClient.ClusterVersions().Get(ctx, "version", metav1.GetOptions{}) + if apierrors.IsNotFound(err) { + return false, nil + } + if err != nil { + return false, fmt.Errorf("failed to get ClusterVersion: %w", err) + } + + return slices.Contains( + version.Status.Capabilities.EnabledCapabilities, + configapiv1.ClusterVersionCapabilityConsole, + ), nil +} + +var _ = Describe("Console Resources", Label("Platform:Generic"), Ordered, func() { + var ( + ctx context.Context + consoleEnabled bool + ) + + BeforeAll(func() { + ctx = context.Background() + + By("detecting Console capability on the cluster") + enabled, err := hasConsoleCapability(ctx) + Expect(err).NotTo(HaveOccurred(), "failed to check Console capability") + consoleEnabled = enabled + + if consoleEnabled { + fmt.Fprintf(GinkgoWriter, "Console capability is ENABLED on this cluster\n") + } else { + fmt.Fprintf(GinkgoWriter, "Console capability is DISABLED on this cluster\n") + } + }) + + BeforeEach(func() { + By("waiting for operator status to become available") + err := VerifyHealthyOperatorConditions(certmanageroperatorclient.OperatorV1alpha1()) + Expect(err).NotTo(HaveOccurred(), "operator is expected to be available") + }) + + Context("when Console capability is enabled", func() { + It("should create all console resources with correct content", func() { + if !consoleEnabled { + Skip("Console capability is not enabled on this cluster") + } + + for _, asset := range consoleExpectedAssets { + By(fmt.Sprintf("verifying %s exists", asset.name)) + + var live *unstructured.Unstructured + err := wait.PollUntilContextTimeout(ctx, fastPollInterval, lowTimeout, true, func(ctx context.Context) (bool, error) { + obj, getErr := loader.DynamicClient.Resource(asset.gvr).Get(ctx, asset.name, metav1.GetOptions{}) + if getErr != nil { + if apierrors.IsNotFound(getErr) { + return false, nil + } + return false, getErr + } + live = obj + return true, nil + }) + Expect(err).NotTo(HaveOccurred(), "timed out waiting for %s to be created", asset.name) + + By(fmt.Sprintf("validating content of %s", asset.name)) + data, err := assets.Asset(asset.file) + Expect(err).NotTo(HaveOccurred(), "failed to load bindata asset %s", asset.file) + expected := resourceread.ReadUnstructuredOrDie(data) + + Expect(live.Object["spec"]).To(Equal(expected.Object["spec"]), + "spec mismatch for %s", asset.name) + } + }) + }) + + Context("when Console capability is disabled", func() { + It("should not create any console resources", func() { + if consoleEnabled { + Skip("Console capability is enabled on this cluster") + } + + for _, asset := range consoleExpectedAssets { + By(fmt.Sprintf("verifying %s does not exist", asset.name)) + _, err := loader.DynamicClient.Resource(asset.gvr).Get(ctx, asset.name, metav1.GetOptions{}) + Expect(apierrors.IsNotFound(err)).To(BeTrue(), + "expected %s to not exist on consoleless cluster, but got: %v", asset.name, err) + } + }) + }) +}) diff --git a/test/go.mod b/test/go.mod index 77c538f77..d9dc68f9b 100644 --- a/test/go.mod +++ b/test/go.mod @@ -22,6 +22,7 @@ require ( github.com/openshift/api v0.0.0-20260513085653-694421e64aee github.com/openshift/cert-manager-operator v0.0.0-00010101000000-000000000000 github.com/openshift/client-go v0.0.0-20260330134249-7e1499aaacd7 + github.com/openshift/library-go v0.0.0-20260512161954-889c2cd3e381 github.com/stretchr/testify v1.11.1 github.com/tidwall/gjson v1.18.0 github.com/vmware-archive/yaml-patch v0.0.11 @@ -102,13 +103,14 @@ require ( github.com/nxadm/tail v1.4.11 // indirect github.com/onsi/ginkgo v1.16.5 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect - github.com/openshift/library-go v0.0.0-20260512161954-889c2cd3e381 // indirect + github.com/operator-framework/operator-lib v0.19.0 // indirect github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/prometheus/client_golang v1.23.2 // indirect github.com/prometheus/client_model v0.6.2 // indirect github.com/prometheus/common v0.67.5 // indirect github.com/prometheus/procfs v0.19.2 // indirect + github.com/robfig/cron v1.2.0 // indirect github.com/robfig/cron/v3 v3.0.1 // indirect github.com/spf13/pflag v1.0.10 // indirect github.com/tidwall/match v1.1.1 // indirect @@ -147,11 +149,13 @@ require ( k8s.io/component-helpers v0.35.2 // indirect k8s.io/controller-manager v0.35.2 // indirect k8s.io/klog/v2 v2.140.0 // indirect + k8s.io/kube-aggregator v0.35.2 // indirect k8s.io/kube-openapi v0.0.0-20260317180543-43fb72c5454a // indirect k8s.io/kubelet v0.35.2 // indirect k8s.io/kubernetes v1.35.2 // indirect sigs.k8s.io/gateway-api v1.5.0 // indirect sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730 // indirect + sigs.k8s.io/kube-storage-version-migrator v0.0.6-0.20230721195810-5c8923c5ff96 // indirect sigs.k8s.io/randfill v1.0.0 // indirect sigs.k8s.io/structured-merge-diff/v6 v6.3.2 // indirect ) diff --git a/test/go.sum b/test/go.sum index 393df543e..9731197f0 100644 --- a/test/go.sum +++ b/test/go.sum @@ -237,6 +237,8 @@ github.com/openshift/jetstack-cert-manager v1.20.3 h1:WAOKjcWJxXLZ2VBXdDLXuf2RB6 github.com/openshift/jetstack-cert-manager v1.20.3/go.mod h1:Aqf5P0xRh9aey1p10m2c3UAk/Vb/FBPyH3WQxJRm+7Y= github.com/openshift/library-go v0.0.0-20260512161954-889c2cd3e381 h1:DuRbvQFYd/2HzMCL+s5Z1kCXh+mdL7Q9UZG99/Sa/ys= github.com/openshift/library-go v0.0.0-20260512161954-889c2cd3e381/go.mod h1:3bi4pLpYRdVd1aEhsHfRTJkwxwPLfRZ+ZePn3RmJd2k= +github.com/operator-framework/operator-lib v0.19.0 h1:az6ogYj21rtU0SF9uYctRLyKp2dtlqTsmpfehFy6Ce8= +github.com/operator-framework/operator-lib v0.19.0/go.mod h1:KxycAjFnHt0DBtHmH3Jm7yHcY5sdrshPKTqM/HKAQ08= github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c h1:+mdjkGKdHQG3305AYmdv1U2eRNDiU2ErMBj1gwrq8eQ= github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c/go.mod h1:7rwL4CYBLnjLxUqIJNnCWiEdr3bn6IUYi15bNlnbCCU= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= @@ -244,6 +246,8 @@ github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.74.0 h1:AHzMWDxNiAVscJL6+4wkvFRTpMnJqiaZFEKA/osaBXE= +github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.74.0/go.mod h1:wAR5JopumPtAZnu0Cjv2PSqV4p4QB09LMhc6fZZTXuA= github.com/prometheus/client_golang v1.23.2 h1:Je96obch5RDVy3FDMndoUsjAhG5Edi49h0RJWRi/o0o= github.com/prometheus/client_golang v1.23.2/go.mod h1:Tb1a6LWHB3/SPIzCoaDXI4I8UHKeFTEQ1YCr+0Gyqmg= github.com/prometheus/client_model v0.6.2 h1:oBsgwpGs7iVziMvrGhE53c/GrLUsZdHnqNwqPLxwZyk= @@ -252,6 +256,8 @@ github.com/prometheus/common v0.67.5 h1:pIgK94WWlQt1WLwAC5j2ynLaBRDiinoAb86HZHTU github.com/prometheus/common v0.67.5/go.mod h1:SjE/0MzDEEAyrdr5Gqc6G+sXI67maCxzaT3A2+HqjUw= github.com/prometheus/procfs v0.19.2 h1:zUMhqEW66Ex7OXIiDkll3tl9a1ZdilUOd/F6ZXw4Vws= github.com/prometheus/procfs v0.19.2/go.mod h1:M0aotyiemPhBCM0z5w87kL22CxfcH05ZpYlu+b4J7mw= +github.com/robfig/cron v1.2.0 h1:ZjScXvvxeQ63Dbyxy76Fj3AT3Ut0aKsyd2/tl3DTMuQ= +github.com/robfig/cron v1.2.0/go.mod h1:JGuDeoQd7Z6yL4zQhZ3OPEVHB7fL6Ka6skscFHfmt2k= github.com/robfig/cron/v3 v3.0.1 h1:WdRxkvbJztn8LMz/QEvLN5sBU+xKpSqwwUO1Pjr4qDs= github.com/robfig/cron/v3 v3.0.1/go.mod h1:eQICP3HwyT7UooqI/z+Ov+PtYAWygg1TEWWzGIFLtro= github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ= @@ -412,6 +418,8 @@ k8s.io/controller-manager v0.35.2 h1:EpLIwm4bBgoFwXiVULgNxtpUF9cbXUkcGkZ6vUlurYQ k8s.io/controller-manager v0.35.2/go.mod h1:CknUpFd1A0S9h+J9eQZXvZt05ssXMnsYCCLRghm/gp4= k8s.io/klog/v2 v2.140.0 h1:Tf+J3AH7xnUzZyVVXhTgGhEKnFqye14aadWv7bzXdzc= k8s.io/klog/v2 v2.140.0/go.mod h1:o+/RWfJ6PwpnFn7OyAG3QnO47BFsymfEfrz6XyYSSp0= +k8s.io/kube-aggregator v0.35.2 h1:bnF7E238wUOVaPpTyKrqGCAEXOAJ6HRTARvJTZ0UIC0= +k8s.io/kube-aggregator v0.35.2/go.mod h1:7Xl9zFJFsFIrPnwBfu7hve+G5QgLsDZRIedc8gA1mq4= k8s.io/kube-openapi v0.0.0-20260317180543-43fb72c5454a h1:xCeOEAOoGYl2jnJoHkC3hkbPJgdATINPMAxaynU2Ovg= k8s.io/kube-openapi v0.0.0-20260317180543-43fb72c5454a/go.mod h1:uGBT7iTA6c6MvqUvSXIaYZo9ukscABYi2btjhvgKGZ0= k8s.io/kubelet v0.35.2 h1:qF9jOe1j6vT4bVQZ6nnTTA5uu5NCnyR10o9IkW8Z0JQ= @@ -426,6 +434,8 @@ sigs.k8s.io/gateway-api v1.5.0 h1:duoo14Ky/fJXpjpmyMISE2RTBGnfCg8zICfTYLTnBJA= sigs.k8s.io/gateway-api v1.5.0/go.mod h1:GvCETiaMAlLym5CovLxGjS0NysqFk3+Yuq3/rh6QL2o= sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730 h1:IpInykpT6ceI+QxKBbEflcR5EXP7sU1kvOlxwZh5txg= sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730/go.mod h1:mdzfpAEoE6DHQEN0uh9ZbOCuHbLK5wOm7dK4ctXE9Tg= +sigs.k8s.io/kube-storage-version-migrator v0.0.6-0.20230721195810-5c8923c5ff96 h1:PFWFSkpArPNJxFX4ZKWAk9NSeRoZaXschn+ULa4xVek= +sigs.k8s.io/kube-storage-version-migrator v0.0.6-0.20230721195810-5c8923c5ff96/go.mod h1:EOBQyBowOUsd7U4CJnMHNE0ri+zCXyouGdLwC/jZU+I= sigs.k8s.io/randfill v1.0.0 h1:JfjMILfT8A6RbawdsK2JXGBR5AQVfd+9TbzrlneTyrU= sigs.k8s.io/randfill v1.0.0/go.mod h1:XeLlZ/jmk4i1HRopwe7/aU3H5n1zNUcX6TM94b3QxOY= sigs.k8s.io/structured-merge-diff/v6 v6.3.2 h1:kwVWMx5yS1CrnFWA/2QHyRVJ8jM6dBA80uLmm0wJkk8= diff --git a/vendor/github.com/openshift/client-go/console/applyconfigurations/console/v1/applicationmenuspec.go b/vendor/github.com/openshift/client-go/console/applyconfigurations/console/v1/applicationmenuspec.go new file mode 100644 index 000000000..8b85286f7 --- /dev/null +++ b/vendor/github.com/openshift/client-go/console/applyconfigurations/console/v1/applicationmenuspec.go @@ -0,0 +1,39 @@ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1 + +// ApplicationMenuSpecApplyConfiguration represents a declarative configuration of the ApplicationMenuSpec type for use +// with apply. +// +// ApplicationMenuSpec is the specification of the desired section and icon used for the link in the application menu. +type ApplicationMenuSpecApplyConfiguration struct { + // section is the section of the application menu in which the link should appear. + // This can be any text that will appear as a subheading in the application menu dropdown. + // A new section will be created if the text does not match text of an existing section. + Section *string `json:"section,omitempty"` + // imageURL is the URL for the icon used in front of the link in the application menu. + // The URL must be an HTTPS URL or a Data URI. The image should be square and will be shown at 24x24 pixels. + ImageURL *string `json:"imageURL,omitempty"` +} + +// ApplicationMenuSpecApplyConfiguration constructs a declarative configuration of the ApplicationMenuSpec type for use with +// apply. +func ApplicationMenuSpec() *ApplicationMenuSpecApplyConfiguration { + return &ApplicationMenuSpecApplyConfiguration{} +} + +// WithSection sets the Section field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Section field is set to the value of the last call. +func (b *ApplicationMenuSpecApplyConfiguration) WithSection(value string) *ApplicationMenuSpecApplyConfiguration { + b.Section = &value + return b +} + +// WithImageURL sets the ImageURL field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ImageURL field is set to the value of the last call. +func (b *ApplicationMenuSpecApplyConfiguration) WithImageURL(value string) *ApplicationMenuSpecApplyConfiguration { + b.ImageURL = &value + return b +} diff --git a/vendor/github.com/openshift/client-go/console/applyconfigurations/console/v1/clidownloadlink.go b/vendor/github.com/openshift/client-go/console/applyconfigurations/console/v1/clidownloadlink.go new file mode 100644 index 000000000..485a8fa95 --- /dev/null +++ b/vendor/github.com/openshift/client-go/console/applyconfigurations/console/v1/clidownloadlink.go @@ -0,0 +1,34 @@ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1 + +// CLIDownloadLinkApplyConfiguration represents a declarative configuration of the CLIDownloadLink type for use +// with apply. +type CLIDownloadLinkApplyConfiguration struct { + // text is the display text for the link + Text *string `json:"text,omitempty"` + // href is the absolute secure URL for the link (must use https) + Href *string `json:"href,omitempty"` +} + +// CLIDownloadLinkApplyConfiguration constructs a declarative configuration of the CLIDownloadLink type for use with +// apply. +func CLIDownloadLink() *CLIDownloadLinkApplyConfiguration { + return &CLIDownloadLinkApplyConfiguration{} +} + +// WithText sets the Text field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Text field is set to the value of the last call. +func (b *CLIDownloadLinkApplyConfiguration) WithText(value string) *CLIDownloadLinkApplyConfiguration { + b.Text = &value + return b +} + +// WithHref sets the Href field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Href field is set to the value of the last call. +func (b *CLIDownloadLinkApplyConfiguration) WithHref(value string) *CLIDownloadLinkApplyConfiguration { + b.Href = &value + return b +} diff --git a/vendor/github.com/openshift/client-go/console/applyconfigurations/console/v1/consoleclidownload.go b/vendor/github.com/openshift/client-go/console/applyconfigurations/console/v1/consoleclidownload.go new file mode 100644 index 000000000..ca44eed7b --- /dev/null +++ b/vendor/github.com/openshift/client-go/console/applyconfigurations/console/v1/consoleclidownload.go @@ -0,0 +1,260 @@ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1 + +import ( + consolev1 "github.com/openshift/api/console/v1" + internal "github.com/openshift/client-go/console/applyconfigurations/internal" + apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + managedfields "k8s.io/apimachinery/pkg/util/managedfields" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" +) + +// ConsoleCLIDownloadApplyConfiguration represents a declarative configuration of the ConsoleCLIDownload type for use +// with apply. +// +// ConsoleCLIDownload is an extension for configuring openshift web console command line interface (CLI) downloads. +// +// Compatibility level 2: Stable within a major release for a minimum of 9 months or 3 minor releases (whichever is longer). +type ConsoleCLIDownloadApplyConfiguration struct { + metav1.TypeMetaApplyConfiguration `json:",inline"` + // metadata is the standard object's metadata. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Spec *ConsoleCLIDownloadSpecApplyConfiguration `json:"spec,omitempty"` +} + +// ConsoleCLIDownload constructs a declarative configuration of the ConsoleCLIDownload type for use with +// apply. +func ConsoleCLIDownload(name string) *ConsoleCLIDownloadApplyConfiguration { + b := &ConsoleCLIDownloadApplyConfiguration{} + b.WithName(name) + b.WithKind("ConsoleCLIDownload") + b.WithAPIVersion("console.openshift.io/v1") + return b +} + +// ExtractConsoleCLIDownloadFrom extracts the applied configuration owned by fieldManager from +// consoleCLIDownload for the specified subresource. Pass an empty string for subresource to extract +// the main resource. Common subresources include "status", "scale", etc. +// consoleCLIDownload must be a unmodified ConsoleCLIDownload API object that was retrieved from the Kubernetes API. +// ExtractConsoleCLIDownloadFrom provides a way to perform a extract/modify-in-place/apply workflow. +// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously +// applied if another fieldManager has updated or force applied any of the previously applied fields. +func ExtractConsoleCLIDownloadFrom(consoleCLIDownload *consolev1.ConsoleCLIDownload, fieldManager string, subresource string) (*ConsoleCLIDownloadApplyConfiguration, error) { + b := &ConsoleCLIDownloadApplyConfiguration{} + err := managedfields.ExtractInto(consoleCLIDownload, internal.Parser().Type("com.github.openshift.api.console.v1.ConsoleCLIDownload"), fieldManager, b, subresource) + if err != nil { + return nil, err + } + b.WithName(consoleCLIDownload.Name) + + b.WithKind("ConsoleCLIDownload") + b.WithAPIVersion("console.openshift.io/v1") + return b, nil +} + +// ExtractConsoleCLIDownload extracts the applied configuration owned by fieldManager from +// consoleCLIDownload. If no managedFields are found in consoleCLIDownload for fieldManager, a +// ConsoleCLIDownloadApplyConfiguration is returned with only the Name, Namespace (if applicable), +// APIVersion and Kind populated. It is possible that no managed fields were found for because other +// field managers have taken ownership of all the fields previously owned by fieldManager, or because +// the fieldManager never owned fields any fields. +// consoleCLIDownload must be a unmodified ConsoleCLIDownload API object that was retrieved from the Kubernetes API. +// ExtractConsoleCLIDownload provides a way to perform a extract/modify-in-place/apply workflow. +// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously +// applied if another fieldManager has updated or force applied any of the previously applied fields. +func ExtractConsoleCLIDownload(consoleCLIDownload *consolev1.ConsoleCLIDownload, fieldManager string) (*ConsoleCLIDownloadApplyConfiguration, error) { + return ExtractConsoleCLIDownloadFrom(consoleCLIDownload, fieldManager, "") +} + +func (b ConsoleCLIDownloadApplyConfiguration) IsApplyConfiguration() {} + +// WithKind sets the Kind field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Kind field is set to the value of the last call. +func (b *ConsoleCLIDownloadApplyConfiguration) WithKind(value string) *ConsoleCLIDownloadApplyConfiguration { + b.TypeMetaApplyConfiguration.Kind = &value + return b +} + +// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the APIVersion field is set to the value of the last call. +func (b *ConsoleCLIDownloadApplyConfiguration) WithAPIVersion(value string) *ConsoleCLIDownloadApplyConfiguration { + b.TypeMetaApplyConfiguration.APIVersion = &value + return b +} + +// WithName sets the Name field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Name field is set to the value of the last call. +func (b *ConsoleCLIDownloadApplyConfiguration) WithName(value string) *ConsoleCLIDownloadApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.Name = &value + return b +} + +// WithGenerateName sets the GenerateName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the GenerateName field is set to the value of the last call. +func (b *ConsoleCLIDownloadApplyConfiguration) WithGenerateName(value string) *ConsoleCLIDownloadApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.GenerateName = &value + return b +} + +// WithNamespace sets the Namespace field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Namespace field is set to the value of the last call. +func (b *ConsoleCLIDownloadApplyConfiguration) WithNamespace(value string) *ConsoleCLIDownloadApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.Namespace = &value + return b +} + +// WithUID sets the UID field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the UID field is set to the value of the last call. +func (b *ConsoleCLIDownloadApplyConfiguration) WithUID(value types.UID) *ConsoleCLIDownloadApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.UID = &value + return b +} + +// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ResourceVersion field is set to the value of the last call. +func (b *ConsoleCLIDownloadApplyConfiguration) WithResourceVersion(value string) *ConsoleCLIDownloadApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.ResourceVersion = &value + return b +} + +// WithGeneration sets the Generation field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Generation field is set to the value of the last call. +func (b *ConsoleCLIDownloadApplyConfiguration) WithGeneration(value int64) *ConsoleCLIDownloadApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.Generation = &value + return b +} + +// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the CreationTimestamp field is set to the value of the last call. +func (b *ConsoleCLIDownloadApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *ConsoleCLIDownloadApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value + return b +} + +// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DeletionTimestamp field is set to the value of the last call. +func (b *ConsoleCLIDownloadApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *ConsoleCLIDownloadApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value + return b +} + +// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. +func (b *ConsoleCLIDownloadApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *ConsoleCLIDownloadApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value + return b +} + +// WithLabels puts the entries into the Labels field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Labels field, +// overwriting an existing map entries in Labels field with the same key. +func (b *ConsoleCLIDownloadApplyConfiguration) WithLabels(entries map[string]string) *ConsoleCLIDownloadApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.ObjectMetaApplyConfiguration.Labels[k] = v + } + return b +} + +// WithAnnotations puts the entries into the Annotations field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Annotations field, +// overwriting an existing map entries in Annotations field with the same key. +func (b *ConsoleCLIDownloadApplyConfiguration) WithAnnotations(entries map[string]string) *ConsoleCLIDownloadApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.ObjectMetaApplyConfiguration.Annotations[k] = v + } + return b +} + +// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the OwnerReferences field. +func (b *ConsoleCLIDownloadApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *ConsoleCLIDownloadApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + for i := range values { + if values[i] == nil { + panic("nil value passed to WithOwnerReferences") + } + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) + } + return b +} + +// WithFinalizers adds the given value to the Finalizers field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Finalizers field. +func (b *ConsoleCLIDownloadApplyConfiguration) WithFinalizers(values ...string) *ConsoleCLIDownloadApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + for i := range values { + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) + } + return b +} + +func (b *ConsoleCLIDownloadApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { + if b.ObjectMetaApplyConfiguration == nil { + b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} + } +} + +// WithSpec sets the Spec field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Spec field is set to the value of the last call. +func (b *ConsoleCLIDownloadApplyConfiguration) WithSpec(value *ConsoleCLIDownloadSpecApplyConfiguration) *ConsoleCLIDownloadApplyConfiguration { + b.Spec = value + return b +} + +// GetKind retrieves the value of the Kind field in the declarative configuration. +func (b *ConsoleCLIDownloadApplyConfiguration) GetKind() *string { + return b.TypeMetaApplyConfiguration.Kind +} + +// GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration. +func (b *ConsoleCLIDownloadApplyConfiguration) GetAPIVersion() *string { + return b.TypeMetaApplyConfiguration.APIVersion +} + +// GetName retrieves the value of the Name field in the declarative configuration. +func (b *ConsoleCLIDownloadApplyConfiguration) GetName() *string { + b.ensureObjectMetaApplyConfigurationExists() + return b.ObjectMetaApplyConfiguration.Name +} + +// GetNamespace retrieves the value of the Namespace field in the declarative configuration. +func (b *ConsoleCLIDownloadApplyConfiguration) GetNamespace() *string { + b.ensureObjectMetaApplyConfigurationExists() + return b.ObjectMetaApplyConfiguration.Namespace +} diff --git a/vendor/github.com/openshift/client-go/console/applyconfigurations/console/v1/consoleclidownloadspec.go b/vendor/github.com/openshift/client-go/console/applyconfigurations/console/v1/consoleclidownloadspec.go new file mode 100644 index 000000000..01c18e00c --- /dev/null +++ b/vendor/github.com/openshift/client-go/console/applyconfigurations/console/v1/consoleclidownloadspec.go @@ -0,0 +1,51 @@ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1 + +// ConsoleCLIDownloadSpecApplyConfiguration represents a declarative configuration of the ConsoleCLIDownloadSpec type for use +// with apply. +// +// ConsoleCLIDownloadSpec is the desired cli download configuration. +type ConsoleCLIDownloadSpecApplyConfiguration struct { + // displayName is the display name of the CLI download. + DisplayName *string `json:"displayName,omitempty"` + // description is the description of the CLI download (can include markdown). + Description *string `json:"description,omitempty"` + // links is a list of objects that provide CLI download link details. + Links []CLIDownloadLinkApplyConfiguration `json:"links,omitempty"` +} + +// ConsoleCLIDownloadSpecApplyConfiguration constructs a declarative configuration of the ConsoleCLIDownloadSpec type for use with +// apply. +func ConsoleCLIDownloadSpec() *ConsoleCLIDownloadSpecApplyConfiguration { + return &ConsoleCLIDownloadSpecApplyConfiguration{} +} + +// WithDisplayName sets the DisplayName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DisplayName field is set to the value of the last call. +func (b *ConsoleCLIDownloadSpecApplyConfiguration) WithDisplayName(value string) *ConsoleCLIDownloadSpecApplyConfiguration { + b.DisplayName = &value + return b +} + +// WithDescription sets the Description field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Description field is set to the value of the last call. +func (b *ConsoleCLIDownloadSpecApplyConfiguration) WithDescription(value string) *ConsoleCLIDownloadSpecApplyConfiguration { + b.Description = &value + return b +} + +// WithLinks adds the given value to the Links field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Links field. +func (b *ConsoleCLIDownloadSpecApplyConfiguration) WithLinks(values ...*CLIDownloadLinkApplyConfiguration) *ConsoleCLIDownloadSpecApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithLinks") + } + b.Links = append(b.Links, *values[i]) + } + return b +} diff --git a/vendor/github.com/openshift/client-go/console/applyconfigurations/console/v1/consoleexternalloglink.go b/vendor/github.com/openshift/client-go/console/applyconfigurations/console/v1/consoleexternalloglink.go new file mode 100644 index 000000000..42030f93c --- /dev/null +++ b/vendor/github.com/openshift/client-go/console/applyconfigurations/console/v1/consoleexternalloglink.go @@ -0,0 +1,260 @@ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1 + +import ( + consolev1 "github.com/openshift/api/console/v1" + internal "github.com/openshift/client-go/console/applyconfigurations/internal" + apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + managedfields "k8s.io/apimachinery/pkg/util/managedfields" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" +) + +// ConsoleExternalLogLinkApplyConfiguration represents a declarative configuration of the ConsoleExternalLogLink type for use +// with apply. +// +// ConsoleExternalLogLink is an extension for customizing OpenShift web console log links. +// +// Compatibility level 2: Stable within a major release for a minimum of 9 months or 3 minor releases (whichever is longer). +type ConsoleExternalLogLinkApplyConfiguration struct { + metav1.TypeMetaApplyConfiguration `json:",inline"` + // metadata is the standard object's metadata. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Spec *ConsoleExternalLogLinkSpecApplyConfiguration `json:"spec,omitempty"` +} + +// ConsoleExternalLogLink constructs a declarative configuration of the ConsoleExternalLogLink type for use with +// apply. +func ConsoleExternalLogLink(name string) *ConsoleExternalLogLinkApplyConfiguration { + b := &ConsoleExternalLogLinkApplyConfiguration{} + b.WithName(name) + b.WithKind("ConsoleExternalLogLink") + b.WithAPIVersion("console.openshift.io/v1") + return b +} + +// ExtractConsoleExternalLogLinkFrom extracts the applied configuration owned by fieldManager from +// consoleExternalLogLink for the specified subresource. Pass an empty string for subresource to extract +// the main resource. Common subresources include "status", "scale", etc. +// consoleExternalLogLink must be a unmodified ConsoleExternalLogLink API object that was retrieved from the Kubernetes API. +// ExtractConsoleExternalLogLinkFrom provides a way to perform a extract/modify-in-place/apply workflow. +// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously +// applied if another fieldManager has updated or force applied any of the previously applied fields. +func ExtractConsoleExternalLogLinkFrom(consoleExternalLogLink *consolev1.ConsoleExternalLogLink, fieldManager string, subresource string) (*ConsoleExternalLogLinkApplyConfiguration, error) { + b := &ConsoleExternalLogLinkApplyConfiguration{} + err := managedfields.ExtractInto(consoleExternalLogLink, internal.Parser().Type("com.github.openshift.api.console.v1.ConsoleExternalLogLink"), fieldManager, b, subresource) + if err != nil { + return nil, err + } + b.WithName(consoleExternalLogLink.Name) + + b.WithKind("ConsoleExternalLogLink") + b.WithAPIVersion("console.openshift.io/v1") + return b, nil +} + +// ExtractConsoleExternalLogLink extracts the applied configuration owned by fieldManager from +// consoleExternalLogLink. If no managedFields are found in consoleExternalLogLink for fieldManager, a +// ConsoleExternalLogLinkApplyConfiguration is returned with only the Name, Namespace (if applicable), +// APIVersion and Kind populated. It is possible that no managed fields were found for because other +// field managers have taken ownership of all the fields previously owned by fieldManager, or because +// the fieldManager never owned fields any fields. +// consoleExternalLogLink must be a unmodified ConsoleExternalLogLink API object that was retrieved from the Kubernetes API. +// ExtractConsoleExternalLogLink provides a way to perform a extract/modify-in-place/apply workflow. +// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously +// applied if another fieldManager has updated or force applied any of the previously applied fields. +func ExtractConsoleExternalLogLink(consoleExternalLogLink *consolev1.ConsoleExternalLogLink, fieldManager string) (*ConsoleExternalLogLinkApplyConfiguration, error) { + return ExtractConsoleExternalLogLinkFrom(consoleExternalLogLink, fieldManager, "") +} + +func (b ConsoleExternalLogLinkApplyConfiguration) IsApplyConfiguration() {} + +// WithKind sets the Kind field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Kind field is set to the value of the last call. +func (b *ConsoleExternalLogLinkApplyConfiguration) WithKind(value string) *ConsoleExternalLogLinkApplyConfiguration { + b.TypeMetaApplyConfiguration.Kind = &value + return b +} + +// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the APIVersion field is set to the value of the last call. +func (b *ConsoleExternalLogLinkApplyConfiguration) WithAPIVersion(value string) *ConsoleExternalLogLinkApplyConfiguration { + b.TypeMetaApplyConfiguration.APIVersion = &value + return b +} + +// WithName sets the Name field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Name field is set to the value of the last call. +func (b *ConsoleExternalLogLinkApplyConfiguration) WithName(value string) *ConsoleExternalLogLinkApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.Name = &value + return b +} + +// WithGenerateName sets the GenerateName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the GenerateName field is set to the value of the last call. +func (b *ConsoleExternalLogLinkApplyConfiguration) WithGenerateName(value string) *ConsoleExternalLogLinkApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.GenerateName = &value + return b +} + +// WithNamespace sets the Namespace field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Namespace field is set to the value of the last call. +func (b *ConsoleExternalLogLinkApplyConfiguration) WithNamespace(value string) *ConsoleExternalLogLinkApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.Namespace = &value + return b +} + +// WithUID sets the UID field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the UID field is set to the value of the last call. +func (b *ConsoleExternalLogLinkApplyConfiguration) WithUID(value types.UID) *ConsoleExternalLogLinkApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.UID = &value + return b +} + +// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ResourceVersion field is set to the value of the last call. +func (b *ConsoleExternalLogLinkApplyConfiguration) WithResourceVersion(value string) *ConsoleExternalLogLinkApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.ResourceVersion = &value + return b +} + +// WithGeneration sets the Generation field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Generation field is set to the value of the last call. +func (b *ConsoleExternalLogLinkApplyConfiguration) WithGeneration(value int64) *ConsoleExternalLogLinkApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.Generation = &value + return b +} + +// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the CreationTimestamp field is set to the value of the last call. +func (b *ConsoleExternalLogLinkApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *ConsoleExternalLogLinkApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value + return b +} + +// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DeletionTimestamp field is set to the value of the last call. +func (b *ConsoleExternalLogLinkApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *ConsoleExternalLogLinkApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value + return b +} + +// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. +func (b *ConsoleExternalLogLinkApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *ConsoleExternalLogLinkApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value + return b +} + +// WithLabels puts the entries into the Labels field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Labels field, +// overwriting an existing map entries in Labels field with the same key. +func (b *ConsoleExternalLogLinkApplyConfiguration) WithLabels(entries map[string]string) *ConsoleExternalLogLinkApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.ObjectMetaApplyConfiguration.Labels[k] = v + } + return b +} + +// WithAnnotations puts the entries into the Annotations field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Annotations field, +// overwriting an existing map entries in Annotations field with the same key. +func (b *ConsoleExternalLogLinkApplyConfiguration) WithAnnotations(entries map[string]string) *ConsoleExternalLogLinkApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.ObjectMetaApplyConfiguration.Annotations[k] = v + } + return b +} + +// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the OwnerReferences field. +func (b *ConsoleExternalLogLinkApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *ConsoleExternalLogLinkApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + for i := range values { + if values[i] == nil { + panic("nil value passed to WithOwnerReferences") + } + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) + } + return b +} + +// WithFinalizers adds the given value to the Finalizers field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Finalizers field. +func (b *ConsoleExternalLogLinkApplyConfiguration) WithFinalizers(values ...string) *ConsoleExternalLogLinkApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + for i := range values { + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) + } + return b +} + +func (b *ConsoleExternalLogLinkApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { + if b.ObjectMetaApplyConfiguration == nil { + b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} + } +} + +// WithSpec sets the Spec field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Spec field is set to the value of the last call. +func (b *ConsoleExternalLogLinkApplyConfiguration) WithSpec(value *ConsoleExternalLogLinkSpecApplyConfiguration) *ConsoleExternalLogLinkApplyConfiguration { + b.Spec = value + return b +} + +// GetKind retrieves the value of the Kind field in the declarative configuration. +func (b *ConsoleExternalLogLinkApplyConfiguration) GetKind() *string { + return b.TypeMetaApplyConfiguration.Kind +} + +// GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration. +func (b *ConsoleExternalLogLinkApplyConfiguration) GetAPIVersion() *string { + return b.TypeMetaApplyConfiguration.APIVersion +} + +// GetName retrieves the value of the Name field in the declarative configuration. +func (b *ConsoleExternalLogLinkApplyConfiguration) GetName() *string { + b.ensureObjectMetaApplyConfigurationExists() + return b.ObjectMetaApplyConfiguration.Name +} + +// GetNamespace retrieves the value of the Namespace field in the declarative configuration. +func (b *ConsoleExternalLogLinkApplyConfiguration) GetNamespace() *string { + b.ensureObjectMetaApplyConfigurationExists() + return b.ObjectMetaApplyConfiguration.Namespace +} diff --git a/vendor/github.com/openshift/client-go/console/applyconfigurations/console/v1/consoleexternalloglinkspec.go b/vendor/github.com/openshift/client-go/console/applyconfigurations/console/v1/consoleexternalloglinkspec.go new file mode 100644 index 000000000..c3536c0c6 --- /dev/null +++ b/vendor/github.com/openshift/client-go/console/applyconfigurations/console/v1/consoleexternalloglinkspec.go @@ -0,0 +1,64 @@ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1 + +// ConsoleExternalLogLinkSpecApplyConfiguration represents a declarative configuration of the ConsoleExternalLogLinkSpec type for use +// with apply. +// +// ConsoleExternalLogLinkSpec is the desired log link configuration. +// The log link will appear on the logs tab of the pod details page. +type ConsoleExternalLogLinkSpecApplyConfiguration struct { + // text is the display text for the link + Text *string `json:"text,omitempty"` + // hrefTemplate is an absolute secure URL (must use https) for the log link including + // variables to be replaced. Variables are specified in the URL with the format ${variableName}, + // for instance, ${containerName} and will be replaced with the corresponding values + // from the resource. Resource is a pod. + // Supported variables are: + // - ${resourceName} - name of the resource which containes the logs + // - ${resourceUID} - UID of the resource which contains the logs + // - e.g. `11111111-2222-3333-4444-555555555555` + // - ${containerName} - name of the resource's container that contains the logs + // - ${resourceNamespace} - namespace of the resource that contains the logs + // - ${resourceNamespaceUID} - namespace UID of the resource that contains the logs + // - ${podLabels} - JSON representation of labels matching the pod with the logs + // - e.g. `{"key1":"value1","key2":"value2"}` + // + // e.g., https://example.com/logs?resourceName=${resourceName}&containerName=${containerName}&resourceNamespace=${resourceNamespace}&podLabels=${podLabels} + HrefTemplate *string `json:"hrefTemplate,omitempty"` + // namespaceFilter is a regular expression used to restrict a log link to a + // matching set of namespaces (e.g., `^openshift-`). The string is converted + // into a regular expression using the JavaScript RegExp constructor. + // If not specified, links will be displayed for all the namespaces. + NamespaceFilter *string `json:"namespaceFilter,omitempty"` +} + +// ConsoleExternalLogLinkSpecApplyConfiguration constructs a declarative configuration of the ConsoleExternalLogLinkSpec type for use with +// apply. +func ConsoleExternalLogLinkSpec() *ConsoleExternalLogLinkSpecApplyConfiguration { + return &ConsoleExternalLogLinkSpecApplyConfiguration{} +} + +// WithText sets the Text field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Text field is set to the value of the last call. +func (b *ConsoleExternalLogLinkSpecApplyConfiguration) WithText(value string) *ConsoleExternalLogLinkSpecApplyConfiguration { + b.Text = &value + return b +} + +// WithHrefTemplate sets the HrefTemplate field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the HrefTemplate field is set to the value of the last call. +func (b *ConsoleExternalLogLinkSpecApplyConfiguration) WithHrefTemplate(value string) *ConsoleExternalLogLinkSpecApplyConfiguration { + b.HrefTemplate = &value + return b +} + +// WithNamespaceFilter sets the NamespaceFilter field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the NamespaceFilter field is set to the value of the last call. +func (b *ConsoleExternalLogLinkSpecApplyConfiguration) WithNamespaceFilter(value string) *ConsoleExternalLogLinkSpecApplyConfiguration { + b.NamespaceFilter = &value + return b +} diff --git a/vendor/github.com/openshift/client-go/console/applyconfigurations/console/v1/consolelink.go b/vendor/github.com/openshift/client-go/console/applyconfigurations/console/v1/consolelink.go new file mode 100644 index 000000000..30518e2c0 --- /dev/null +++ b/vendor/github.com/openshift/client-go/console/applyconfigurations/console/v1/consolelink.go @@ -0,0 +1,260 @@ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1 + +import ( + consolev1 "github.com/openshift/api/console/v1" + internal "github.com/openshift/client-go/console/applyconfigurations/internal" + apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + managedfields "k8s.io/apimachinery/pkg/util/managedfields" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" +) + +// ConsoleLinkApplyConfiguration represents a declarative configuration of the ConsoleLink type for use +// with apply. +// +// ConsoleLink is an extension for customizing OpenShift web console links. +// +// Compatibility level 2: Stable within a major release for a minimum of 9 months or 3 minor releases (whichever is longer). +type ConsoleLinkApplyConfiguration struct { + metav1.TypeMetaApplyConfiguration `json:",inline"` + // metadata is the standard object's metadata. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Spec *ConsoleLinkSpecApplyConfiguration `json:"spec,omitempty"` +} + +// ConsoleLink constructs a declarative configuration of the ConsoleLink type for use with +// apply. +func ConsoleLink(name string) *ConsoleLinkApplyConfiguration { + b := &ConsoleLinkApplyConfiguration{} + b.WithName(name) + b.WithKind("ConsoleLink") + b.WithAPIVersion("console.openshift.io/v1") + return b +} + +// ExtractConsoleLinkFrom extracts the applied configuration owned by fieldManager from +// consoleLink for the specified subresource. Pass an empty string for subresource to extract +// the main resource. Common subresources include "status", "scale", etc. +// consoleLink must be a unmodified ConsoleLink API object that was retrieved from the Kubernetes API. +// ExtractConsoleLinkFrom provides a way to perform a extract/modify-in-place/apply workflow. +// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously +// applied if another fieldManager has updated or force applied any of the previously applied fields. +func ExtractConsoleLinkFrom(consoleLink *consolev1.ConsoleLink, fieldManager string, subresource string) (*ConsoleLinkApplyConfiguration, error) { + b := &ConsoleLinkApplyConfiguration{} + err := managedfields.ExtractInto(consoleLink, internal.Parser().Type("com.github.openshift.api.console.v1.ConsoleLink"), fieldManager, b, subresource) + if err != nil { + return nil, err + } + b.WithName(consoleLink.Name) + + b.WithKind("ConsoleLink") + b.WithAPIVersion("console.openshift.io/v1") + return b, nil +} + +// ExtractConsoleLink extracts the applied configuration owned by fieldManager from +// consoleLink. If no managedFields are found in consoleLink for fieldManager, a +// ConsoleLinkApplyConfiguration is returned with only the Name, Namespace (if applicable), +// APIVersion and Kind populated. It is possible that no managed fields were found for because other +// field managers have taken ownership of all the fields previously owned by fieldManager, or because +// the fieldManager never owned fields any fields. +// consoleLink must be a unmodified ConsoleLink API object that was retrieved from the Kubernetes API. +// ExtractConsoleLink provides a way to perform a extract/modify-in-place/apply workflow. +// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously +// applied if another fieldManager has updated or force applied any of the previously applied fields. +func ExtractConsoleLink(consoleLink *consolev1.ConsoleLink, fieldManager string) (*ConsoleLinkApplyConfiguration, error) { + return ExtractConsoleLinkFrom(consoleLink, fieldManager, "") +} + +func (b ConsoleLinkApplyConfiguration) IsApplyConfiguration() {} + +// WithKind sets the Kind field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Kind field is set to the value of the last call. +func (b *ConsoleLinkApplyConfiguration) WithKind(value string) *ConsoleLinkApplyConfiguration { + b.TypeMetaApplyConfiguration.Kind = &value + return b +} + +// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the APIVersion field is set to the value of the last call. +func (b *ConsoleLinkApplyConfiguration) WithAPIVersion(value string) *ConsoleLinkApplyConfiguration { + b.TypeMetaApplyConfiguration.APIVersion = &value + return b +} + +// WithName sets the Name field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Name field is set to the value of the last call. +func (b *ConsoleLinkApplyConfiguration) WithName(value string) *ConsoleLinkApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.Name = &value + return b +} + +// WithGenerateName sets the GenerateName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the GenerateName field is set to the value of the last call. +func (b *ConsoleLinkApplyConfiguration) WithGenerateName(value string) *ConsoleLinkApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.GenerateName = &value + return b +} + +// WithNamespace sets the Namespace field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Namespace field is set to the value of the last call. +func (b *ConsoleLinkApplyConfiguration) WithNamespace(value string) *ConsoleLinkApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.Namespace = &value + return b +} + +// WithUID sets the UID field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the UID field is set to the value of the last call. +func (b *ConsoleLinkApplyConfiguration) WithUID(value types.UID) *ConsoleLinkApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.UID = &value + return b +} + +// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ResourceVersion field is set to the value of the last call. +func (b *ConsoleLinkApplyConfiguration) WithResourceVersion(value string) *ConsoleLinkApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.ResourceVersion = &value + return b +} + +// WithGeneration sets the Generation field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Generation field is set to the value of the last call. +func (b *ConsoleLinkApplyConfiguration) WithGeneration(value int64) *ConsoleLinkApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.Generation = &value + return b +} + +// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the CreationTimestamp field is set to the value of the last call. +func (b *ConsoleLinkApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *ConsoleLinkApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value + return b +} + +// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DeletionTimestamp field is set to the value of the last call. +func (b *ConsoleLinkApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *ConsoleLinkApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value + return b +} + +// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. +func (b *ConsoleLinkApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *ConsoleLinkApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value + return b +} + +// WithLabels puts the entries into the Labels field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Labels field, +// overwriting an existing map entries in Labels field with the same key. +func (b *ConsoleLinkApplyConfiguration) WithLabels(entries map[string]string) *ConsoleLinkApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.ObjectMetaApplyConfiguration.Labels[k] = v + } + return b +} + +// WithAnnotations puts the entries into the Annotations field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Annotations field, +// overwriting an existing map entries in Annotations field with the same key. +func (b *ConsoleLinkApplyConfiguration) WithAnnotations(entries map[string]string) *ConsoleLinkApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.ObjectMetaApplyConfiguration.Annotations[k] = v + } + return b +} + +// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the OwnerReferences field. +func (b *ConsoleLinkApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *ConsoleLinkApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + for i := range values { + if values[i] == nil { + panic("nil value passed to WithOwnerReferences") + } + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) + } + return b +} + +// WithFinalizers adds the given value to the Finalizers field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Finalizers field. +func (b *ConsoleLinkApplyConfiguration) WithFinalizers(values ...string) *ConsoleLinkApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + for i := range values { + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) + } + return b +} + +func (b *ConsoleLinkApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { + if b.ObjectMetaApplyConfiguration == nil { + b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} + } +} + +// WithSpec sets the Spec field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Spec field is set to the value of the last call. +func (b *ConsoleLinkApplyConfiguration) WithSpec(value *ConsoleLinkSpecApplyConfiguration) *ConsoleLinkApplyConfiguration { + b.Spec = value + return b +} + +// GetKind retrieves the value of the Kind field in the declarative configuration. +func (b *ConsoleLinkApplyConfiguration) GetKind() *string { + return b.TypeMetaApplyConfiguration.Kind +} + +// GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration. +func (b *ConsoleLinkApplyConfiguration) GetAPIVersion() *string { + return b.TypeMetaApplyConfiguration.APIVersion +} + +// GetName retrieves the value of the Name field in the declarative configuration. +func (b *ConsoleLinkApplyConfiguration) GetName() *string { + b.ensureObjectMetaApplyConfigurationExists() + return b.ObjectMetaApplyConfiguration.Name +} + +// GetNamespace retrieves the value of the Namespace field in the declarative configuration. +func (b *ConsoleLinkApplyConfiguration) GetNamespace() *string { + b.ensureObjectMetaApplyConfigurationExists() + return b.ObjectMetaApplyConfiguration.Namespace +} diff --git a/vendor/github.com/openshift/client-go/console/applyconfigurations/console/v1/consolelinkspec.go b/vendor/github.com/openshift/client-go/console/applyconfigurations/console/v1/consolelinkspec.go new file mode 100644 index 000000000..c99cc461b --- /dev/null +++ b/vendor/github.com/openshift/client-go/console/applyconfigurations/console/v1/consolelinkspec.go @@ -0,0 +1,70 @@ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1 + +import ( + consolev1 "github.com/openshift/api/console/v1" +) + +// ConsoleLinkSpecApplyConfiguration represents a declarative configuration of the ConsoleLinkSpec type for use +// with apply. +// +// ConsoleLinkSpec is the desired console link configuration. +type ConsoleLinkSpecApplyConfiguration struct { + LinkApplyConfiguration `json:",inline"` + // location determines which location in the console the link will be appended to (ApplicationMenu, HelpMenu, UserMenu, NamespaceDashboard). + Location *consolev1.ConsoleLinkLocation `json:"location,omitempty"` + // applicationMenu holds information about section and icon used for the link in the + // application menu, and it is applicable only when location is set to ApplicationMenu. + ApplicationMenu *ApplicationMenuSpecApplyConfiguration `json:"applicationMenu,omitempty"` + // namespaceDashboard holds information about namespaces in which the dashboard link should + // appear, and it is applicable only when location is set to NamespaceDashboard. + // If not specified, the link will appear in all namespaces. + NamespaceDashboard *NamespaceDashboardSpecApplyConfiguration `json:"namespaceDashboard,omitempty"` +} + +// ConsoleLinkSpecApplyConfiguration constructs a declarative configuration of the ConsoleLinkSpec type for use with +// apply. +func ConsoleLinkSpec() *ConsoleLinkSpecApplyConfiguration { + return &ConsoleLinkSpecApplyConfiguration{} +} + +// WithText sets the Text field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Text field is set to the value of the last call. +func (b *ConsoleLinkSpecApplyConfiguration) WithText(value string) *ConsoleLinkSpecApplyConfiguration { + b.LinkApplyConfiguration.Text = &value + return b +} + +// WithHref sets the Href field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Href field is set to the value of the last call. +func (b *ConsoleLinkSpecApplyConfiguration) WithHref(value string) *ConsoleLinkSpecApplyConfiguration { + b.LinkApplyConfiguration.Href = &value + return b +} + +// WithLocation sets the Location field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Location field is set to the value of the last call. +func (b *ConsoleLinkSpecApplyConfiguration) WithLocation(value consolev1.ConsoleLinkLocation) *ConsoleLinkSpecApplyConfiguration { + b.Location = &value + return b +} + +// WithApplicationMenu sets the ApplicationMenu field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ApplicationMenu field is set to the value of the last call. +func (b *ConsoleLinkSpecApplyConfiguration) WithApplicationMenu(value *ApplicationMenuSpecApplyConfiguration) *ConsoleLinkSpecApplyConfiguration { + b.ApplicationMenu = value + return b +} + +// WithNamespaceDashboard sets the NamespaceDashboard field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the NamespaceDashboard field is set to the value of the last call. +func (b *ConsoleLinkSpecApplyConfiguration) WithNamespaceDashboard(value *NamespaceDashboardSpecApplyConfiguration) *ConsoleLinkSpecApplyConfiguration { + b.NamespaceDashboard = value + return b +} diff --git a/vendor/github.com/openshift/client-go/console/applyconfigurations/console/v1/consolenotification.go b/vendor/github.com/openshift/client-go/console/applyconfigurations/console/v1/consolenotification.go new file mode 100644 index 000000000..0802b4d95 --- /dev/null +++ b/vendor/github.com/openshift/client-go/console/applyconfigurations/console/v1/consolenotification.go @@ -0,0 +1,260 @@ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1 + +import ( + consolev1 "github.com/openshift/api/console/v1" + internal "github.com/openshift/client-go/console/applyconfigurations/internal" + apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + managedfields "k8s.io/apimachinery/pkg/util/managedfields" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" +) + +// ConsoleNotificationApplyConfiguration represents a declarative configuration of the ConsoleNotification type for use +// with apply. +// +// ConsoleNotification is the extension for configuring openshift web console notifications. +// +// Compatibility level 2: Stable within a major release for a minimum of 9 months or 3 minor releases (whichever is longer). +type ConsoleNotificationApplyConfiguration struct { + metav1.TypeMetaApplyConfiguration `json:",inline"` + // metadata is the standard object's metadata. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Spec *ConsoleNotificationSpecApplyConfiguration `json:"spec,omitempty"` +} + +// ConsoleNotification constructs a declarative configuration of the ConsoleNotification type for use with +// apply. +func ConsoleNotification(name string) *ConsoleNotificationApplyConfiguration { + b := &ConsoleNotificationApplyConfiguration{} + b.WithName(name) + b.WithKind("ConsoleNotification") + b.WithAPIVersion("console.openshift.io/v1") + return b +} + +// ExtractConsoleNotificationFrom extracts the applied configuration owned by fieldManager from +// consoleNotification for the specified subresource. Pass an empty string for subresource to extract +// the main resource. Common subresources include "status", "scale", etc. +// consoleNotification must be a unmodified ConsoleNotification API object that was retrieved from the Kubernetes API. +// ExtractConsoleNotificationFrom provides a way to perform a extract/modify-in-place/apply workflow. +// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously +// applied if another fieldManager has updated or force applied any of the previously applied fields. +func ExtractConsoleNotificationFrom(consoleNotification *consolev1.ConsoleNotification, fieldManager string, subresource string) (*ConsoleNotificationApplyConfiguration, error) { + b := &ConsoleNotificationApplyConfiguration{} + err := managedfields.ExtractInto(consoleNotification, internal.Parser().Type("com.github.openshift.api.console.v1.ConsoleNotification"), fieldManager, b, subresource) + if err != nil { + return nil, err + } + b.WithName(consoleNotification.Name) + + b.WithKind("ConsoleNotification") + b.WithAPIVersion("console.openshift.io/v1") + return b, nil +} + +// ExtractConsoleNotification extracts the applied configuration owned by fieldManager from +// consoleNotification. If no managedFields are found in consoleNotification for fieldManager, a +// ConsoleNotificationApplyConfiguration is returned with only the Name, Namespace (if applicable), +// APIVersion and Kind populated. It is possible that no managed fields were found for because other +// field managers have taken ownership of all the fields previously owned by fieldManager, or because +// the fieldManager never owned fields any fields. +// consoleNotification must be a unmodified ConsoleNotification API object that was retrieved from the Kubernetes API. +// ExtractConsoleNotification provides a way to perform a extract/modify-in-place/apply workflow. +// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously +// applied if another fieldManager has updated or force applied any of the previously applied fields. +func ExtractConsoleNotification(consoleNotification *consolev1.ConsoleNotification, fieldManager string) (*ConsoleNotificationApplyConfiguration, error) { + return ExtractConsoleNotificationFrom(consoleNotification, fieldManager, "") +} + +func (b ConsoleNotificationApplyConfiguration) IsApplyConfiguration() {} + +// WithKind sets the Kind field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Kind field is set to the value of the last call. +func (b *ConsoleNotificationApplyConfiguration) WithKind(value string) *ConsoleNotificationApplyConfiguration { + b.TypeMetaApplyConfiguration.Kind = &value + return b +} + +// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the APIVersion field is set to the value of the last call. +func (b *ConsoleNotificationApplyConfiguration) WithAPIVersion(value string) *ConsoleNotificationApplyConfiguration { + b.TypeMetaApplyConfiguration.APIVersion = &value + return b +} + +// WithName sets the Name field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Name field is set to the value of the last call. +func (b *ConsoleNotificationApplyConfiguration) WithName(value string) *ConsoleNotificationApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.Name = &value + return b +} + +// WithGenerateName sets the GenerateName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the GenerateName field is set to the value of the last call. +func (b *ConsoleNotificationApplyConfiguration) WithGenerateName(value string) *ConsoleNotificationApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.GenerateName = &value + return b +} + +// WithNamespace sets the Namespace field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Namespace field is set to the value of the last call. +func (b *ConsoleNotificationApplyConfiguration) WithNamespace(value string) *ConsoleNotificationApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.Namespace = &value + return b +} + +// WithUID sets the UID field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the UID field is set to the value of the last call. +func (b *ConsoleNotificationApplyConfiguration) WithUID(value types.UID) *ConsoleNotificationApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.UID = &value + return b +} + +// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ResourceVersion field is set to the value of the last call. +func (b *ConsoleNotificationApplyConfiguration) WithResourceVersion(value string) *ConsoleNotificationApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.ResourceVersion = &value + return b +} + +// WithGeneration sets the Generation field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Generation field is set to the value of the last call. +func (b *ConsoleNotificationApplyConfiguration) WithGeneration(value int64) *ConsoleNotificationApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.Generation = &value + return b +} + +// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the CreationTimestamp field is set to the value of the last call. +func (b *ConsoleNotificationApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *ConsoleNotificationApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value + return b +} + +// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DeletionTimestamp field is set to the value of the last call. +func (b *ConsoleNotificationApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *ConsoleNotificationApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value + return b +} + +// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. +func (b *ConsoleNotificationApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *ConsoleNotificationApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value + return b +} + +// WithLabels puts the entries into the Labels field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Labels field, +// overwriting an existing map entries in Labels field with the same key. +func (b *ConsoleNotificationApplyConfiguration) WithLabels(entries map[string]string) *ConsoleNotificationApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.ObjectMetaApplyConfiguration.Labels[k] = v + } + return b +} + +// WithAnnotations puts the entries into the Annotations field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Annotations field, +// overwriting an existing map entries in Annotations field with the same key. +func (b *ConsoleNotificationApplyConfiguration) WithAnnotations(entries map[string]string) *ConsoleNotificationApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.ObjectMetaApplyConfiguration.Annotations[k] = v + } + return b +} + +// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the OwnerReferences field. +func (b *ConsoleNotificationApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *ConsoleNotificationApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + for i := range values { + if values[i] == nil { + panic("nil value passed to WithOwnerReferences") + } + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) + } + return b +} + +// WithFinalizers adds the given value to the Finalizers field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Finalizers field. +func (b *ConsoleNotificationApplyConfiguration) WithFinalizers(values ...string) *ConsoleNotificationApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + for i := range values { + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) + } + return b +} + +func (b *ConsoleNotificationApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { + if b.ObjectMetaApplyConfiguration == nil { + b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} + } +} + +// WithSpec sets the Spec field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Spec field is set to the value of the last call. +func (b *ConsoleNotificationApplyConfiguration) WithSpec(value *ConsoleNotificationSpecApplyConfiguration) *ConsoleNotificationApplyConfiguration { + b.Spec = value + return b +} + +// GetKind retrieves the value of the Kind field in the declarative configuration. +func (b *ConsoleNotificationApplyConfiguration) GetKind() *string { + return b.TypeMetaApplyConfiguration.Kind +} + +// GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration. +func (b *ConsoleNotificationApplyConfiguration) GetAPIVersion() *string { + return b.TypeMetaApplyConfiguration.APIVersion +} + +// GetName retrieves the value of the Name field in the declarative configuration. +func (b *ConsoleNotificationApplyConfiguration) GetName() *string { + b.ensureObjectMetaApplyConfigurationExists() + return b.ObjectMetaApplyConfiguration.Name +} + +// GetNamespace retrieves the value of the Namespace field in the declarative configuration. +func (b *ConsoleNotificationApplyConfiguration) GetNamespace() *string { + b.ensureObjectMetaApplyConfigurationExists() + return b.ObjectMetaApplyConfiguration.Namespace +} diff --git a/vendor/github.com/openshift/client-go/console/applyconfigurations/console/v1/consolenotificationspec.go b/vendor/github.com/openshift/client-go/console/applyconfigurations/console/v1/consolenotificationspec.go new file mode 100644 index 000000000..2877fb042 --- /dev/null +++ b/vendor/github.com/openshift/client-go/console/applyconfigurations/console/v1/consolenotificationspec.go @@ -0,0 +1,71 @@ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1 + +import ( + consolev1 "github.com/openshift/api/console/v1" +) + +// ConsoleNotificationSpecApplyConfiguration represents a declarative configuration of the ConsoleNotificationSpec type for use +// with apply. +// +// ConsoleNotificationSpec is the desired console notification configuration. +type ConsoleNotificationSpecApplyConfiguration struct { + // text is the visible text of the notification. + Text *string `json:"text,omitempty"` + // location is the location of the notification in the console. + // Valid values are: "BannerTop", "BannerBottom", "BannerTopBottom". + Location *consolev1.ConsoleNotificationLocation `json:"location,omitempty"` + // link is an object that holds notification link details. + Link *LinkApplyConfiguration `json:"link,omitempty"` + // color is the color of the text for the notification as CSS data type color. + Color *string `json:"color,omitempty"` + // backgroundColor is the color of the background for the notification as CSS data type color. + BackgroundColor *string `json:"backgroundColor,omitempty"` +} + +// ConsoleNotificationSpecApplyConfiguration constructs a declarative configuration of the ConsoleNotificationSpec type for use with +// apply. +func ConsoleNotificationSpec() *ConsoleNotificationSpecApplyConfiguration { + return &ConsoleNotificationSpecApplyConfiguration{} +} + +// WithText sets the Text field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Text field is set to the value of the last call. +func (b *ConsoleNotificationSpecApplyConfiguration) WithText(value string) *ConsoleNotificationSpecApplyConfiguration { + b.Text = &value + return b +} + +// WithLocation sets the Location field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Location field is set to the value of the last call. +func (b *ConsoleNotificationSpecApplyConfiguration) WithLocation(value consolev1.ConsoleNotificationLocation) *ConsoleNotificationSpecApplyConfiguration { + b.Location = &value + return b +} + +// WithLink sets the Link field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Link field is set to the value of the last call. +func (b *ConsoleNotificationSpecApplyConfiguration) WithLink(value *LinkApplyConfiguration) *ConsoleNotificationSpecApplyConfiguration { + b.Link = value + return b +} + +// WithColor sets the Color field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Color field is set to the value of the last call. +func (b *ConsoleNotificationSpecApplyConfiguration) WithColor(value string) *ConsoleNotificationSpecApplyConfiguration { + b.Color = &value + return b +} + +// WithBackgroundColor sets the BackgroundColor field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the BackgroundColor field is set to the value of the last call. +func (b *ConsoleNotificationSpecApplyConfiguration) WithBackgroundColor(value string) *ConsoleNotificationSpecApplyConfiguration { + b.BackgroundColor = &value + return b +} diff --git a/vendor/github.com/openshift/client-go/console/applyconfigurations/console/v1/consoleplugin.go b/vendor/github.com/openshift/client-go/console/applyconfigurations/console/v1/consoleplugin.go new file mode 100644 index 000000000..22be228de --- /dev/null +++ b/vendor/github.com/openshift/client-go/console/applyconfigurations/console/v1/consoleplugin.go @@ -0,0 +1,262 @@ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1 + +import ( + consolev1 "github.com/openshift/api/console/v1" + internal "github.com/openshift/client-go/console/applyconfigurations/internal" + apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + managedfields "k8s.io/apimachinery/pkg/util/managedfields" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" +) + +// ConsolePluginApplyConfiguration represents a declarative configuration of the ConsolePlugin type for use +// with apply. +// +// ConsolePlugin is an extension for customizing OpenShift web console by +// dynamically loading code from another service running on the cluster. +// +// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). +type ConsolePluginApplyConfiguration struct { + metav1.TypeMetaApplyConfiguration `json:",inline"` + // metadata is the standard object's metadata. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + // spec contains the desired configuration for the console plugin. + Spec *ConsolePluginSpecApplyConfiguration `json:"spec,omitempty"` +} + +// ConsolePlugin constructs a declarative configuration of the ConsolePlugin type for use with +// apply. +func ConsolePlugin(name string) *ConsolePluginApplyConfiguration { + b := &ConsolePluginApplyConfiguration{} + b.WithName(name) + b.WithKind("ConsolePlugin") + b.WithAPIVersion("console.openshift.io/v1") + return b +} + +// ExtractConsolePluginFrom extracts the applied configuration owned by fieldManager from +// consolePlugin for the specified subresource. Pass an empty string for subresource to extract +// the main resource. Common subresources include "status", "scale", etc. +// consolePlugin must be a unmodified ConsolePlugin API object that was retrieved from the Kubernetes API. +// ExtractConsolePluginFrom provides a way to perform a extract/modify-in-place/apply workflow. +// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously +// applied if another fieldManager has updated or force applied any of the previously applied fields. +func ExtractConsolePluginFrom(consolePlugin *consolev1.ConsolePlugin, fieldManager string, subresource string) (*ConsolePluginApplyConfiguration, error) { + b := &ConsolePluginApplyConfiguration{} + err := managedfields.ExtractInto(consolePlugin, internal.Parser().Type("com.github.openshift.api.console.v1.ConsolePlugin"), fieldManager, b, subresource) + if err != nil { + return nil, err + } + b.WithName(consolePlugin.Name) + + b.WithKind("ConsolePlugin") + b.WithAPIVersion("console.openshift.io/v1") + return b, nil +} + +// ExtractConsolePlugin extracts the applied configuration owned by fieldManager from +// consolePlugin. If no managedFields are found in consolePlugin for fieldManager, a +// ConsolePluginApplyConfiguration is returned with only the Name, Namespace (if applicable), +// APIVersion and Kind populated. It is possible that no managed fields were found for because other +// field managers have taken ownership of all the fields previously owned by fieldManager, or because +// the fieldManager never owned fields any fields. +// consolePlugin must be a unmodified ConsolePlugin API object that was retrieved from the Kubernetes API. +// ExtractConsolePlugin provides a way to perform a extract/modify-in-place/apply workflow. +// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously +// applied if another fieldManager has updated or force applied any of the previously applied fields. +func ExtractConsolePlugin(consolePlugin *consolev1.ConsolePlugin, fieldManager string) (*ConsolePluginApplyConfiguration, error) { + return ExtractConsolePluginFrom(consolePlugin, fieldManager, "") +} + +func (b ConsolePluginApplyConfiguration) IsApplyConfiguration() {} + +// WithKind sets the Kind field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Kind field is set to the value of the last call. +func (b *ConsolePluginApplyConfiguration) WithKind(value string) *ConsolePluginApplyConfiguration { + b.TypeMetaApplyConfiguration.Kind = &value + return b +} + +// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the APIVersion field is set to the value of the last call. +func (b *ConsolePluginApplyConfiguration) WithAPIVersion(value string) *ConsolePluginApplyConfiguration { + b.TypeMetaApplyConfiguration.APIVersion = &value + return b +} + +// WithName sets the Name field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Name field is set to the value of the last call. +func (b *ConsolePluginApplyConfiguration) WithName(value string) *ConsolePluginApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.Name = &value + return b +} + +// WithGenerateName sets the GenerateName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the GenerateName field is set to the value of the last call. +func (b *ConsolePluginApplyConfiguration) WithGenerateName(value string) *ConsolePluginApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.GenerateName = &value + return b +} + +// WithNamespace sets the Namespace field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Namespace field is set to the value of the last call. +func (b *ConsolePluginApplyConfiguration) WithNamespace(value string) *ConsolePluginApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.Namespace = &value + return b +} + +// WithUID sets the UID field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the UID field is set to the value of the last call. +func (b *ConsolePluginApplyConfiguration) WithUID(value types.UID) *ConsolePluginApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.UID = &value + return b +} + +// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ResourceVersion field is set to the value of the last call. +func (b *ConsolePluginApplyConfiguration) WithResourceVersion(value string) *ConsolePluginApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.ResourceVersion = &value + return b +} + +// WithGeneration sets the Generation field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Generation field is set to the value of the last call. +func (b *ConsolePluginApplyConfiguration) WithGeneration(value int64) *ConsolePluginApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.Generation = &value + return b +} + +// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the CreationTimestamp field is set to the value of the last call. +func (b *ConsolePluginApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *ConsolePluginApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value + return b +} + +// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DeletionTimestamp field is set to the value of the last call. +func (b *ConsolePluginApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *ConsolePluginApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value + return b +} + +// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. +func (b *ConsolePluginApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *ConsolePluginApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value + return b +} + +// WithLabels puts the entries into the Labels field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Labels field, +// overwriting an existing map entries in Labels field with the same key. +func (b *ConsolePluginApplyConfiguration) WithLabels(entries map[string]string) *ConsolePluginApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.ObjectMetaApplyConfiguration.Labels[k] = v + } + return b +} + +// WithAnnotations puts the entries into the Annotations field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Annotations field, +// overwriting an existing map entries in Annotations field with the same key. +func (b *ConsolePluginApplyConfiguration) WithAnnotations(entries map[string]string) *ConsolePluginApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.ObjectMetaApplyConfiguration.Annotations[k] = v + } + return b +} + +// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the OwnerReferences field. +func (b *ConsolePluginApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *ConsolePluginApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + for i := range values { + if values[i] == nil { + panic("nil value passed to WithOwnerReferences") + } + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) + } + return b +} + +// WithFinalizers adds the given value to the Finalizers field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Finalizers field. +func (b *ConsolePluginApplyConfiguration) WithFinalizers(values ...string) *ConsolePluginApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + for i := range values { + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) + } + return b +} + +func (b *ConsolePluginApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { + if b.ObjectMetaApplyConfiguration == nil { + b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} + } +} + +// WithSpec sets the Spec field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Spec field is set to the value of the last call. +func (b *ConsolePluginApplyConfiguration) WithSpec(value *ConsolePluginSpecApplyConfiguration) *ConsolePluginApplyConfiguration { + b.Spec = value + return b +} + +// GetKind retrieves the value of the Kind field in the declarative configuration. +func (b *ConsolePluginApplyConfiguration) GetKind() *string { + return b.TypeMetaApplyConfiguration.Kind +} + +// GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration. +func (b *ConsolePluginApplyConfiguration) GetAPIVersion() *string { + return b.TypeMetaApplyConfiguration.APIVersion +} + +// GetName retrieves the value of the Name field in the declarative configuration. +func (b *ConsolePluginApplyConfiguration) GetName() *string { + b.ensureObjectMetaApplyConfigurationExists() + return b.ObjectMetaApplyConfiguration.Name +} + +// GetNamespace retrieves the value of the Namespace field in the declarative configuration. +func (b *ConsolePluginApplyConfiguration) GetNamespace() *string { + b.ensureObjectMetaApplyConfigurationExists() + return b.ObjectMetaApplyConfiguration.Namespace +} diff --git a/vendor/github.com/openshift/client-go/console/applyconfigurations/console/v1/consolepluginbackend.go b/vendor/github.com/openshift/client-go/console/applyconfigurations/console/v1/consolepluginbackend.go new file mode 100644 index 000000000..50c38679e --- /dev/null +++ b/vendor/github.com/openshift/client-go/console/applyconfigurations/console/v1/consolepluginbackend.go @@ -0,0 +1,46 @@ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1 + +import ( + consolev1 "github.com/openshift/api/console/v1" +) + +// ConsolePluginBackendApplyConfiguration represents a declarative configuration of the ConsolePluginBackend type for use +// with apply. +// +// ConsolePluginBackend holds information about the endpoint which serves +// the console's plugin +type ConsolePluginBackendApplyConfiguration struct { + // type is the backend type which servers the console's plugin. Currently only "Service" is supported. + // + // --- + Type *consolev1.ConsolePluginBackendType `json:"type,omitempty"` + // service is a Kubernetes Service that exposes the plugin using a + // deployment with an HTTP server. The Service must use HTTPS and + // Service serving certificate. The console backend will proxy the + // plugins assets from the Service using the service CA bundle. + Service *ConsolePluginServiceApplyConfiguration `json:"service,omitempty"` +} + +// ConsolePluginBackendApplyConfiguration constructs a declarative configuration of the ConsolePluginBackend type for use with +// apply. +func ConsolePluginBackend() *ConsolePluginBackendApplyConfiguration { + return &ConsolePluginBackendApplyConfiguration{} +} + +// WithType sets the Type field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Type field is set to the value of the last call. +func (b *ConsolePluginBackendApplyConfiguration) WithType(value consolev1.ConsolePluginBackendType) *ConsolePluginBackendApplyConfiguration { + b.Type = &value + return b +} + +// WithService sets the Service field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Service field is set to the value of the last call. +func (b *ConsolePluginBackendApplyConfiguration) WithService(value *ConsolePluginServiceApplyConfiguration) *ConsolePluginBackendApplyConfiguration { + b.Service = value + return b +} diff --git a/vendor/github.com/openshift/client-go/console/applyconfigurations/console/v1/consoleplugincsp.go b/vendor/github.com/openshift/client-go/console/applyconfigurations/console/v1/consoleplugincsp.go new file mode 100644 index 000000000..793f7d888 --- /dev/null +++ b/vendor/github.com/openshift/client-go/console/applyconfigurations/console/v1/consoleplugincsp.go @@ -0,0 +1,67 @@ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1 + +import ( + consolev1 "github.com/openshift/api/console/v1" +) + +// ConsolePluginCSPApplyConfiguration represents a declarative configuration of the ConsolePluginCSP type for use +// with apply. +// +// ConsolePluginCSP holds configuration for a specific CSP directive +type ConsolePluginCSPApplyConfiguration struct { + // directive specifies which Content-Security-Policy directive to configure. + // Available directive types are DefaultSrc, ScriptSrc, StyleSrc, ImgSrc, FontSrc and ConnectSrc. + // DefaultSrc directive serves as a fallback for the other CSP fetch directives. + // For more information about the DefaultSrc directive, see: + // https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/default-src + // ScriptSrc directive specifies valid sources for JavaScript. + // For more information about the ScriptSrc directive, see: + // https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/script-src + // StyleSrc directive specifies valid sources for stylesheets. + // For more information about the StyleSrc directive, see: + // https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/style-src + // ImgSrc directive specifies a valid sources of images and favicons. + // For more information about the ImgSrc directive, see: + // https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/img-src + // FontSrc directive specifies valid sources for fonts loaded using @font-face. + // For more information about the FontSrc directive, see: + // https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/font-src + // ConnectSrc directive restricts the URLs which can be loaded using script interfaces. + // For more information about the ConnectSrc directive, see: + // https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/connect-src + Directive *consolev1.DirectiveType `json:"directive,omitempty"` + // values defines an array of values to append to the console defaults for this directive. + // Each ConsolePlugin may define their own directives with their values. These will be set + // by the OpenShift web console's backend, as part of its Content-Security-Policy header. + // The array can contain at most 16 values. Each directive value must have a maximum length + // of 1024 characters and must not contain whitespace, commas (,), semicolons (;) or single + // quotes ('). The value '*' is not permitted. + // Each value in the array must be unique. + Values []consolev1.CSPDirectiveValue `json:"values,omitempty"` +} + +// ConsolePluginCSPApplyConfiguration constructs a declarative configuration of the ConsolePluginCSP type for use with +// apply. +func ConsolePluginCSP() *ConsolePluginCSPApplyConfiguration { + return &ConsolePluginCSPApplyConfiguration{} +} + +// WithDirective sets the Directive field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Directive field is set to the value of the last call. +func (b *ConsolePluginCSPApplyConfiguration) WithDirective(value consolev1.DirectiveType) *ConsolePluginCSPApplyConfiguration { + b.Directive = &value + return b +} + +// WithValues adds the given value to the Values field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Values field. +func (b *ConsolePluginCSPApplyConfiguration) WithValues(values ...consolev1.CSPDirectiveValue) *ConsolePluginCSPApplyConfiguration { + for i := range values { + b.Values = append(b.Values, values[i]) + } + return b +} diff --git a/vendor/github.com/openshift/client-go/console/applyconfigurations/console/v1/consoleplugini18n.go b/vendor/github.com/openshift/client-go/console/applyconfigurations/console/v1/consoleplugini18n.go new file mode 100644 index 000000000..f34e54511 --- /dev/null +++ b/vendor/github.com/openshift/client-go/console/applyconfigurations/console/v1/consoleplugini18n.go @@ -0,0 +1,35 @@ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1 + +import ( + consolev1 "github.com/openshift/api/console/v1" +) + +// ConsolePluginI18nApplyConfiguration represents a declarative configuration of the ConsolePluginI18n type for use +// with apply. +// +// ConsolePluginI18n holds information on localization resources that are served by +// the dynamic plugin. +type ConsolePluginI18nApplyConfiguration struct { + // loadType indicates how the plugin's localization resource should be loaded. + // Valid values are Preload, Lazy and the empty string. + // When set to Preload, all localization resources are fetched when the plugin is loaded. + // When set to Lazy, localization resources are lazily loaded as and when they are required by the console. + // When omitted or set to the empty string, the behaviour is equivalent to Lazy type. + LoadType *consolev1.LoadType `json:"loadType,omitempty"` +} + +// ConsolePluginI18nApplyConfiguration constructs a declarative configuration of the ConsolePluginI18n type for use with +// apply. +func ConsolePluginI18n() *ConsolePluginI18nApplyConfiguration { + return &ConsolePluginI18nApplyConfiguration{} +} + +// WithLoadType sets the LoadType field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the LoadType field is set to the value of the last call. +func (b *ConsolePluginI18nApplyConfiguration) WithLoadType(value consolev1.LoadType) *ConsolePluginI18nApplyConfiguration { + b.LoadType = &value + return b +} diff --git a/vendor/github.com/openshift/client-go/console/applyconfigurations/console/v1/consolepluginproxy.go b/vendor/github.com/openshift/client-go/console/applyconfigurations/console/v1/consolepluginproxy.go new file mode 100644 index 000000000..f3e340dd8 --- /dev/null +++ b/vendor/github.com/openshift/client-go/console/applyconfigurations/console/v1/consolepluginproxy.go @@ -0,0 +1,72 @@ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1 + +import ( + consolev1 "github.com/openshift/api/console/v1" +) + +// ConsolePluginProxyApplyConfiguration represents a declarative configuration of the ConsolePluginProxy type for use +// with apply. +// +// ConsolePluginProxy holds information on various service types +// to which console's backend will proxy the plugin's requests. +type ConsolePluginProxyApplyConfiguration struct { + // endpoint provides information about endpoint to which the request is proxied to. + Endpoint *ConsolePluginProxyEndpointApplyConfiguration `json:"endpoint,omitempty"` + // alias is a proxy name that identifies the plugin's proxy. An alias name + // should be unique per plugin. The console backend exposes following + // proxy endpoint: + // + // /api/proxy/plugin///? + // + // Request example path: + // + // /api/proxy/plugin/acm/search/pods?namespace=openshift-apiserver + Alias *string `json:"alias,omitempty"` + // caCertificate provides the cert authority certificate contents, + // in case the proxied Service is using custom service CA. + // By default, the service CA bundle provided by the service-ca operator is used. + CACertificate *string `json:"caCertificate,omitempty"` + // authorization provides information about authorization type, + // which the proxied request should contain + Authorization *consolev1.AuthorizationType `json:"authorization,omitempty"` +} + +// ConsolePluginProxyApplyConfiguration constructs a declarative configuration of the ConsolePluginProxy type for use with +// apply. +func ConsolePluginProxy() *ConsolePluginProxyApplyConfiguration { + return &ConsolePluginProxyApplyConfiguration{} +} + +// WithEndpoint sets the Endpoint field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Endpoint field is set to the value of the last call. +func (b *ConsolePluginProxyApplyConfiguration) WithEndpoint(value *ConsolePluginProxyEndpointApplyConfiguration) *ConsolePluginProxyApplyConfiguration { + b.Endpoint = value + return b +} + +// WithAlias sets the Alias field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Alias field is set to the value of the last call. +func (b *ConsolePluginProxyApplyConfiguration) WithAlias(value string) *ConsolePluginProxyApplyConfiguration { + b.Alias = &value + return b +} + +// WithCACertificate sets the CACertificate field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the CACertificate field is set to the value of the last call. +func (b *ConsolePluginProxyApplyConfiguration) WithCACertificate(value string) *ConsolePluginProxyApplyConfiguration { + b.CACertificate = &value + return b +} + +// WithAuthorization sets the Authorization field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Authorization field is set to the value of the last call. +func (b *ConsolePluginProxyApplyConfiguration) WithAuthorization(value consolev1.AuthorizationType) *ConsolePluginProxyApplyConfiguration { + b.Authorization = &value + return b +} diff --git a/vendor/github.com/openshift/client-go/console/applyconfigurations/console/v1/consolepluginproxyendpoint.go b/vendor/github.com/openshift/client-go/console/applyconfigurations/console/v1/consolepluginproxyendpoint.go new file mode 100644 index 000000000..195c28940 --- /dev/null +++ b/vendor/github.com/openshift/client-go/console/applyconfigurations/console/v1/consolepluginproxyendpoint.go @@ -0,0 +1,47 @@ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1 + +import ( + consolev1 "github.com/openshift/api/console/v1" +) + +// ConsolePluginProxyEndpointApplyConfiguration represents a declarative configuration of the ConsolePluginProxyEndpoint type for use +// with apply. +// +// ConsolePluginProxyEndpoint holds information about the endpoint to which +// request will be proxied to. +type ConsolePluginProxyEndpointApplyConfiguration struct { + // type is the type of the console plugin's proxy. Currently only "Service" is supported. + // + // --- + Type *consolev1.ConsolePluginProxyType `json:"type,omitempty"` + // service is an in-cluster Service that the plugin will connect to. + // The Service must use HTTPS. The console backend exposes an endpoint + // in order to proxy communication between the plugin and the Service. + // Note: service field is required for now, since currently only "Service" + // type is supported. + Service *ConsolePluginProxyServiceConfigApplyConfiguration `json:"service,omitempty"` +} + +// ConsolePluginProxyEndpointApplyConfiguration constructs a declarative configuration of the ConsolePluginProxyEndpoint type for use with +// apply. +func ConsolePluginProxyEndpoint() *ConsolePluginProxyEndpointApplyConfiguration { + return &ConsolePluginProxyEndpointApplyConfiguration{} +} + +// WithType sets the Type field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Type field is set to the value of the last call. +func (b *ConsolePluginProxyEndpointApplyConfiguration) WithType(value consolev1.ConsolePluginProxyType) *ConsolePluginProxyEndpointApplyConfiguration { + b.Type = &value + return b +} + +// WithService sets the Service field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Service field is set to the value of the last call. +func (b *ConsolePluginProxyEndpointApplyConfiguration) WithService(value *ConsolePluginProxyServiceConfigApplyConfiguration) *ConsolePluginProxyEndpointApplyConfiguration { + b.Service = value + return b +} diff --git a/vendor/github.com/openshift/client-go/console/applyconfigurations/console/v1/consolepluginproxyserviceconfig.go b/vendor/github.com/openshift/client-go/console/applyconfigurations/console/v1/consolepluginproxyserviceconfig.go new file mode 100644 index 000000000..01b01ab00 --- /dev/null +++ b/vendor/github.com/openshift/client-go/console/applyconfigurations/console/v1/consolepluginproxyserviceconfig.go @@ -0,0 +1,48 @@ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1 + +// ConsolePluginProxyServiceConfigApplyConfiguration represents a declarative configuration of the ConsolePluginProxyServiceConfig type for use +// with apply. +// +// ProxyTypeServiceConfig holds information on Service to which +// console's backend will proxy the plugin's requests. +type ConsolePluginProxyServiceConfigApplyConfiguration struct { + // name of Service that the plugin needs to connect to. + Name *string `json:"name,omitempty"` + // namespace of Service that the plugin needs to connect to + Namespace *string `json:"namespace,omitempty"` + // port on which the Service that the plugin needs to connect to + // is listening on. + Port *int32 `json:"port,omitempty"` +} + +// ConsolePluginProxyServiceConfigApplyConfiguration constructs a declarative configuration of the ConsolePluginProxyServiceConfig type for use with +// apply. +func ConsolePluginProxyServiceConfig() *ConsolePluginProxyServiceConfigApplyConfiguration { + return &ConsolePluginProxyServiceConfigApplyConfiguration{} +} + +// WithName sets the Name field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Name field is set to the value of the last call. +func (b *ConsolePluginProxyServiceConfigApplyConfiguration) WithName(value string) *ConsolePluginProxyServiceConfigApplyConfiguration { + b.Name = &value + return b +} + +// WithNamespace sets the Namespace field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Namespace field is set to the value of the last call. +func (b *ConsolePluginProxyServiceConfigApplyConfiguration) WithNamespace(value string) *ConsolePluginProxyServiceConfigApplyConfiguration { + b.Namespace = &value + return b +} + +// WithPort sets the Port field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Port field is set to the value of the last call. +func (b *ConsolePluginProxyServiceConfigApplyConfiguration) WithPort(value int32) *ConsolePluginProxyServiceConfigApplyConfiguration { + b.Port = &value + return b +} diff --git a/vendor/github.com/openshift/client-go/console/applyconfigurations/console/v1/consolepluginservice.go b/vendor/github.com/openshift/client-go/console/applyconfigurations/console/v1/consolepluginservice.go new file mode 100644 index 000000000..c58cc20e1 --- /dev/null +++ b/vendor/github.com/openshift/client-go/console/applyconfigurations/console/v1/consolepluginservice.go @@ -0,0 +1,59 @@ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1 + +// ConsolePluginServiceApplyConfiguration represents a declarative configuration of the ConsolePluginService type for use +// with apply. +// +// ConsolePluginService holds information on Service that is serving +// console dynamic plugin assets. +type ConsolePluginServiceApplyConfiguration struct { + // name of Service that is serving the plugin assets. + Name *string `json:"name,omitempty"` + // namespace of Service that is serving the plugin assets. + Namespace *string `json:"namespace,omitempty"` + // port on which the Service that is serving the plugin is listening to. + Port *int32 `json:"port,omitempty"` + // basePath is the path to the plugin's assets. The primary asset it the + // manifest file called `plugin-manifest.json`, which is a JSON document + // that contains metadata about the plugin and the extensions. + BasePath *string `json:"basePath,omitempty"` +} + +// ConsolePluginServiceApplyConfiguration constructs a declarative configuration of the ConsolePluginService type for use with +// apply. +func ConsolePluginService() *ConsolePluginServiceApplyConfiguration { + return &ConsolePluginServiceApplyConfiguration{} +} + +// WithName sets the Name field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Name field is set to the value of the last call. +func (b *ConsolePluginServiceApplyConfiguration) WithName(value string) *ConsolePluginServiceApplyConfiguration { + b.Name = &value + return b +} + +// WithNamespace sets the Namespace field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Namespace field is set to the value of the last call. +func (b *ConsolePluginServiceApplyConfiguration) WithNamespace(value string) *ConsolePluginServiceApplyConfiguration { + b.Namespace = &value + return b +} + +// WithPort sets the Port field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Port field is set to the value of the last call. +func (b *ConsolePluginServiceApplyConfiguration) WithPort(value int32) *ConsolePluginServiceApplyConfiguration { + b.Port = &value + return b +} + +// WithBasePath sets the BasePath field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the BasePath field is set to the value of the last call. +func (b *ConsolePluginServiceApplyConfiguration) WithBasePath(value string) *ConsolePluginServiceApplyConfiguration { + b.BasePath = &value + return b +} diff --git a/vendor/github.com/openshift/client-go/console/applyconfigurations/console/v1/consolepluginspec.go b/vendor/github.com/openshift/client-go/console/applyconfigurations/console/v1/consolepluginspec.go new file mode 100644 index 000000000..501a8fc37 --- /dev/null +++ b/vendor/github.com/openshift/client-go/console/applyconfigurations/console/v1/consolepluginspec.go @@ -0,0 +1,116 @@ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1 + +// ConsolePluginSpecApplyConfiguration represents a declarative configuration of the ConsolePluginSpec type for use +// with apply. +// +// ConsolePluginSpec is the desired plugin configuration. +type ConsolePluginSpecApplyConfiguration struct { + // displayName is the display name of the plugin. + // The dispalyName should be between 1 and 128 characters. + DisplayName *string `json:"displayName,omitempty"` + // backend holds the configuration of backend which is serving console's plugin . + Backend *ConsolePluginBackendApplyConfiguration `json:"backend,omitempty"` + // proxy is a list of proxies that describe various service type + // to which the plugin needs to connect to. + Proxy []ConsolePluginProxyApplyConfiguration `json:"proxy,omitempty"` + // i18n is the configuration of plugin's localization resources. + I18n *ConsolePluginI18nApplyConfiguration `json:"i18n,omitempty"` + // contentSecurityPolicy is a list of Content-Security-Policy (CSP) directives for the plugin. + // Each directive specifies a list of values, appropriate for the given directive type, + // for example a list of remote endpoints for fetch directives such as ScriptSrc. + // Console web application uses CSP to detect and mitigate certain types of attacks, + // such as cross-site scripting (XSS) and data injection attacks. + // Dynamic plugins should specify this field if need to load assets from outside + // the cluster or if violation reports are observed. Dynamic plugins should always prefer + // loading their assets from within the cluster, either by vendoring them, or fetching + // from a cluster service. + // CSP violation reports can be viewed in the browser's console logs during development and + // testing of the plugin in the OpenShift web console. + // Available directive types are DefaultSrc, ScriptSrc, StyleSrc, ImgSrc, FontSrc and ConnectSrc. + // Each of the available directives may be defined only once in the list. + // The value 'self' is automatically included in all fetch directives by the OpenShift web + // console's backend. + // For more information about the CSP directives, see: + // https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy + // + // The OpenShift web console server aggregates the CSP directives and values across + // its own default values and all enabled ConsolePlugin CRs, merging them into a single + // policy string that is sent to the browser via `Content-Security-Policy` HTTP response header. + // + // Example: + // ConsolePlugin A directives: + // script-src: https://script1.com/, https://script2.com/ + // font-src: https://font1.com/ + // + // ConsolePlugin B directives: + // script-src: https://script2.com/, https://script3.com/ + // font-src: https://font2.com/ + // img-src: https://img1.com/ + // + // Unified set of CSP directives, passed to the OpenShift web console server: + // script-src: https://script1.com/, https://script2.com/, https://script3.com/ + // font-src: https://font1.com/, https://font2.com/ + // img-src: https://img1.com/ + // + // OpenShift web console server CSP response header: + // Content-Security-Policy: default-src 'self'; base-uri 'self'; script-src 'self' https://script1.com/ https://script2.com/ https://script3.com/; font-src 'self' https://font1.com/ https://font2.com/; img-src 'self' https://img1.com/; style-src 'self'; frame-src 'none'; object-src 'none' + ContentSecurityPolicy []ConsolePluginCSPApplyConfiguration `json:"contentSecurityPolicy,omitempty"` +} + +// ConsolePluginSpecApplyConfiguration constructs a declarative configuration of the ConsolePluginSpec type for use with +// apply. +func ConsolePluginSpec() *ConsolePluginSpecApplyConfiguration { + return &ConsolePluginSpecApplyConfiguration{} +} + +// WithDisplayName sets the DisplayName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DisplayName field is set to the value of the last call. +func (b *ConsolePluginSpecApplyConfiguration) WithDisplayName(value string) *ConsolePluginSpecApplyConfiguration { + b.DisplayName = &value + return b +} + +// WithBackend sets the Backend field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Backend field is set to the value of the last call. +func (b *ConsolePluginSpecApplyConfiguration) WithBackend(value *ConsolePluginBackendApplyConfiguration) *ConsolePluginSpecApplyConfiguration { + b.Backend = value + return b +} + +// WithProxy adds the given value to the Proxy field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Proxy field. +func (b *ConsolePluginSpecApplyConfiguration) WithProxy(values ...*ConsolePluginProxyApplyConfiguration) *ConsolePluginSpecApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithProxy") + } + b.Proxy = append(b.Proxy, *values[i]) + } + return b +} + +// WithI18n sets the I18n field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the I18n field is set to the value of the last call. +func (b *ConsolePluginSpecApplyConfiguration) WithI18n(value *ConsolePluginI18nApplyConfiguration) *ConsolePluginSpecApplyConfiguration { + b.I18n = value + return b +} + +// WithContentSecurityPolicy adds the given value to the ContentSecurityPolicy field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the ContentSecurityPolicy field. +func (b *ConsolePluginSpecApplyConfiguration) WithContentSecurityPolicy(values ...*ConsolePluginCSPApplyConfiguration) *ConsolePluginSpecApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithContentSecurityPolicy") + } + b.ContentSecurityPolicy = append(b.ContentSecurityPolicy, *values[i]) + } + return b +} diff --git a/vendor/github.com/openshift/client-go/console/applyconfigurations/console/v1/consolequickstart.go b/vendor/github.com/openshift/client-go/console/applyconfigurations/console/v1/consolequickstart.go new file mode 100644 index 000000000..8274232b5 --- /dev/null +++ b/vendor/github.com/openshift/client-go/console/applyconfigurations/console/v1/consolequickstart.go @@ -0,0 +1,261 @@ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1 + +import ( + consolev1 "github.com/openshift/api/console/v1" + internal "github.com/openshift/client-go/console/applyconfigurations/internal" + apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + managedfields "k8s.io/apimachinery/pkg/util/managedfields" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" +) + +// ConsoleQuickStartApplyConfiguration represents a declarative configuration of the ConsoleQuickStart type for use +// with apply. +// +// ConsoleQuickStart is an extension for guiding user through various +// workflows in the OpenShift web console. +// +// Compatibility level 2: Stable within a major release for a minimum of 9 months or 3 minor releases (whichever is longer). +type ConsoleQuickStartApplyConfiguration struct { + metav1.TypeMetaApplyConfiguration `json:",inline"` + // metadata is the standard object's metadata. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Spec *ConsoleQuickStartSpecApplyConfiguration `json:"spec,omitempty"` +} + +// ConsoleQuickStart constructs a declarative configuration of the ConsoleQuickStart type for use with +// apply. +func ConsoleQuickStart(name string) *ConsoleQuickStartApplyConfiguration { + b := &ConsoleQuickStartApplyConfiguration{} + b.WithName(name) + b.WithKind("ConsoleQuickStart") + b.WithAPIVersion("console.openshift.io/v1") + return b +} + +// ExtractConsoleQuickStartFrom extracts the applied configuration owned by fieldManager from +// consoleQuickStart for the specified subresource. Pass an empty string for subresource to extract +// the main resource. Common subresources include "status", "scale", etc. +// consoleQuickStart must be a unmodified ConsoleQuickStart API object that was retrieved from the Kubernetes API. +// ExtractConsoleQuickStartFrom provides a way to perform a extract/modify-in-place/apply workflow. +// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously +// applied if another fieldManager has updated or force applied any of the previously applied fields. +func ExtractConsoleQuickStartFrom(consoleQuickStart *consolev1.ConsoleQuickStart, fieldManager string, subresource string) (*ConsoleQuickStartApplyConfiguration, error) { + b := &ConsoleQuickStartApplyConfiguration{} + err := managedfields.ExtractInto(consoleQuickStart, internal.Parser().Type("com.github.openshift.api.console.v1.ConsoleQuickStart"), fieldManager, b, subresource) + if err != nil { + return nil, err + } + b.WithName(consoleQuickStart.Name) + + b.WithKind("ConsoleQuickStart") + b.WithAPIVersion("console.openshift.io/v1") + return b, nil +} + +// ExtractConsoleQuickStart extracts the applied configuration owned by fieldManager from +// consoleQuickStart. If no managedFields are found in consoleQuickStart for fieldManager, a +// ConsoleQuickStartApplyConfiguration is returned with only the Name, Namespace (if applicable), +// APIVersion and Kind populated. It is possible that no managed fields were found for because other +// field managers have taken ownership of all the fields previously owned by fieldManager, or because +// the fieldManager never owned fields any fields. +// consoleQuickStart must be a unmodified ConsoleQuickStart API object that was retrieved from the Kubernetes API. +// ExtractConsoleQuickStart provides a way to perform a extract/modify-in-place/apply workflow. +// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously +// applied if another fieldManager has updated or force applied any of the previously applied fields. +func ExtractConsoleQuickStart(consoleQuickStart *consolev1.ConsoleQuickStart, fieldManager string) (*ConsoleQuickStartApplyConfiguration, error) { + return ExtractConsoleQuickStartFrom(consoleQuickStart, fieldManager, "") +} + +func (b ConsoleQuickStartApplyConfiguration) IsApplyConfiguration() {} + +// WithKind sets the Kind field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Kind field is set to the value of the last call. +func (b *ConsoleQuickStartApplyConfiguration) WithKind(value string) *ConsoleQuickStartApplyConfiguration { + b.TypeMetaApplyConfiguration.Kind = &value + return b +} + +// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the APIVersion field is set to the value of the last call. +func (b *ConsoleQuickStartApplyConfiguration) WithAPIVersion(value string) *ConsoleQuickStartApplyConfiguration { + b.TypeMetaApplyConfiguration.APIVersion = &value + return b +} + +// WithName sets the Name field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Name field is set to the value of the last call. +func (b *ConsoleQuickStartApplyConfiguration) WithName(value string) *ConsoleQuickStartApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.Name = &value + return b +} + +// WithGenerateName sets the GenerateName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the GenerateName field is set to the value of the last call. +func (b *ConsoleQuickStartApplyConfiguration) WithGenerateName(value string) *ConsoleQuickStartApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.GenerateName = &value + return b +} + +// WithNamespace sets the Namespace field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Namespace field is set to the value of the last call. +func (b *ConsoleQuickStartApplyConfiguration) WithNamespace(value string) *ConsoleQuickStartApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.Namespace = &value + return b +} + +// WithUID sets the UID field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the UID field is set to the value of the last call. +func (b *ConsoleQuickStartApplyConfiguration) WithUID(value types.UID) *ConsoleQuickStartApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.UID = &value + return b +} + +// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ResourceVersion field is set to the value of the last call. +func (b *ConsoleQuickStartApplyConfiguration) WithResourceVersion(value string) *ConsoleQuickStartApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.ResourceVersion = &value + return b +} + +// WithGeneration sets the Generation field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Generation field is set to the value of the last call. +func (b *ConsoleQuickStartApplyConfiguration) WithGeneration(value int64) *ConsoleQuickStartApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.Generation = &value + return b +} + +// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the CreationTimestamp field is set to the value of the last call. +func (b *ConsoleQuickStartApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *ConsoleQuickStartApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value + return b +} + +// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DeletionTimestamp field is set to the value of the last call. +func (b *ConsoleQuickStartApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *ConsoleQuickStartApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value + return b +} + +// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. +func (b *ConsoleQuickStartApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *ConsoleQuickStartApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value + return b +} + +// WithLabels puts the entries into the Labels field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Labels field, +// overwriting an existing map entries in Labels field with the same key. +func (b *ConsoleQuickStartApplyConfiguration) WithLabels(entries map[string]string) *ConsoleQuickStartApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.ObjectMetaApplyConfiguration.Labels[k] = v + } + return b +} + +// WithAnnotations puts the entries into the Annotations field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Annotations field, +// overwriting an existing map entries in Annotations field with the same key. +func (b *ConsoleQuickStartApplyConfiguration) WithAnnotations(entries map[string]string) *ConsoleQuickStartApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.ObjectMetaApplyConfiguration.Annotations[k] = v + } + return b +} + +// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the OwnerReferences field. +func (b *ConsoleQuickStartApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *ConsoleQuickStartApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + for i := range values { + if values[i] == nil { + panic("nil value passed to WithOwnerReferences") + } + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) + } + return b +} + +// WithFinalizers adds the given value to the Finalizers field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Finalizers field. +func (b *ConsoleQuickStartApplyConfiguration) WithFinalizers(values ...string) *ConsoleQuickStartApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + for i := range values { + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) + } + return b +} + +func (b *ConsoleQuickStartApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { + if b.ObjectMetaApplyConfiguration == nil { + b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} + } +} + +// WithSpec sets the Spec field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Spec field is set to the value of the last call. +func (b *ConsoleQuickStartApplyConfiguration) WithSpec(value *ConsoleQuickStartSpecApplyConfiguration) *ConsoleQuickStartApplyConfiguration { + b.Spec = value + return b +} + +// GetKind retrieves the value of the Kind field in the declarative configuration. +func (b *ConsoleQuickStartApplyConfiguration) GetKind() *string { + return b.TypeMetaApplyConfiguration.Kind +} + +// GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration. +func (b *ConsoleQuickStartApplyConfiguration) GetAPIVersion() *string { + return b.TypeMetaApplyConfiguration.APIVersion +} + +// GetName retrieves the value of the Name field in the declarative configuration. +func (b *ConsoleQuickStartApplyConfiguration) GetName() *string { + b.ensureObjectMetaApplyConfigurationExists() + return b.ObjectMetaApplyConfiguration.Name +} + +// GetNamespace retrieves the value of the Namespace field in the declarative configuration. +func (b *ConsoleQuickStartApplyConfiguration) GetNamespace() *string { + b.ensureObjectMetaApplyConfigurationExists() + return b.ObjectMetaApplyConfiguration.Namespace +} diff --git a/vendor/github.com/openshift/client-go/console/applyconfigurations/console/v1/consolequickstartspec.go b/vendor/github.com/openshift/client-go/console/applyconfigurations/console/v1/consolequickstartspec.go new file mode 100644 index 000000000..ae2f7a067 --- /dev/null +++ b/vendor/github.com/openshift/client-go/console/applyconfigurations/console/v1/consolequickstartspec.go @@ -0,0 +1,146 @@ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1 + +import ( + authorizationv1 "k8s.io/api/authorization/v1" +) + +// ConsoleQuickStartSpecApplyConfiguration represents a declarative configuration of the ConsoleQuickStartSpec type for use +// with apply. +// +// ConsoleQuickStartSpec is the desired quick start configuration. +type ConsoleQuickStartSpecApplyConfiguration struct { + // displayName is the display name of the Quick Start. + DisplayName *string `json:"displayName,omitempty"` + // icon is a base64 encoded image that will be displayed beside the Quick Start display name. + // The icon should be an vector image for easy scaling. The size of the icon should be 40x40. + Icon *string `json:"icon,omitempty"` + // tags is a list of strings that describe the Quick Start. + Tags []string `json:"tags,omitempty"` + // durationMinutes describes approximately how many minutes it will take to complete the Quick Start. + DurationMinutes *int `json:"durationMinutes,omitempty"` + // description is the description of the Quick Start. (includes markdown) + Description *string `json:"description,omitempty"` + // prerequisites contains all prerequisites that need to be met before taking a Quick Start. (includes markdown) + Prerequisites []string `json:"prerequisites,omitempty"` + // introduction describes the purpose of the Quick Start. (includes markdown) + Introduction *string `json:"introduction,omitempty"` + // tasks is the list of steps the user has to perform to complete the Quick Start. + Tasks []ConsoleQuickStartTaskApplyConfiguration `json:"tasks,omitempty"` + // conclusion sums up the Quick Start and suggests the possible next steps. (includes markdown) + Conclusion *string `json:"conclusion,omitempty"` + // nextQuickStart is a list of the following Quick Starts, suggested for the user to try. + NextQuickStart []string `json:"nextQuickStart,omitempty"` + // accessReviewResources contains a list of resources that the user's access + // will be reviewed against in order for the user to complete the Quick Start. + // The Quick Start will be hidden if any of the access reviews fail. + AccessReviewResources []authorizationv1.ResourceAttributes `json:"accessReviewResources,omitempty"` +} + +// ConsoleQuickStartSpecApplyConfiguration constructs a declarative configuration of the ConsoleQuickStartSpec type for use with +// apply. +func ConsoleQuickStartSpec() *ConsoleQuickStartSpecApplyConfiguration { + return &ConsoleQuickStartSpecApplyConfiguration{} +} + +// WithDisplayName sets the DisplayName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DisplayName field is set to the value of the last call. +func (b *ConsoleQuickStartSpecApplyConfiguration) WithDisplayName(value string) *ConsoleQuickStartSpecApplyConfiguration { + b.DisplayName = &value + return b +} + +// WithIcon sets the Icon field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Icon field is set to the value of the last call. +func (b *ConsoleQuickStartSpecApplyConfiguration) WithIcon(value string) *ConsoleQuickStartSpecApplyConfiguration { + b.Icon = &value + return b +} + +// WithTags adds the given value to the Tags field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Tags field. +func (b *ConsoleQuickStartSpecApplyConfiguration) WithTags(values ...string) *ConsoleQuickStartSpecApplyConfiguration { + for i := range values { + b.Tags = append(b.Tags, values[i]) + } + return b +} + +// WithDurationMinutes sets the DurationMinutes field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DurationMinutes field is set to the value of the last call. +func (b *ConsoleQuickStartSpecApplyConfiguration) WithDurationMinutes(value int) *ConsoleQuickStartSpecApplyConfiguration { + b.DurationMinutes = &value + return b +} + +// WithDescription sets the Description field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Description field is set to the value of the last call. +func (b *ConsoleQuickStartSpecApplyConfiguration) WithDescription(value string) *ConsoleQuickStartSpecApplyConfiguration { + b.Description = &value + return b +} + +// WithPrerequisites adds the given value to the Prerequisites field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Prerequisites field. +func (b *ConsoleQuickStartSpecApplyConfiguration) WithPrerequisites(values ...string) *ConsoleQuickStartSpecApplyConfiguration { + for i := range values { + b.Prerequisites = append(b.Prerequisites, values[i]) + } + return b +} + +// WithIntroduction sets the Introduction field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Introduction field is set to the value of the last call. +func (b *ConsoleQuickStartSpecApplyConfiguration) WithIntroduction(value string) *ConsoleQuickStartSpecApplyConfiguration { + b.Introduction = &value + return b +} + +// WithTasks adds the given value to the Tasks field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Tasks field. +func (b *ConsoleQuickStartSpecApplyConfiguration) WithTasks(values ...*ConsoleQuickStartTaskApplyConfiguration) *ConsoleQuickStartSpecApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithTasks") + } + b.Tasks = append(b.Tasks, *values[i]) + } + return b +} + +// WithConclusion sets the Conclusion field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Conclusion field is set to the value of the last call. +func (b *ConsoleQuickStartSpecApplyConfiguration) WithConclusion(value string) *ConsoleQuickStartSpecApplyConfiguration { + b.Conclusion = &value + return b +} + +// WithNextQuickStart adds the given value to the NextQuickStart field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the NextQuickStart field. +func (b *ConsoleQuickStartSpecApplyConfiguration) WithNextQuickStart(values ...string) *ConsoleQuickStartSpecApplyConfiguration { + for i := range values { + b.NextQuickStart = append(b.NextQuickStart, values[i]) + } + return b +} + +// WithAccessReviewResources adds the given value to the AccessReviewResources field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the AccessReviewResources field. +func (b *ConsoleQuickStartSpecApplyConfiguration) WithAccessReviewResources(values ...authorizationv1.ResourceAttributes) *ConsoleQuickStartSpecApplyConfiguration { + for i := range values { + b.AccessReviewResources = append(b.AccessReviewResources, values[i]) + } + return b +} diff --git a/vendor/github.com/openshift/client-go/console/applyconfigurations/console/v1/consolequickstarttask.go b/vendor/github.com/openshift/client-go/console/applyconfigurations/console/v1/consolequickstarttask.go new file mode 100644 index 000000000..eab5ed237 --- /dev/null +++ b/vendor/github.com/openshift/client-go/console/applyconfigurations/console/v1/consolequickstarttask.go @@ -0,0 +1,57 @@ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1 + +// ConsoleQuickStartTaskApplyConfiguration represents a declarative configuration of the ConsoleQuickStartTask type for use +// with apply. +// +// ConsoleQuickStartTask is a single step in a Quick Start. +type ConsoleQuickStartTaskApplyConfiguration struct { + // title describes the task and is displayed as a step heading. + Title *string `json:"title,omitempty"` + // description describes the steps needed to complete the task. (includes markdown) + Description *string `json:"description,omitempty"` + // review contains instructions to validate the task is complete. The user will select 'Yes' or 'No'. + // using a radio button, which indicates whether the step was completed successfully. + Review *ConsoleQuickStartTaskReviewApplyConfiguration `json:"review,omitempty"` + // summary contains information about the passed step. + Summary *ConsoleQuickStartTaskSummaryApplyConfiguration `json:"summary,omitempty"` +} + +// ConsoleQuickStartTaskApplyConfiguration constructs a declarative configuration of the ConsoleQuickStartTask type for use with +// apply. +func ConsoleQuickStartTask() *ConsoleQuickStartTaskApplyConfiguration { + return &ConsoleQuickStartTaskApplyConfiguration{} +} + +// WithTitle sets the Title field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Title field is set to the value of the last call. +func (b *ConsoleQuickStartTaskApplyConfiguration) WithTitle(value string) *ConsoleQuickStartTaskApplyConfiguration { + b.Title = &value + return b +} + +// WithDescription sets the Description field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Description field is set to the value of the last call. +func (b *ConsoleQuickStartTaskApplyConfiguration) WithDescription(value string) *ConsoleQuickStartTaskApplyConfiguration { + b.Description = &value + return b +} + +// WithReview sets the Review field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Review field is set to the value of the last call. +func (b *ConsoleQuickStartTaskApplyConfiguration) WithReview(value *ConsoleQuickStartTaskReviewApplyConfiguration) *ConsoleQuickStartTaskApplyConfiguration { + b.Review = value + return b +} + +// WithSummary sets the Summary field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Summary field is set to the value of the last call. +func (b *ConsoleQuickStartTaskApplyConfiguration) WithSummary(value *ConsoleQuickStartTaskSummaryApplyConfiguration) *ConsoleQuickStartTaskApplyConfiguration { + b.Summary = value + return b +} diff --git a/vendor/github.com/openshift/client-go/console/applyconfigurations/console/v1/consolequickstarttaskreview.go b/vendor/github.com/openshift/client-go/console/applyconfigurations/console/v1/consolequickstarttaskreview.go new file mode 100644 index 000000000..5ec64602b --- /dev/null +++ b/vendor/github.com/openshift/client-go/console/applyconfigurations/console/v1/consolequickstarttaskreview.go @@ -0,0 +1,37 @@ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1 + +// ConsoleQuickStartTaskReviewApplyConfiguration represents a declarative configuration of the ConsoleQuickStartTaskReview type for use +// with apply. +// +// ConsoleQuickStartTaskReview contains instructions that validate a task was completed successfully. +type ConsoleQuickStartTaskReviewApplyConfiguration struct { + // instructions contains steps that user needs to take in order + // to validate his work after going through a task. (includes markdown) + Instructions *string `json:"instructions,omitempty"` + // failedTaskHelp contains suggestions for a failed task review and is shown at the end of task. (includes markdown) + FailedTaskHelp *string `json:"failedTaskHelp,omitempty"` +} + +// ConsoleQuickStartTaskReviewApplyConfiguration constructs a declarative configuration of the ConsoleQuickStartTaskReview type for use with +// apply. +func ConsoleQuickStartTaskReview() *ConsoleQuickStartTaskReviewApplyConfiguration { + return &ConsoleQuickStartTaskReviewApplyConfiguration{} +} + +// WithInstructions sets the Instructions field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Instructions field is set to the value of the last call. +func (b *ConsoleQuickStartTaskReviewApplyConfiguration) WithInstructions(value string) *ConsoleQuickStartTaskReviewApplyConfiguration { + b.Instructions = &value + return b +} + +// WithFailedTaskHelp sets the FailedTaskHelp field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the FailedTaskHelp field is set to the value of the last call. +func (b *ConsoleQuickStartTaskReviewApplyConfiguration) WithFailedTaskHelp(value string) *ConsoleQuickStartTaskReviewApplyConfiguration { + b.FailedTaskHelp = &value + return b +} diff --git a/vendor/github.com/openshift/client-go/console/applyconfigurations/console/v1/consolequickstarttasksummary.go b/vendor/github.com/openshift/client-go/console/applyconfigurations/console/v1/consolequickstarttasksummary.go new file mode 100644 index 000000000..f97067915 --- /dev/null +++ b/vendor/github.com/openshift/client-go/console/applyconfigurations/console/v1/consolequickstarttasksummary.go @@ -0,0 +1,36 @@ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1 + +// ConsoleQuickStartTaskSummaryApplyConfiguration represents a declarative configuration of the ConsoleQuickStartTaskSummary type for use +// with apply. +// +// ConsoleQuickStartTaskSummary contains information about a passed step. +type ConsoleQuickStartTaskSummaryApplyConfiguration struct { + // success describes the succesfully passed task. + Success *string `json:"success,omitempty"` + // failed briefly describes the unsuccessfully passed task. (includes markdown) + Failed *string `json:"failed,omitempty"` +} + +// ConsoleQuickStartTaskSummaryApplyConfiguration constructs a declarative configuration of the ConsoleQuickStartTaskSummary type for use with +// apply. +func ConsoleQuickStartTaskSummary() *ConsoleQuickStartTaskSummaryApplyConfiguration { + return &ConsoleQuickStartTaskSummaryApplyConfiguration{} +} + +// WithSuccess sets the Success field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Success field is set to the value of the last call. +func (b *ConsoleQuickStartTaskSummaryApplyConfiguration) WithSuccess(value string) *ConsoleQuickStartTaskSummaryApplyConfiguration { + b.Success = &value + return b +} + +// WithFailed sets the Failed field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Failed field is set to the value of the last call. +func (b *ConsoleQuickStartTaskSummaryApplyConfiguration) WithFailed(value string) *ConsoleQuickStartTaskSummaryApplyConfiguration { + b.Failed = &value + return b +} diff --git a/vendor/github.com/openshift/client-go/console/applyconfigurations/console/v1/consolesample.go b/vendor/github.com/openshift/client-go/console/applyconfigurations/console/v1/consolesample.go new file mode 100644 index 000000000..ce928b6c4 --- /dev/null +++ b/vendor/github.com/openshift/client-go/console/applyconfigurations/console/v1/consolesample.go @@ -0,0 +1,261 @@ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1 + +import ( + consolev1 "github.com/openshift/api/console/v1" + internal "github.com/openshift/client-go/console/applyconfigurations/internal" + apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + managedfields "k8s.io/apimachinery/pkg/util/managedfields" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" +) + +// ConsoleSampleApplyConfiguration represents a declarative configuration of the ConsoleSample type for use +// with apply. +// +// ConsoleSample is an extension to customizing OpenShift web console by adding samples. +// +// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). +type ConsoleSampleApplyConfiguration struct { + metav1.TypeMetaApplyConfiguration `json:",inline"` + // metadata is the standard object's metadata. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + // spec contains configuration for a console sample. + Spec *ConsoleSampleSpecApplyConfiguration `json:"spec,omitempty"` +} + +// ConsoleSample constructs a declarative configuration of the ConsoleSample type for use with +// apply. +func ConsoleSample(name string) *ConsoleSampleApplyConfiguration { + b := &ConsoleSampleApplyConfiguration{} + b.WithName(name) + b.WithKind("ConsoleSample") + b.WithAPIVersion("console.openshift.io/v1") + return b +} + +// ExtractConsoleSampleFrom extracts the applied configuration owned by fieldManager from +// consoleSample for the specified subresource. Pass an empty string for subresource to extract +// the main resource. Common subresources include "status", "scale", etc. +// consoleSample must be a unmodified ConsoleSample API object that was retrieved from the Kubernetes API. +// ExtractConsoleSampleFrom provides a way to perform a extract/modify-in-place/apply workflow. +// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously +// applied if another fieldManager has updated or force applied any of the previously applied fields. +func ExtractConsoleSampleFrom(consoleSample *consolev1.ConsoleSample, fieldManager string, subresource string) (*ConsoleSampleApplyConfiguration, error) { + b := &ConsoleSampleApplyConfiguration{} + err := managedfields.ExtractInto(consoleSample, internal.Parser().Type("com.github.openshift.api.console.v1.ConsoleSample"), fieldManager, b, subresource) + if err != nil { + return nil, err + } + b.WithName(consoleSample.Name) + + b.WithKind("ConsoleSample") + b.WithAPIVersion("console.openshift.io/v1") + return b, nil +} + +// ExtractConsoleSample extracts the applied configuration owned by fieldManager from +// consoleSample. If no managedFields are found in consoleSample for fieldManager, a +// ConsoleSampleApplyConfiguration is returned with only the Name, Namespace (if applicable), +// APIVersion and Kind populated. It is possible that no managed fields were found for because other +// field managers have taken ownership of all the fields previously owned by fieldManager, or because +// the fieldManager never owned fields any fields. +// consoleSample must be a unmodified ConsoleSample API object that was retrieved from the Kubernetes API. +// ExtractConsoleSample provides a way to perform a extract/modify-in-place/apply workflow. +// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously +// applied if another fieldManager has updated or force applied any of the previously applied fields. +func ExtractConsoleSample(consoleSample *consolev1.ConsoleSample, fieldManager string) (*ConsoleSampleApplyConfiguration, error) { + return ExtractConsoleSampleFrom(consoleSample, fieldManager, "") +} + +func (b ConsoleSampleApplyConfiguration) IsApplyConfiguration() {} + +// WithKind sets the Kind field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Kind field is set to the value of the last call. +func (b *ConsoleSampleApplyConfiguration) WithKind(value string) *ConsoleSampleApplyConfiguration { + b.TypeMetaApplyConfiguration.Kind = &value + return b +} + +// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the APIVersion field is set to the value of the last call. +func (b *ConsoleSampleApplyConfiguration) WithAPIVersion(value string) *ConsoleSampleApplyConfiguration { + b.TypeMetaApplyConfiguration.APIVersion = &value + return b +} + +// WithName sets the Name field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Name field is set to the value of the last call. +func (b *ConsoleSampleApplyConfiguration) WithName(value string) *ConsoleSampleApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.Name = &value + return b +} + +// WithGenerateName sets the GenerateName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the GenerateName field is set to the value of the last call. +func (b *ConsoleSampleApplyConfiguration) WithGenerateName(value string) *ConsoleSampleApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.GenerateName = &value + return b +} + +// WithNamespace sets the Namespace field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Namespace field is set to the value of the last call. +func (b *ConsoleSampleApplyConfiguration) WithNamespace(value string) *ConsoleSampleApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.Namespace = &value + return b +} + +// WithUID sets the UID field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the UID field is set to the value of the last call. +func (b *ConsoleSampleApplyConfiguration) WithUID(value types.UID) *ConsoleSampleApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.UID = &value + return b +} + +// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ResourceVersion field is set to the value of the last call. +func (b *ConsoleSampleApplyConfiguration) WithResourceVersion(value string) *ConsoleSampleApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.ResourceVersion = &value + return b +} + +// WithGeneration sets the Generation field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Generation field is set to the value of the last call. +func (b *ConsoleSampleApplyConfiguration) WithGeneration(value int64) *ConsoleSampleApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.Generation = &value + return b +} + +// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the CreationTimestamp field is set to the value of the last call. +func (b *ConsoleSampleApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *ConsoleSampleApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value + return b +} + +// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DeletionTimestamp field is set to the value of the last call. +func (b *ConsoleSampleApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *ConsoleSampleApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value + return b +} + +// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. +func (b *ConsoleSampleApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *ConsoleSampleApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value + return b +} + +// WithLabels puts the entries into the Labels field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Labels field, +// overwriting an existing map entries in Labels field with the same key. +func (b *ConsoleSampleApplyConfiguration) WithLabels(entries map[string]string) *ConsoleSampleApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.ObjectMetaApplyConfiguration.Labels[k] = v + } + return b +} + +// WithAnnotations puts the entries into the Annotations field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Annotations field, +// overwriting an existing map entries in Annotations field with the same key. +func (b *ConsoleSampleApplyConfiguration) WithAnnotations(entries map[string]string) *ConsoleSampleApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.ObjectMetaApplyConfiguration.Annotations[k] = v + } + return b +} + +// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the OwnerReferences field. +func (b *ConsoleSampleApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *ConsoleSampleApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + for i := range values { + if values[i] == nil { + panic("nil value passed to WithOwnerReferences") + } + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) + } + return b +} + +// WithFinalizers adds the given value to the Finalizers field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Finalizers field. +func (b *ConsoleSampleApplyConfiguration) WithFinalizers(values ...string) *ConsoleSampleApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + for i := range values { + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) + } + return b +} + +func (b *ConsoleSampleApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { + if b.ObjectMetaApplyConfiguration == nil { + b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} + } +} + +// WithSpec sets the Spec field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Spec field is set to the value of the last call. +func (b *ConsoleSampleApplyConfiguration) WithSpec(value *ConsoleSampleSpecApplyConfiguration) *ConsoleSampleApplyConfiguration { + b.Spec = value + return b +} + +// GetKind retrieves the value of the Kind field in the declarative configuration. +func (b *ConsoleSampleApplyConfiguration) GetKind() *string { + return b.TypeMetaApplyConfiguration.Kind +} + +// GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration. +func (b *ConsoleSampleApplyConfiguration) GetAPIVersion() *string { + return b.TypeMetaApplyConfiguration.APIVersion +} + +// GetName retrieves the value of the Name field in the declarative configuration. +func (b *ConsoleSampleApplyConfiguration) GetName() *string { + b.ensureObjectMetaApplyConfigurationExists() + return b.ObjectMetaApplyConfiguration.Name +} + +// GetNamespace retrieves the value of the Namespace field in the declarative configuration. +func (b *ConsoleSampleApplyConfiguration) GetNamespace() *string { + b.ensureObjectMetaApplyConfigurationExists() + return b.ObjectMetaApplyConfiguration.Namespace +} diff --git a/vendor/github.com/openshift/client-go/console/applyconfigurations/console/v1/consolesamplecontainerimportsource.go b/vendor/github.com/openshift/client-go/console/applyconfigurations/console/v1/consolesamplecontainerimportsource.go new file mode 100644 index 000000000..fce5e497c --- /dev/null +++ b/vendor/github.com/openshift/client-go/console/applyconfigurations/console/v1/consolesamplecontainerimportsource.go @@ -0,0 +1,45 @@ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1 + +// ConsoleSampleContainerImportSourceApplyConfiguration represents a declarative configuration of the ConsoleSampleContainerImportSource type for use +// with apply. +// +// ConsoleSampleContainerImportSource let the user import a container image. +type ConsoleSampleContainerImportSourceApplyConfiguration struct { + // reference to a container image that provides a HTTP service. + // The service must be exposed on the default port (8080) unless + // otherwise configured with the port field. + // + // Supported formats: + // - / + // - docker.io// + // - quay.io// + // - quay.io//@sha256: + // - quay.io//: + Image *string `json:"image,omitempty"` + // service contains configuration for the Service resource created for this sample. + Service *ConsoleSampleContainerImportSourceServiceApplyConfiguration `json:"service,omitempty"` +} + +// ConsoleSampleContainerImportSourceApplyConfiguration constructs a declarative configuration of the ConsoleSampleContainerImportSource type for use with +// apply. +func ConsoleSampleContainerImportSource() *ConsoleSampleContainerImportSourceApplyConfiguration { + return &ConsoleSampleContainerImportSourceApplyConfiguration{} +} + +// WithImage sets the Image field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Image field is set to the value of the last call. +func (b *ConsoleSampleContainerImportSourceApplyConfiguration) WithImage(value string) *ConsoleSampleContainerImportSourceApplyConfiguration { + b.Image = &value + return b +} + +// WithService sets the Service field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Service field is set to the value of the last call. +func (b *ConsoleSampleContainerImportSourceApplyConfiguration) WithService(value *ConsoleSampleContainerImportSourceServiceApplyConfiguration) *ConsoleSampleContainerImportSourceApplyConfiguration { + b.Service = value + return b +} diff --git a/vendor/github.com/openshift/client-go/console/applyconfigurations/console/v1/consolesamplecontainerimportsourceservice.go b/vendor/github.com/openshift/client-go/console/applyconfigurations/console/v1/consolesamplecontainerimportsourceservice.go new file mode 100644 index 000000000..d574f292b --- /dev/null +++ b/vendor/github.com/openshift/client-go/console/applyconfigurations/console/v1/consolesamplecontainerimportsourceservice.go @@ -0,0 +1,30 @@ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1 + +// ConsoleSampleContainerImportSourceServiceApplyConfiguration represents a declarative configuration of the ConsoleSampleContainerImportSourceService type for use +// with apply. +// +// ConsoleSampleContainerImportSourceService let the samples author define defaults +// for the Service created for this sample. +type ConsoleSampleContainerImportSourceServiceApplyConfiguration struct { + // targetPort is the port that the service listens on for HTTP requests. + // This port will be used for Service and Route created for this sample. + // Port must be in the range 1 to 65535. + // Default port is 8080. + TargetPort *int32 `json:"targetPort,omitempty"` +} + +// ConsoleSampleContainerImportSourceServiceApplyConfiguration constructs a declarative configuration of the ConsoleSampleContainerImportSourceService type for use with +// apply. +func ConsoleSampleContainerImportSourceService() *ConsoleSampleContainerImportSourceServiceApplyConfiguration { + return &ConsoleSampleContainerImportSourceServiceApplyConfiguration{} +} + +// WithTargetPort sets the TargetPort field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the TargetPort field is set to the value of the last call. +func (b *ConsoleSampleContainerImportSourceServiceApplyConfiguration) WithTargetPort(value int32) *ConsoleSampleContainerImportSourceServiceApplyConfiguration { + b.TargetPort = &value + return b +} diff --git a/vendor/github.com/openshift/client-go/console/applyconfigurations/console/v1/consolesamplegitimportsource.go b/vendor/github.com/openshift/client-go/console/applyconfigurations/console/v1/consolesamplegitimportsource.go new file mode 100644 index 000000000..f7cd78f50 --- /dev/null +++ b/vendor/github.com/openshift/client-go/console/applyconfigurations/console/v1/consolesamplegitimportsource.go @@ -0,0 +1,36 @@ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1 + +// ConsoleSampleGitImportSourceApplyConfiguration represents a declarative configuration of the ConsoleSampleGitImportSource type for use +// with apply. +// +// ConsoleSampleGitImportSource let the user import code from a public Git repository. +type ConsoleSampleGitImportSourceApplyConfiguration struct { + // repository contains the reference to the actual Git repository. + Repository *ConsoleSampleGitImportSourceRepositoryApplyConfiguration `json:"repository,omitempty"` + // service contains configuration for the Service resource created for this sample. + Service *ConsoleSampleGitImportSourceServiceApplyConfiguration `json:"service,omitempty"` +} + +// ConsoleSampleGitImportSourceApplyConfiguration constructs a declarative configuration of the ConsoleSampleGitImportSource type for use with +// apply. +func ConsoleSampleGitImportSource() *ConsoleSampleGitImportSourceApplyConfiguration { + return &ConsoleSampleGitImportSourceApplyConfiguration{} +} + +// WithRepository sets the Repository field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Repository field is set to the value of the last call. +func (b *ConsoleSampleGitImportSourceApplyConfiguration) WithRepository(value *ConsoleSampleGitImportSourceRepositoryApplyConfiguration) *ConsoleSampleGitImportSourceApplyConfiguration { + b.Repository = value + return b +} + +// WithService sets the Service field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Service field is set to the value of the last call. +func (b *ConsoleSampleGitImportSourceApplyConfiguration) WithService(value *ConsoleSampleGitImportSourceServiceApplyConfiguration) *ConsoleSampleGitImportSourceApplyConfiguration { + b.Service = value + return b +} diff --git a/vendor/github.com/openshift/client-go/console/applyconfigurations/console/v1/consolesamplegitimportsourcerepository.go b/vendor/github.com/openshift/client-go/console/applyconfigurations/console/v1/consolesamplegitimportsourcerepository.go new file mode 100644 index 000000000..8436f2d93 --- /dev/null +++ b/vendor/github.com/openshift/client-go/console/applyconfigurations/console/v1/consolesamplegitimportsourcerepository.go @@ -0,0 +1,62 @@ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1 + +// ConsoleSampleGitImportSourceRepositoryApplyConfiguration represents a declarative configuration of the ConsoleSampleGitImportSourceRepository type for use +// with apply. +// +// ConsoleSampleGitImportSourceRepository let the user import code from a public git repository. +type ConsoleSampleGitImportSourceRepositoryApplyConfiguration struct { + // url of the Git repository that contains a HTTP service. + // The HTTP service must be exposed on the default port (8080) unless + // otherwise configured with the port field. + // + // Only public repositories on GitHub, GitLab and Bitbucket are currently supported: + // + // - https://github.com// + // - https://gitlab.com// + // - https://bitbucket.org// + // + // The url must have a maximum length of 256 characters. + URL *string `json:"url,omitempty"` + // revision is the git revision at which to clone the git repository + // Can be used to clone a specific branch, tag or commit SHA. + // Must be at most 256 characters in length. + // When omitted the repository's default branch is used. + Revision *string `json:"revision,omitempty"` + // contextDir is used to specify a directory within the repository to build the + // component. + // Must start with `/` and have a maximum length of 256 characters. + // When omitted, the default value is to build from the root of the repository. + ContextDir *string `json:"contextDir,omitempty"` +} + +// ConsoleSampleGitImportSourceRepositoryApplyConfiguration constructs a declarative configuration of the ConsoleSampleGitImportSourceRepository type for use with +// apply. +func ConsoleSampleGitImportSourceRepository() *ConsoleSampleGitImportSourceRepositoryApplyConfiguration { + return &ConsoleSampleGitImportSourceRepositoryApplyConfiguration{} +} + +// WithURL sets the URL field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the URL field is set to the value of the last call. +func (b *ConsoleSampleGitImportSourceRepositoryApplyConfiguration) WithURL(value string) *ConsoleSampleGitImportSourceRepositoryApplyConfiguration { + b.URL = &value + return b +} + +// WithRevision sets the Revision field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Revision field is set to the value of the last call. +func (b *ConsoleSampleGitImportSourceRepositoryApplyConfiguration) WithRevision(value string) *ConsoleSampleGitImportSourceRepositoryApplyConfiguration { + b.Revision = &value + return b +} + +// WithContextDir sets the ContextDir field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ContextDir field is set to the value of the last call. +func (b *ConsoleSampleGitImportSourceRepositoryApplyConfiguration) WithContextDir(value string) *ConsoleSampleGitImportSourceRepositoryApplyConfiguration { + b.ContextDir = &value + return b +} diff --git a/vendor/github.com/openshift/client-go/console/applyconfigurations/console/v1/consolesamplegitimportsourceservice.go b/vendor/github.com/openshift/client-go/console/applyconfigurations/console/v1/consolesamplegitimportsourceservice.go new file mode 100644 index 000000000..e77294af9 --- /dev/null +++ b/vendor/github.com/openshift/client-go/console/applyconfigurations/console/v1/consolesamplegitimportsourceservice.go @@ -0,0 +1,30 @@ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1 + +// ConsoleSampleGitImportSourceServiceApplyConfiguration represents a declarative configuration of the ConsoleSampleGitImportSourceService type for use +// with apply. +// +// ConsoleSampleGitImportSourceService let the samples author define defaults +// for the Service created for this sample. +type ConsoleSampleGitImportSourceServiceApplyConfiguration struct { + // targetPort is the port that the service listens on for HTTP requests. + // This port will be used for Service created for this sample. + // Port must be in the range 1 to 65535. + // Default port is 8080. + TargetPort *int32 `json:"targetPort,omitempty"` +} + +// ConsoleSampleGitImportSourceServiceApplyConfiguration constructs a declarative configuration of the ConsoleSampleGitImportSourceService type for use with +// apply. +func ConsoleSampleGitImportSourceService() *ConsoleSampleGitImportSourceServiceApplyConfiguration { + return &ConsoleSampleGitImportSourceServiceApplyConfiguration{} +} + +// WithTargetPort sets the TargetPort field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the TargetPort field is set to the value of the last call. +func (b *ConsoleSampleGitImportSourceServiceApplyConfiguration) WithTargetPort(value int32) *ConsoleSampleGitImportSourceServiceApplyConfiguration { + b.TargetPort = &value + return b +} diff --git a/vendor/github.com/openshift/client-go/console/applyconfigurations/console/v1/consolesamplesource.go b/vendor/github.com/openshift/client-go/console/applyconfigurations/console/v1/consolesamplesource.go new file mode 100644 index 000000000..af0e945f1 --- /dev/null +++ b/vendor/github.com/openshift/client-go/console/applyconfigurations/console/v1/consolesamplesource.go @@ -0,0 +1,51 @@ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1 + +import ( + consolev1 "github.com/openshift/api/console/v1" +) + +// ConsoleSampleSourceApplyConfiguration represents a declarative configuration of the ConsoleSampleSource type for use +// with apply. +// +// ConsoleSampleSource is the actual sample definition and can hold different sample types. +// Unsupported sample types will be ignored in the web console. +type ConsoleSampleSourceApplyConfiguration struct { + // type of the sample, currently supported: "GitImport";"ContainerImport" + Type *consolev1.ConsoleSampleSourceType `json:"type,omitempty"` + // gitImport allows the user to import code from a git repository. + GitImport *ConsoleSampleGitImportSourceApplyConfiguration `json:"gitImport,omitempty"` + // containerImport allows the user import a container image. + ContainerImport *ConsoleSampleContainerImportSourceApplyConfiguration `json:"containerImport,omitempty"` +} + +// ConsoleSampleSourceApplyConfiguration constructs a declarative configuration of the ConsoleSampleSource type for use with +// apply. +func ConsoleSampleSource() *ConsoleSampleSourceApplyConfiguration { + return &ConsoleSampleSourceApplyConfiguration{} +} + +// WithType sets the Type field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Type field is set to the value of the last call. +func (b *ConsoleSampleSourceApplyConfiguration) WithType(value consolev1.ConsoleSampleSourceType) *ConsoleSampleSourceApplyConfiguration { + b.Type = &value + return b +} + +// WithGitImport sets the GitImport field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the GitImport field is set to the value of the last call. +func (b *ConsoleSampleSourceApplyConfiguration) WithGitImport(value *ConsoleSampleGitImportSourceApplyConfiguration) *ConsoleSampleSourceApplyConfiguration { + b.GitImport = value + return b +} + +// WithContainerImport sets the ContainerImport field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ContainerImport field is set to the value of the last call. +func (b *ConsoleSampleSourceApplyConfiguration) WithContainerImport(value *ConsoleSampleContainerImportSourceApplyConfiguration) *ConsoleSampleSourceApplyConfiguration { + b.ContainerImport = value + return b +} diff --git a/vendor/github.com/openshift/client-go/console/applyconfigurations/console/v1/consolesamplespec.go b/vendor/github.com/openshift/client-go/console/applyconfigurations/console/v1/consolesamplespec.go new file mode 100644 index 000000000..fed5cf891 --- /dev/null +++ b/vendor/github.com/openshift/client-go/console/applyconfigurations/console/v1/consolesamplespec.go @@ -0,0 +1,147 @@ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1 + +// ConsoleSampleSpecApplyConfiguration represents a declarative configuration of the ConsoleSampleSpec type for use +// with apply. +// +// ConsoleSampleSpec is the desired sample for the web console. +// Samples will appear with their title, descriptions and a badge in a samples catalog. +type ConsoleSampleSpecApplyConfiguration struct { + // title is the display name of the sample. + // + // It is required and must be no more than 50 characters in length. + Title *string `json:"title,omitempty"` + // abstract is a short introduction to the sample. + // + // It is required and must be no more than 100 characters in length. + // + // The abstract is shown on the sample card tile below the title and provider + // and is limited to three lines of content. + Abstract *string `json:"abstract,omitempty"` + // description is a long form explanation of the sample. + // + // It is required and can have a maximum length of **4096** characters. + // + // It is a README.md-like content for additional information, links, pre-conditions, and other instructions. + // It will be rendered as Markdown so that it can contain line breaks, links, and other simple formatting. + Description *string `json:"description,omitempty"` + // icon is an optional base64 encoded image and shown beside the sample title. + // + // The format must follow the data: URL format and can have a maximum size of **10 KB**. + // + // data:[][;base64], + // + // For example: + // + // data:image;base64, plus the base64 encoded image. + // + // Vector images can also be used. SVG icons must start with: + // + // data:image/svg+xml;base64, plus the base64 encoded SVG image. + // + // All sample catalog icons will be shown on a white background (also when the dark theme is used). + // The web console ensures that different aspect ratios work correctly. + // Currently, the surface of the icon is at most 40x100px. + // + // For more information on the data URL format, please visit + // https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URLs. + Icon *string `json:"icon,omitempty"` + // type is an optional label to group multiple samples. + // + // It is optional and must be no more than 20 characters in length. + // + // Recommendation is a singular term like "Builder Image", "Devfile" or "Serverless Function". + // + // Currently, the type is shown a badge on the sample card tile in the top right corner. + Type *string `json:"type,omitempty"` + // provider is an optional label to honor who provides the sample. + // + // It is optional and must be no more than 50 characters in length. + // + // A provider can be a company like "Red Hat" or an organization like "CNCF" or "Knative". + // + // Currently, the provider is only shown on the sample card tile below the title with the prefix "Provided by " + Provider *string `json:"provider,omitempty"` + // tags are optional string values that can be used to find samples in the samples catalog. + // + // Examples of common tags may be "Java", "Quarkus", etc. + // + // They will be displayed on the samples details page. + Tags []string `json:"tags,omitempty"` + // source defines where to deploy the sample service from. + // The sample may be sourced from an external git repository or container image. + Source *ConsoleSampleSourceApplyConfiguration `json:"source,omitempty"` +} + +// ConsoleSampleSpecApplyConfiguration constructs a declarative configuration of the ConsoleSampleSpec type for use with +// apply. +func ConsoleSampleSpec() *ConsoleSampleSpecApplyConfiguration { + return &ConsoleSampleSpecApplyConfiguration{} +} + +// WithTitle sets the Title field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Title field is set to the value of the last call. +func (b *ConsoleSampleSpecApplyConfiguration) WithTitle(value string) *ConsoleSampleSpecApplyConfiguration { + b.Title = &value + return b +} + +// WithAbstract sets the Abstract field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Abstract field is set to the value of the last call. +func (b *ConsoleSampleSpecApplyConfiguration) WithAbstract(value string) *ConsoleSampleSpecApplyConfiguration { + b.Abstract = &value + return b +} + +// WithDescription sets the Description field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Description field is set to the value of the last call. +func (b *ConsoleSampleSpecApplyConfiguration) WithDescription(value string) *ConsoleSampleSpecApplyConfiguration { + b.Description = &value + return b +} + +// WithIcon sets the Icon field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Icon field is set to the value of the last call. +func (b *ConsoleSampleSpecApplyConfiguration) WithIcon(value string) *ConsoleSampleSpecApplyConfiguration { + b.Icon = &value + return b +} + +// WithType sets the Type field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Type field is set to the value of the last call. +func (b *ConsoleSampleSpecApplyConfiguration) WithType(value string) *ConsoleSampleSpecApplyConfiguration { + b.Type = &value + return b +} + +// WithProvider sets the Provider field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Provider field is set to the value of the last call. +func (b *ConsoleSampleSpecApplyConfiguration) WithProvider(value string) *ConsoleSampleSpecApplyConfiguration { + b.Provider = &value + return b +} + +// WithTags adds the given value to the Tags field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Tags field. +func (b *ConsoleSampleSpecApplyConfiguration) WithTags(values ...string) *ConsoleSampleSpecApplyConfiguration { + for i := range values { + b.Tags = append(b.Tags, values[i]) + } + return b +} + +// WithSource sets the Source field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Source field is set to the value of the last call. +func (b *ConsoleSampleSpecApplyConfiguration) WithSource(value *ConsoleSampleSourceApplyConfiguration) *ConsoleSampleSpecApplyConfiguration { + b.Source = value + return b +} diff --git a/vendor/github.com/openshift/client-go/console/applyconfigurations/console/v1/consoleyamlsample.go b/vendor/github.com/openshift/client-go/console/applyconfigurations/console/v1/consoleyamlsample.go new file mode 100644 index 000000000..bdf91a674 --- /dev/null +++ b/vendor/github.com/openshift/client-go/console/applyconfigurations/console/v1/consoleyamlsample.go @@ -0,0 +1,260 @@ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1 + +import ( + consolev1 "github.com/openshift/api/console/v1" + internal "github.com/openshift/client-go/console/applyconfigurations/internal" + apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + managedfields "k8s.io/apimachinery/pkg/util/managedfields" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" +) + +// ConsoleYAMLSampleApplyConfiguration represents a declarative configuration of the ConsoleYAMLSample type for use +// with apply. +// +// ConsoleYAMLSample is an extension for customizing OpenShift web console YAML samples. +// +// Compatibility level 2: Stable within a major release for a minimum of 9 months or 3 minor releases (whichever is longer). +type ConsoleYAMLSampleApplyConfiguration struct { + metav1.TypeMetaApplyConfiguration `json:",inline"` + // metadata is the standard object's metadata. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Spec *ConsoleYAMLSampleSpecApplyConfiguration `json:"spec,omitempty"` +} + +// ConsoleYAMLSample constructs a declarative configuration of the ConsoleYAMLSample type for use with +// apply. +func ConsoleYAMLSample(name string) *ConsoleYAMLSampleApplyConfiguration { + b := &ConsoleYAMLSampleApplyConfiguration{} + b.WithName(name) + b.WithKind("ConsoleYAMLSample") + b.WithAPIVersion("console.openshift.io/v1") + return b +} + +// ExtractConsoleYAMLSampleFrom extracts the applied configuration owned by fieldManager from +// consoleYAMLSample for the specified subresource. Pass an empty string for subresource to extract +// the main resource. Common subresources include "status", "scale", etc. +// consoleYAMLSample must be a unmodified ConsoleYAMLSample API object that was retrieved from the Kubernetes API. +// ExtractConsoleYAMLSampleFrom provides a way to perform a extract/modify-in-place/apply workflow. +// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously +// applied if another fieldManager has updated or force applied any of the previously applied fields. +func ExtractConsoleYAMLSampleFrom(consoleYAMLSample *consolev1.ConsoleYAMLSample, fieldManager string, subresource string) (*ConsoleYAMLSampleApplyConfiguration, error) { + b := &ConsoleYAMLSampleApplyConfiguration{} + err := managedfields.ExtractInto(consoleYAMLSample, internal.Parser().Type("com.github.openshift.api.console.v1.ConsoleYAMLSample"), fieldManager, b, subresource) + if err != nil { + return nil, err + } + b.WithName(consoleYAMLSample.Name) + + b.WithKind("ConsoleYAMLSample") + b.WithAPIVersion("console.openshift.io/v1") + return b, nil +} + +// ExtractConsoleYAMLSample extracts the applied configuration owned by fieldManager from +// consoleYAMLSample. If no managedFields are found in consoleYAMLSample for fieldManager, a +// ConsoleYAMLSampleApplyConfiguration is returned with only the Name, Namespace (if applicable), +// APIVersion and Kind populated. It is possible that no managed fields were found for because other +// field managers have taken ownership of all the fields previously owned by fieldManager, or because +// the fieldManager never owned fields any fields. +// consoleYAMLSample must be a unmodified ConsoleYAMLSample API object that was retrieved from the Kubernetes API. +// ExtractConsoleYAMLSample provides a way to perform a extract/modify-in-place/apply workflow. +// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously +// applied if another fieldManager has updated or force applied any of the previously applied fields. +func ExtractConsoleYAMLSample(consoleYAMLSample *consolev1.ConsoleYAMLSample, fieldManager string) (*ConsoleYAMLSampleApplyConfiguration, error) { + return ExtractConsoleYAMLSampleFrom(consoleYAMLSample, fieldManager, "") +} + +func (b ConsoleYAMLSampleApplyConfiguration) IsApplyConfiguration() {} + +// WithKind sets the Kind field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Kind field is set to the value of the last call. +func (b *ConsoleYAMLSampleApplyConfiguration) WithKind(value string) *ConsoleYAMLSampleApplyConfiguration { + b.TypeMetaApplyConfiguration.Kind = &value + return b +} + +// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the APIVersion field is set to the value of the last call. +func (b *ConsoleYAMLSampleApplyConfiguration) WithAPIVersion(value string) *ConsoleYAMLSampleApplyConfiguration { + b.TypeMetaApplyConfiguration.APIVersion = &value + return b +} + +// WithName sets the Name field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Name field is set to the value of the last call. +func (b *ConsoleYAMLSampleApplyConfiguration) WithName(value string) *ConsoleYAMLSampleApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.Name = &value + return b +} + +// WithGenerateName sets the GenerateName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the GenerateName field is set to the value of the last call. +func (b *ConsoleYAMLSampleApplyConfiguration) WithGenerateName(value string) *ConsoleYAMLSampleApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.GenerateName = &value + return b +} + +// WithNamespace sets the Namespace field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Namespace field is set to the value of the last call. +func (b *ConsoleYAMLSampleApplyConfiguration) WithNamespace(value string) *ConsoleYAMLSampleApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.Namespace = &value + return b +} + +// WithUID sets the UID field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the UID field is set to the value of the last call. +func (b *ConsoleYAMLSampleApplyConfiguration) WithUID(value types.UID) *ConsoleYAMLSampleApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.UID = &value + return b +} + +// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ResourceVersion field is set to the value of the last call. +func (b *ConsoleYAMLSampleApplyConfiguration) WithResourceVersion(value string) *ConsoleYAMLSampleApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.ResourceVersion = &value + return b +} + +// WithGeneration sets the Generation field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Generation field is set to the value of the last call. +func (b *ConsoleYAMLSampleApplyConfiguration) WithGeneration(value int64) *ConsoleYAMLSampleApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.Generation = &value + return b +} + +// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the CreationTimestamp field is set to the value of the last call. +func (b *ConsoleYAMLSampleApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *ConsoleYAMLSampleApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value + return b +} + +// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DeletionTimestamp field is set to the value of the last call. +func (b *ConsoleYAMLSampleApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *ConsoleYAMLSampleApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value + return b +} + +// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. +func (b *ConsoleYAMLSampleApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *ConsoleYAMLSampleApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value + return b +} + +// WithLabels puts the entries into the Labels field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Labels field, +// overwriting an existing map entries in Labels field with the same key. +func (b *ConsoleYAMLSampleApplyConfiguration) WithLabels(entries map[string]string) *ConsoleYAMLSampleApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.ObjectMetaApplyConfiguration.Labels[k] = v + } + return b +} + +// WithAnnotations puts the entries into the Annotations field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Annotations field, +// overwriting an existing map entries in Annotations field with the same key. +func (b *ConsoleYAMLSampleApplyConfiguration) WithAnnotations(entries map[string]string) *ConsoleYAMLSampleApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.ObjectMetaApplyConfiguration.Annotations[k] = v + } + return b +} + +// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the OwnerReferences field. +func (b *ConsoleYAMLSampleApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *ConsoleYAMLSampleApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + for i := range values { + if values[i] == nil { + panic("nil value passed to WithOwnerReferences") + } + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) + } + return b +} + +// WithFinalizers adds the given value to the Finalizers field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Finalizers field. +func (b *ConsoleYAMLSampleApplyConfiguration) WithFinalizers(values ...string) *ConsoleYAMLSampleApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + for i := range values { + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) + } + return b +} + +func (b *ConsoleYAMLSampleApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { + if b.ObjectMetaApplyConfiguration == nil { + b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} + } +} + +// WithSpec sets the Spec field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Spec field is set to the value of the last call. +func (b *ConsoleYAMLSampleApplyConfiguration) WithSpec(value *ConsoleYAMLSampleSpecApplyConfiguration) *ConsoleYAMLSampleApplyConfiguration { + b.Spec = value + return b +} + +// GetKind retrieves the value of the Kind field in the declarative configuration. +func (b *ConsoleYAMLSampleApplyConfiguration) GetKind() *string { + return b.TypeMetaApplyConfiguration.Kind +} + +// GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration. +func (b *ConsoleYAMLSampleApplyConfiguration) GetAPIVersion() *string { + return b.TypeMetaApplyConfiguration.APIVersion +} + +// GetName retrieves the value of the Name field in the declarative configuration. +func (b *ConsoleYAMLSampleApplyConfiguration) GetName() *string { + b.ensureObjectMetaApplyConfigurationExists() + return b.ObjectMetaApplyConfiguration.Name +} + +// GetNamespace retrieves the value of the Namespace field in the declarative configuration. +func (b *ConsoleYAMLSampleApplyConfiguration) GetNamespace() *string { + b.ensureObjectMetaApplyConfigurationExists() + return b.ObjectMetaApplyConfiguration.Namespace +} diff --git a/vendor/github.com/openshift/client-go/console/applyconfigurations/console/v1/consoleyamlsamplespec.go b/vendor/github.com/openshift/client-go/console/applyconfigurations/console/v1/consoleyamlsamplespec.go new file mode 100644 index 000000000..95f790f14 --- /dev/null +++ b/vendor/github.com/openshift/client-go/console/applyconfigurations/console/v1/consoleyamlsamplespec.go @@ -0,0 +1,76 @@ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1 + +import ( + consolev1 "github.com/openshift/api/console/v1" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" +) + +// ConsoleYAMLSampleSpecApplyConfiguration represents a declarative configuration of the ConsoleYAMLSampleSpec type for use +// with apply. +// +// ConsoleYAMLSampleSpec is the desired YAML sample configuration. +// Samples will appear with their descriptions in a samples sidebar +// when creating a resources in the web console. +type ConsoleYAMLSampleSpecApplyConfiguration struct { + // targetResource contains apiVersion and kind of the resource + // YAML sample is representating. + TargetResource *metav1.TypeMetaApplyConfiguration `json:"targetResource,omitempty"` + // title of the YAML sample. + Title *consolev1.ConsoleYAMLSampleTitle `json:"title,omitempty"` + // description of the YAML sample. + Description *consolev1.ConsoleYAMLSampleDescription `json:"description,omitempty"` + // yaml is the YAML sample to display. + YAML *consolev1.ConsoleYAMLSampleYAML `json:"yaml,omitempty"` + // snippet indicates that the YAML sample is not the full YAML resource + // definition, but a fragment that can be inserted into the existing + // YAML document at the user's cursor. + Snippet *bool `json:"snippet,omitempty"` +} + +// ConsoleYAMLSampleSpecApplyConfiguration constructs a declarative configuration of the ConsoleYAMLSampleSpec type for use with +// apply. +func ConsoleYAMLSampleSpec() *ConsoleYAMLSampleSpecApplyConfiguration { + return &ConsoleYAMLSampleSpecApplyConfiguration{} +} + +// WithTargetResource sets the TargetResource field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the TargetResource field is set to the value of the last call. +func (b *ConsoleYAMLSampleSpecApplyConfiguration) WithTargetResource(value *metav1.TypeMetaApplyConfiguration) *ConsoleYAMLSampleSpecApplyConfiguration { + b.TargetResource = value + return b +} + +// WithTitle sets the Title field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Title field is set to the value of the last call. +func (b *ConsoleYAMLSampleSpecApplyConfiguration) WithTitle(value consolev1.ConsoleYAMLSampleTitle) *ConsoleYAMLSampleSpecApplyConfiguration { + b.Title = &value + return b +} + +// WithDescription sets the Description field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Description field is set to the value of the last call. +func (b *ConsoleYAMLSampleSpecApplyConfiguration) WithDescription(value consolev1.ConsoleYAMLSampleDescription) *ConsoleYAMLSampleSpecApplyConfiguration { + b.Description = &value + return b +} + +// WithYAML sets the YAML field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the YAML field is set to the value of the last call. +func (b *ConsoleYAMLSampleSpecApplyConfiguration) WithYAML(value consolev1.ConsoleYAMLSampleYAML) *ConsoleYAMLSampleSpecApplyConfiguration { + b.YAML = &value + return b +} + +// WithSnippet sets the Snippet field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Snippet field is set to the value of the last call. +func (b *ConsoleYAMLSampleSpecApplyConfiguration) WithSnippet(value bool) *ConsoleYAMLSampleSpecApplyConfiguration { + b.Snippet = &value + return b +} diff --git a/vendor/github.com/openshift/client-go/console/applyconfigurations/console/v1/link.go b/vendor/github.com/openshift/client-go/console/applyconfigurations/console/v1/link.go new file mode 100644 index 000000000..3d1bc55fe --- /dev/null +++ b/vendor/github.com/openshift/client-go/console/applyconfigurations/console/v1/link.go @@ -0,0 +1,36 @@ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1 + +// LinkApplyConfiguration represents a declarative configuration of the Link type for use +// with apply. +// +// Represents a standard link that could be generated in HTML +type LinkApplyConfiguration struct { + // text is the display text for the link + Text *string `json:"text,omitempty"` + // href is the absolute URL for the link. Must use https:// for web URLs or mailto: for email links. + Href *string `json:"href,omitempty"` +} + +// LinkApplyConfiguration constructs a declarative configuration of the Link type for use with +// apply. +func Link() *LinkApplyConfiguration { + return &LinkApplyConfiguration{} +} + +// WithText sets the Text field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Text field is set to the value of the last call. +func (b *LinkApplyConfiguration) WithText(value string) *LinkApplyConfiguration { + b.Text = &value + return b +} + +// WithHref sets the Href field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Href field is set to the value of the last call. +func (b *LinkApplyConfiguration) WithHref(value string) *LinkApplyConfiguration { + b.Href = &value + return b +} diff --git a/vendor/github.com/openshift/client-go/console/applyconfigurations/console/v1/namespacedashboardspec.go b/vendor/github.com/openshift/client-go/console/applyconfigurations/console/v1/namespacedashboardspec.go new file mode 100644 index 000000000..aa5c05596 --- /dev/null +++ b/vendor/github.com/openshift/client-go/console/applyconfigurations/console/v1/namespacedashboardspec.go @@ -0,0 +1,44 @@ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1 + +import ( + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" +) + +// NamespaceDashboardSpecApplyConfiguration represents a declarative configuration of the NamespaceDashboardSpec type for use +// with apply. +// +// NamespaceDashboardSpec is a specification of namespaces in which the dashboard link should appear. +// If both namespaces and namespaceSelector are specified, the link will appear in namespaces that match either +type NamespaceDashboardSpecApplyConfiguration struct { + // namespaces is an array of namespace names in which the dashboard link should appear. + Namespaces []string `json:"namespaces,omitempty"` + // namespaceSelector is used to select the Namespaces that should contain dashboard link by label. + // If the namespace labels match, dashboard link will be shown for the namespaces. + NamespaceSelector *metav1.LabelSelectorApplyConfiguration `json:"namespaceSelector,omitempty"` +} + +// NamespaceDashboardSpecApplyConfiguration constructs a declarative configuration of the NamespaceDashboardSpec type for use with +// apply. +func NamespaceDashboardSpec() *NamespaceDashboardSpecApplyConfiguration { + return &NamespaceDashboardSpecApplyConfiguration{} +} + +// WithNamespaces adds the given value to the Namespaces field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Namespaces field. +func (b *NamespaceDashboardSpecApplyConfiguration) WithNamespaces(values ...string) *NamespaceDashboardSpecApplyConfiguration { + for i := range values { + b.Namespaces = append(b.Namespaces, values[i]) + } + return b +} + +// WithNamespaceSelector sets the NamespaceSelector field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the NamespaceSelector field is set to the value of the last call. +func (b *NamespaceDashboardSpecApplyConfiguration) WithNamespaceSelector(value *metav1.LabelSelectorApplyConfiguration) *NamespaceDashboardSpecApplyConfiguration { + b.NamespaceSelector = value + return b +} diff --git a/vendor/github.com/openshift/client-go/console/applyconfigurations/internal/internal.go b/vendor/github.com/openshift/client-go/console/applyconfigurations/internal/internal.go new file mode 100644 index 000000000..5772ea1ec --- /dev/null +++ b/vendor/github.com/openshift/client-go/console/applyconfigurations/internal/internal.go @@ -0,0 +1,888 @@ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package internal + +import ( + fmt "fmt" + sync "sync" + + typed "sigs.k8s.io/structured-merge-diff/v6/typed" +) + +func Parser() *typed.Parser { + parserOnce.Do(func() { + var err error + parser, err = typed.NewParser(schemaYAML) + if err != nil { + panic(fmt.Sprintf("Failed to parse schema: %v", err)) + } + }) + return parser +} + +var parserOnce sync.Once +var parser *typed.Parser +var schemaYAML = typed.YAMLObject(`types: +- name: FieldSelectorAttributes.v1.authorization.api.k8s.io + map: + fields: + - name: rawSelector + type: + scalar: string + - name: requirements + type: + list: + elementType: + namedType: FieldSelectorRequirement.v1.meta.apis.pkg.apimachinery.k8s.io + elementRelationship: atomic +- name: FieldSelectorRequirement.v1.meta.apis.pkg.apimachinery.k8s.io + map: + fields: + - name: key + type: + scalar: string + default: "" + - name: operator + type: + scalar: string + default: "" + - name: values + type: + list: + elementType: + scalar: string + elementRelationship: atomic +- name: FieldsV1.v1.meta.apis.pkg.apimachinery.k8s.io + map: + elementType: + scalar: untyped + list: + elementType: + namedType: __untyped_atomic_ + elementRelationship: atomic + map: + elementType: + namedType: __untyped_deduced_ + elementRelationship: separable +- name: LabelSelector.v1.meta.apis.pkg.apimachinery.k8s.io + map: + fields: + - name: matchExpressions + type: + list: + elementType: + namedType: LabelSelectorRequirement.v1.meta.apis.pkg.apimachinery.k8s.io + elementRelationship: atomic + - name: matchLabels + type: + map: + elementType: + scalar: string + elementRelationship: atomic +- name: LabelSelectorAttributes.v1.authorization.api.k8s.io + map: + fields: + - name: rawSelector + type: + scalar: string + - name: requirements + type: + list: + elementType: + namedType: LabelSelectorRequirement.v1.meta.apis.pkg.apimachinery.k8s.io + elementRelationship: atomic +- name: LabelSelectorRequirement.v1.meta.apis.pkg.apimachinery.k8s.io + map: + fields: + - name: key + type: + scalar: string + default: "" + - name: operator + type: + scalar: string + default: "" + - name: values + type: + list: + elementType: + scalar: string + elementRelationship: atomic +- name: ManagedFieldsEntry.v1.meta.apis.pkg.apimachinery.k8s.io + map: + fields: + - name: apiVersion + type: + scalar: string + - name: fieldsType + type: + scalar: string + - name: fieldsV1 + type: + namedType: FieldsV1.v1.meta.apis.pkg.apimachinery.k8s.io + - name: manager + type: + scalar: string + - name: operation + type: + scalar: string + - name: subresource + type: + scalar: string + - name: time + type: + namedType: Time.v1.meta.apis.pkg.apimachinery.k8s.io +- name: ObjectMeta.v1.meta.apis.pkg.apimachinery.k8s.io + map: + fields: + - name: annotations + type: + map: + elementType: + scalar: string + - name: creationTimestamp + type: + namedType: Time.v1.meta.apis.pkg.apimachinery.k8s.io + - name: deletionGracePeriodSeconds + type: + scalar: numeric + - name: deletionTimestamp + type: + namedType: Time.v1.meta.apis.pkg.apimachinery.k8s.io + - name: finalizers + type: + list: + elementType: + scalar: string + elementRelationship: associative + - name: generateName + type: + scalar: string + - name: generation + type: + scalar: numeric + - name: labels + type: + map: + elementType: + scalar: string + - name: managedFields + type: + list: + elementType: + namedType: ManagedFieldsEntry.v1.meta.apis.pkg.apimachinery.k8s.io + elementRelationship: atomic + - name: name + type: + scalar: string + - name: namespace + type: + scalar: string + - name: ownerReferences + type: + list: + elementType: + namedType: OwnerReference.v1.meta.apis.pkg.apimachinery.k8s.io + elementRelationship: associative + keys: + - uid + - name: resourceVersion + type: + scalar: string + - name: selfLink + type: + scalar: string + - name: uid + type: + scalar: string +- name: OwnerReference.v1.meta.apis.pkg.apimachinery.k8s.io + map: + fields: + - name: apiVersion + type: + scalar: string + default: "" + - name: blockOwnerDeletion + type: + scalar: boolean + - name: controller + type: + scalar: boolean + - name: kind + type: + scalar: string + default: "" + - name: name + type: + scalar: string + default: "" + - name: uid + type: + scalar: string + default: "" + elementRelationship: atomic +- name: ResourceAttributes.v1.authorization.api.k8s.io + map: + fields: + - name: fieldSelector + type: + namedType: FieldSelectorAttributes.v1.authorization.api.k8s.io + - name: group + type: + scalar: string + - name: labelSelector + type: + namedType: LabelSelectorAttributes.v1.authorization.api.k8s.io + - name: name + type: + scalar: string + - name: namespace + type: + scalar: string + - name: resource + type: + scalar: string + - name: subresource + type: + scalar: string + - name: verb + type: + scalar: string + - name: version + type: + scalar: string +- name: Time.v1.meta.apis.pkg.apimachinery.k8s.io + scalar: untyped +- name: TypeMeta.v1.meta.apis.pkg.apimachinery.k8s.io + map: + fields: + - name: apiVersion + type: + scalar: string + - name: kind + type: + scalar: string +- name: com.github.openshift.api.console.v1.ApplicationMenuSpec + map: + fields: + - name: imageURL + type: + scalar: string + - name: section + type: + scalar: string + default: "" +- name: com.github.openshift.api.console.v1.CLIDownloadLink + map: + fields: + - name: href + type: + scalar: string + default: "" + - name: text + type: + scalar: string + default: "" +- name: com.github.openshift.api.console.v1.ConsoleCLIDownload + map: + fields: + - name: apiVersion + type: + scalar: string + - name: kind + type: + scalar: string + - name: metadata + type: + namedType: ObjectMeta.v1.meta.apis.pkg.apimachinery.k8s.io + default: {} + - name: spec + type: + namedType: com.github.openshift.api.console.v1.ConsoleCLIDownloadSpec + default: {} +- name: com.github.openshift.api.console.v1.ConsoleCLIDownloadSpec + map: + fields: + - name: description + type: + scalar: string + default: "" + - name: displayName + type: + scalar: string + default: "" + - name: links + type: + list: + elementType: + namedType: com.github.openshift.api.console.v1.CLIDownloadLink + elementRelationship: atomic +- name: com.github.openshift.api.console.v1.ConsoleExternalLogLink + map: + fields: + - name: apiVersion + type: + scalar: string + - name: kind + type: + scalar: string + - name: metadata + type: + namedType: ObjectMeta.v1.meta.apis.pkg.apimachinery.k8s.io + default: {} + - name: spec + type: + namedType: com.github.openshift.api.console.v1.ConsoleExternalLogLinkSpec + default: {} +- name: com.github.openshift.api.console.v1.ConsoleExternalLogLinkSpec + map: + fields: + - name: hrefTemplate + type: + scalar: string + default: "" + - name: namespaceFilter + type: + scalar: string + - name: text + type: + scalar: string + default: "" +- name: com.github.openshift.api.console.v1.ConsoleLink + map: + fields: + - name: apiVersion + type: + scalar: string + - name: kind + type: + scalar: string + - name: metadata + type: + namedType: ObjectMeta.v1.meta.apis.pkg.apimachinery.k8s.io + default: {} + - name: spec + type: + namedType: com.github.openshift.api.console.v1.ConsoleLinkSpec + default: {} +- name: com.github.openshift.api.console.v1.ConsoleLinkSpec + map: + fields: + - name: applicationMenu + type: + namedType: com.github.openshift.api.console.v1.ApplicationMenuSpec + - name: href + type: + scalar: string + default: "" + - name: location + type: + scalar: string + default: "" + - name: namespaceDashboard + type: + namedType: com.github.openshift.api.console.v1.NamespaceDashboardSpec + - name: text + type: + scalar: string + default: "" +- name: com.github.openshift.api.console.v1.ConsoleNotification + map: + fields: + - name: apiVersion + type: + scalar: string + - name: kind + type: + scalar: string + - name: metadata + type: + namedType: ObjectMeta.v1.meta.apis.pkg.apimachinery.k8s.io + default: {} + - name: spec + type: + namedType: com.github.openshift.api.console.v1.ConsoleNotificationSpec + default: {} +- name: com.github.openshift.api.console.v1.ConsoleNotificationSpec + map: + fields: + - name: backgroundColor + type: + scalar: string + - name: color + type: + scalar: string + - name: link + type: + namedType: com.github.openshift.api.console.v1.Link + - name: location + type: + scalar: string + - name: text + type: + scalar: string + default: "" +- name: com.github.openshift.api.console.v1.ConsolePlugin + map: + fields: + - name: apiVersion + type: + scalar: string + - name: kind + type: + scalar: string + - name: metadata + type: + namedType: ObjectMeta.v1.meta.apis.pkg.apimachinery.k8s.io + default: {} + - name: spec + type: + namedType: com.github.openshift.api.console.v1.ConsolePluginSpec + default: {} +- name: com.github.openshift.api.console.v1.ConsolePluginBackend + map: + fields: + - name: service + type: + namedType: com.github.openshift.api.console.v1.ConsolePluginService + - name: type + type: + scalar: string + default: "" + unions: + - discriminator: type + fields: + - fieldName: service + discriminatorValue: Service +- name: com.github.openshift.api.console.v1.ConsolePluginCSP + map: + fields: + - name: directive + type: + scalar: string + default: "" + - name: values + type: + list: + elementType: + scalar: string + elementRelationship: atomic +- name: com.github.openshift.api.console.v1.ConsolePluginI18n + map: + fields: + - name: loadType + type: + scalar: string + default: "" +- name: com.github.openshift.api.console.v1.ConsolePluginProxy + map: + fields: + - name: alias + type: + scalar: string + default: "" + - name: authorization + type: + scalar: string + - name: caCertificate + type: + scalar: string + - name: endpoint + type: + namedType: com.github.openshift.api.console.v1.ConsolePluginProxyEndpoint + default: {} +- name: com.github.openshift.api.console.v1.ConsolePluginProxyEndpoint + map: + fields: + - name: service + type: + namedType: com.github.openshift.api.console.v1.ConsolePluginProxyServiceConfig + - name: type + type: + scalar: string + default: "" + unions: + - discriminator: type + fields: + - fieldName: service + discriminatorValue: Service +- name: com.github.openshift.api.console.v1.ConsolePluginProxyServiceConfig + map: + fields: + - name: name + type: + scalar: string + default: "" + - name: namespace + type: + scalar: string + default: "" + - name: port + type: + scalar: numeric + default: 0 +- name: com.github.openshift.api.console.v1.ConsolePluginService + map: + fields: + - name: basePath + type: + scalar: string + - name: name + type: + scalar: string + default: "" + - name: namespace + type: + scalar: string + default: "" + - name: port + type: + scalar: numeric + default: 0 +- name: com.github.openshift.api.console.v1.ConsolePluginSpec + map: + fields: + - name: backend + type: + namedType: com.github.openshift.api.console.v1.ConsolePluginBackend + default: {} + - name: contentSecurityPolicy + type: + list: + elementType: + namedType: com.github.openshift.api.console.v1.ConsolePluginCSP + elementRelationship: associative + keys: + - directive + - name: displayName + type: + scalar: string + default: "" + - name: i18n + type: + namedType: com.github.openshift.api.console.v1.ConsolePluginI18n + default: {} + - name: proxy + type: + list: + elementType: + namedType: com.github.openshift.api.console.v1.ConsolePluginProxy + elementRelationship: atomic +- name: com.github.openshift.api.console.v1.ConsoleQuickStart + map: + fields: + - name: apiVersion + type: + scalar: string + - name: kind + type: + scalar: string + - name: metadata + type: + namedType: ObjectMeta.v1.meta.apis.pkg.apimachinery.k8s.io + default: {} + - name: spec + type: + namedType: com.github.openshift.api.console.v1.ConsoleQuickStartSpec + default: {} +- name: com.github.openshift.api.console.v1.ConsoleQuickStartSpec + map: + fields: + - name: accessReviewResources + type: + list: + elementType: + namedType: ResourceAttributes.v1.authorization.api.k8s.io + elementRelationship: atomic + - name: conclusion + type: + scalar: string + - name: description + type: + scalar: string + default: "" + - name: displayName + type: + scalar: string + default: "" + - name: durationMinutes + type: + scalar: numeric + default: 0 + - name: icon + type: + scalar: string + - name: introduction + type: + scalar: string + default: "" + - name: nextQuickStart + type: + list: + elementType: + scalar: string + elementRelationship: atomic + - name: prerequisites + type: + list: + elementType: + scalar: string + elementRelationship: atomic + - name: tags + type: + list: + elementType: + scalar: string + elementRelationship: atomic + - name: tasks + type: + list: + elementType: + namedType: com.github.openshift.api.console.v1.ConsoleQuickStartTask + elementRelationship: atomic +- name: com.github.openshift.api.console.v1.ConsoleQuickStartTask + map: + fields: + - name: description + type: + scalar: string + default: "" + - name: review + type: + namedType: com.github.openshift.api.console.v1.ConsoleQuickStartTaskReview + - name: summary + type: + namedType: com.github.openshift.api.console.v1.ConsoleQuickStartTaskSummary + - name: title + type: + scalar: string + default: "" +- name: com.github.openshift.api.console.v1.ConsoleQuickStartTaskReview + map: + fields: + - name: failedTaskHelp + type: + scalar: string + default: "" + - name: instructions + type: + scalar: string + default: "" +- name: com.github.openshift.api.console.v1.ConsoleQuickStartTaskSummary + map: + fields: + - name: failed + type: + scalar: string + default: "" + - name: success + type: + scalar: string + default: "" +- name: com.github.openshift.api.console.v1.ConsoleSample + map: + fields: + - name: apiVersion + type: + scalar: string + - name: kind + type: + scalar: string + - name: metadata + type: + namedType: ObjectMeta.v1.meta.apis.pkg.apimachinery.k8s.io + default: {} + - name: spec + type: + namedType: com.github.openshift.api.console.v1.ConsoleSampleSpec + default: {} +- name: com.github.openshift.api.console.v1.ConsoleSampleContainerImportSource + map: + fields: + - name: image + type: + scalar: string + default: "" + - name: service + type: + namedType: com.github.openshift.api.console.v1.ConsoleSampleContainerImportSourceService + default: {} +- name: com.github.openshift.api.console.v1.ConsoleSampleContainerImportSourceService + map: + fields: + - name: targetPort + type: + scalar: numeric +- name: com.github.openshift.api.console.v1.ConsoleSampleGitImportSource + map: + fields: + - name: repository + type: + namedType: com.github.openshift.api.console.v1.ConsoleSampleGitImportSourceRepository + default: {} + - name: service + type: + namedType: com.github.openshift.api.console.v1.ConsoleSampleGitImportSourceService + default: {} +- name: com.github.openshift.api.console.v1.ConsoleSampleGitImportSourceRepository + map: + fields: + - name: contextDir + type: + scalar: string + default: "" + - name: revision + type: + scalar: string + default: "" + - name: url + type: + scalar: string + default: "" +- name: com.github.openshift.api.console.v1.ConsoleSampleGitImportSourceService + map: + fields: + - name: targetPort + type: + scalar: numeric +- name: com.github.openshift.api.console.v1.ConsoleSampleSource + map: + fields: + - name: containerImport + type: + namedType: com.github.openshift.api.console.v1.ConsoleSampleContainerImportSource + - name: gitImport + type: + namedType: com.github.openshift.api.console.v1.ConsoleSampleGitImportSource + - name: type + type: + scalar: string + default: "" + unions: + - discriminator: type + fields: + - fieldName: containerImport + discriminatorValue: ContainerImport + - fieldName: gitImport + discriminatorValue: GitImport +- name: com.github.openshift.api.console.v1.ConsoleSampleSpec + map: + fields: + - name: abstract + type: + scalar: string + default: "" + - name: description + type: + scalar: string + default: "" + - name: icon + type: + scalar: string + default: "" + - name: provider + type: + scalar: string + default: "" + - name: source + type: + namedType: com.github.openshift.api.console.v1.ConsoleSampleSource + default: {} + - name: tags + type: + list: + elementType: + scalar: string + elementRelationship: associative + - name: title + type: + scalar: string + default: "" + - name: type + type: + scalar: string + default: "" +- name: com.github.openshift.api.console.v1.ConsoleYAMLSample + map: + fields: + - name: apiVersion + type: + scalar: string + - name: kind + type: + scalar: string + - name: metadata + type: + namedType: ObjectMeta.v1.meta.apis.pkg.apimachinery.k8s.io + default: {} + - name: spec + type: + namedType: com.github.openshift.api.console.v1.ConsoleYAMLSampleSpec + default: {} +- name: com.github.openshift.api.console.v1.ConsoleYAMLSampleSpec + map: + fields: + - name: description + type: + scalar: string + default: "" + - name: snippet + type: + scalar: boolean + default: false + - name: targetResource + type: + namedType: TypeMeta.v1.meta.apis.pkg.apimachinery.k8s.io + default: {} + - name: title + type: + scalar: string + default: "" + - name: yaml + type: + scalar: string + default: "" +- name: com.github.openshift.api.console.v1.Link + map: + fields: + - name: href + type: + scalar: string + default: "" + - name: text + type: + scalar: string + default: "" +- name: com.github.openshift.api.console.v1.NamespaceDashboardSpec + map: + fields: + - name: namespaceSelector + type: + namedType: LabelSelector.v1.meta.apis.pkg.apimachinery.k8s.io + - name: namespaces + type: + list: + elementType: + scalar: string + elementRelationship: atomic +- name: __untyped_atomic_ + scalar: untyped + list: + elementType: + namedType: __untyped_atomic_ + elementRelationship: atomic + map: + elementType: + namedType: __untyped_atomic_ + elementRelationship: atomic +- name: __untyped_deduced_ + scalar: untyped + list: + elementType: + namedType: __untyped_atomic_ + elementRelationship: atomic + map: + elementType: + namedType: __untyped_deduced_ + elementRelationship: separable +`) diff --git a/vendor/github.com/openshift/client-go/console/applyconfigurations/utils.go b/vendor/github.com/openshift/client-go/console/applyconfigurations/utils.go new file mode 100644 index 000000000..595a26048 --- /dev/null +++ b/vendor/github.com/openshift/client-go/console/applyconfigurations/utils.go @@ -0,0 +1,98 @@ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package applyconfigurations + +import ( + v1 "github.com/openshift/api/console/v1" + consolev1 "github.com/openshift/client-go/console/applyconfigurations/console/v1" + internal "github.com/openshift/client-go/console/applyconfigurations/internal" + runtime "k8s.io/apimachinery/pkg/runtime" + schema "k8s.io/apimachinery/pkg/runtime/schema" + managedfields "k8s.io/apimachinery/pkg/util/managedfields" +) + +// ForKind returns an apply configuration type for the given GroupVersionKind, or nil if no +// apply configuration type exists for the given GroupVersionKind. +func ForKind(kind schema.GroupVersionKind) interface{} { + switch kind { + // Group=console.openshift.io, Version=v1 + case v1.SchemeGroupVersion.WithKind("ApplicationMenuSpec"): + return &consolev1.ApplicationMenuSpecApplyConfiguration{} + case v1.SchemeGroupVersion.WithKind("CLIDownloadLink"): + return &consolev1.CLIDownloadLinkApplyConfiguration{} + case v1.SchemeGroupVersion.WithKind("ConsoleCLIDownload"): + return &consolev1.ConsoleCLIDownloadApplyConfiguration{} + case v1.SchemeGroupVersion.WithKind("ConsoleCLIDownloadSpec"): + return &consolev1.ConsoleCLIDownloadSpecApplyConfiguration{} + case v1.SchemeGroupVersion.WithKind("ConsoleExternalLogLink"): + return &consolev1.ConsoleExternalLogLinkApplyConfiguration{} + case v1.SchemeGroupVersion.WithKind("ConsoleExternalLogLinkSpec"): + return &consolev1.ConsoleExternalLogLinkSpecApplyConfiguration{} + case v1.SchemeGroupVersion.WithKind("ConsoleLink"): + return &consolev1.ConsoleLinkApplyConfiguration{} + case v1.SchemeGroupVersion.WithKind("ConsoleLinkSpec"): + return &consolev1.ConsoleLinkSpecApplyConfiguration{} + case v1.SchemeGroupVersion.WithKind("ConsoleNotification"): + return &consolev1.ConsoleNotificationApplyConfiguration{} + case v1.SchemeGroupVersion.WithKind("ConsoleNotificationSpec"): + return &consolev1.ConsoleNotificationSpecApplyConfiguration{} + case v1.SchemeGroupVersion.WithKind("ConsolePlugin"): + return &consolev1.ConsolePluginApplyConfiguration{} + case v1.SchemeGroupVersion.WithKind("ConsolePluginBackend"): + return &consolev1.ConsolePluginBackendApplyConfiguration{} + case v1.SchemeGroupVersion.WithKind("ConsolePluginCSP"): + return &consolev1.ConsolePluginCSPApplyConfiguration{} + case v1.SchemeGroupVersion.WithKind("ConsolePluginI18n"): + return &consolev1.ConsolePluginI18nApplyConfiguration{} + case v1.SchemeGroupVersion.WithKind("ConsolePluginProxy"): + return &consolev1.ConsolePluginProxyApplyConfiguration{} + case v1.SchemeGroupVersion.WithKind("ConsolePluginProxyEndpoint"): + return &consolev1.ConsolePluginProxyEndpointApplyConfiguration{} + case v1.SchemeGroupVersion.WithKind("ConsolePluginProxyServiceConfig"): + return &consolev1.ConsolePluginProxyServiceConfigApplyConfiguration{} + case v1.SchemeGroupVersion.WithKind("ConsolePluginService"): + return &consolev1.ConsolePluginServiceApplyConfiguration{} + case v1.SchemeGroupVersion.WithKind("ConsolePluginSpec"): + return &consolev1.ConsolePluginSpecApplyConfiguration{} + case v1.SchemeGroupVersion.WithKind("ConsoleQuickStart"): + return &consolev1.ConsoleQuickStartApplyConfiguration{} + case v1.SchemeGroupVersion.WithKind("ConsoleQuickStartSpec"): + return &consolev1.ConsoleQuickStartSpecApplyConfiguration{} + case v1.SchemeGroupVersion.WithKind("ConsoleQuickStartTask"): + return &consolev1.ConsoleQuickStartTaskApplyConfiguration{} + case v1.SchemeGroupVersion.WithKind("ConsoleQuickStartTaskReview"): + return &consolev1.ConsoleQuickStartTaskReviewApplyConfiguration{} + case v1.SchemeGroupVersion.WithKind("ConsoleQuickStartTaskSummary"): + return &consolev1.ConsoleQuickStartTaskSummaryApplyConfiguration{} + case v1.SchemeGroupVersion.WithKind("ConsoleSample"): + return &consolev1.ConsoleSampleApplyConfiguration{} + case v1.SchemeGroupVersion.WithKind("ConsoleSampleContainerImportSource"): + return &consolev1.ConsoleSampleContainerImportSourceApplyConfiguration{} + case v1.SchemeGroupVersion.WithKind("ConsoleSampleContainerImportSourceService"): + return &consolev1.ConsoleSampleContainerImportSourceServiceApplyConfiguration{} + case v1.SchemeGroupVersion.WithKind("ConsoleSampleGitImportSource"): + return &consolev1.ConsoleSampleGitImportSourceApplyConfiguration{} + case v1.SchemeGroupVersion.WithKind("ConsoleSampleGitImportSourceRepository"): + return &consolev1.ConsoleSampleGitImportSourceRepositoryApplyConfiguration{} + case v1.SchemeGroupVersion.WithKind("ConsoleSampleGitImportSourceService"): + return &consolev1.ConsoleSampleGitImportSourceServiceApplyConfiguration{} + case v1.SchemeGroupVersion.WithKind("ConsoleSampleSource"): + return &consolev1.ConsoleSampleSourceApplyConfiguration{} + case v1.SchemeGroupVersion.WithKind("ConsoleSampleSpec"): + return &consolev1.ConsoleSampleSpecApplyConfiguration{} + case v1.SchemeGroupVersion.WithKind("ConsoleYAMLSample"): + return &consolev1.ConsoleYAMLSampleApplyConfiguration{} + case v1.SchemeGroupVersion.WithKind("ConsoleYAMLSampleSpec"): + return &consolev1.ConsoleYAMLSampleSpecApplyConfiguration{} + case v1.SchemeGroupVersion.WithKind("Link"): + return &consolev1.LinkApplyConfiguration{} + case v1.SchemeGroupVersion.WithKind("NamespaceDashboardSpec"): + return &consolev1.NamespaceDashboardSpecApplyConfiguration{} + + } + return nil +} + +func NewTypeConverter(scheme *runtime.Scheme) managedfields.TypeConverter { + return managedfields.NewSchemeTypeConverter(scheme, internal.Parser()) +} diff --git a/vendor/github.com/openshift/client-go/console/clientset/versioned/clientset.go b/vendor/github.com/openshift/client-go/console/clientset/versioned/clientset.go new file mode 100644 index 000000000..a03b79be0 --- /dev/null +++ b/vendor/github.com/openshift/client-go/console/clientset/versioned/clientset.go @@ -0,0 +1,104 @@ +// Code generated by client-gen. DO NOT EDIT. + +package versioned + +import ( + fmt "fmt" + http "net/http" + + consolev1 "github.com/openshift/client-go/console/clientset/versioned/typed/console/v1" + discovery "k8s.io/client-go/discovery" + rest "k8s.io/client-go/rest" + flowcontrol "k8s.io/client-go/util/flowcontrol" +) + +type Interface interface { + Discovery() discovery.DiscoveryInterface + ConsoleV1() consolev1.ConsoleV1Interface +} + +// Clientset contains the clients for groups. +type Clientset struct { + *discovery.DiscoveryClient + consoleV1 *consolev1.ConsoleV1Client +} + +// ConsoleV1 retrieves the ConsoleV1Client +func (c *Clientset) ConsoleV1() consolev1.ConsoleV1Interface { + return c.consoleV1 +} + +// Discovery retrieves the DiscoveryClient +func (c *Clientset) Discovery() discovery.DiscoveryInterface { + if c == nil { + return nil + } + return c.DiscoveryClient +} + +// NewForConfig creates a new Clientset for the given config. +// If config's RateLimiter is not set and QPS and Burst are acceptable, +// NewForConfig will generate a rate-limiter in configShallowCopy. +// NewForConfig is equivalent to NewForConfigAndClient(c, httpClient), +// where httpClient was generated with rest.HTTPClientFor(c). +func NewForConfig(c *rest.Config) (*Clientset, error) { + configShallowCopy := *c + + if configShallowCopy.UserAgent == "" { + configShallowCopy.UserAgent = rest.DefaultKubernetesUserAgent() + } + + // share the transport between all clients + httpClient, err := rest.HTTPClientFor(&configShallowCopy) + if err != nil { + return nil, err + } + + return NewForConfigAndClient(&configShallowCopy, httpClient) +} + +// NewForConfigAndClient creates a new Clientset for the given config and http client. +// Note the http client provided takes precedence over the configured transport values. +// If config's RateLimiter is not set and QPS and Burst are acceptable, +// NewForConfigAndClient will generate a rate-limiter in configShallowCopy. +func NewForConfigAndClient(c *rest.Config, httpClient *http.Client) (*Clientset, error) { + configShallowCopy := *c + if configShallowCopy.RateLimiter == nil && configShallowCopy.QPS > 0 { + if configShallowCopy.Burst <= 0 { + return nil, fmt.Errorf("burst is required to be greater than 0 when RateLimiter is not set and QPS is set to greater than 0") + } + configShallowCopy.RateLimiter = flowcontrol.NewTokenBucketRateLimiter(configShallowCopy.QPS, configShallowCopy.Burst) + } + + var cs Clientset + var err error + cs.consoleV1, err = consolev1.NewForConfigAndClient(&configShallowCopy, httpClient) + if err != nil { + return nil, err + } + + cs.DiscoveryClient, err = discovery.NewDiscoveryClientForConfigAndClient(&configShallowCopy, httpClient) + if err != nil { + return nil, err + } + return &cs, nil +} + +// NewForConfigOrDie creates a new Clientset for the given config and +// panics if there is an error in the config. +func NewForConfigOrDie(c *rest.Config) *Clientset { + cs, err := NewForConfig(c) + if err != nil { + panic(err) + } + return cs +} + +// New creates a new Clientset for the given RESTClient. +func New(c rest.Interface) *Clientset { + var cs Clientset + cs.consoleV1 = consolev1.New(c) + + cs.DiscoveryClient = discovery.NewDiscoveryClient(c) + return &cs +} diff --git a/vendor/github.com/openshift/client-go/console/clientset/versioned/fake/clientset_generated.go b/vendor/github.com/openshift/client-go/console/clientset/versioned/fake/clientset_generated.go new file mode 100644 index 000000000..837b3a0c9 --- /dev/null +++ b/vendor/github.com/openshift/client-go/console/clientset/versioned/fake/clientset_generated.go @@ -0,0 +1,126 @@ +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + applyconfigurations "github.com/openshift/client-go/console/applyconfigurations" + clientset "github.com/openshift/client-go/console/clientset/versioned" + consolev1 "github.com/openshift/client-go/console/clientset/versioned/typed/console/v1" + fakeconsolev1 "github.com/openshift/client-go/console/clientset/versioned/typed/console/v1/fake" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/watch" + "k8s.io/client-go/discovery" + fakediscovery "k8s.io/client-go/discovery/fake" + "k8s.io/client-go/testing" +) + +// NewSimpleClientset returns a clientset that will respond with the provided objects. +// It's backed by a very simple object tracker that processes creates, updates and deletions as-is, +// without applying any field management, validations and/or defaults. It shouldn't be considered a replacement +// for a real clientset and is mostly useful in simple unit tests. +// +// Deprecated: NewClientset replaces this with support for field management, which significantly improves +// server side apply testing. NewClientset is only available when apply configurations are generated (e.g. +// via --with-applyconfig). +func NewSimpleClientset(objects ...runtime.Object) *Clientset { + o := testing.NewObjectTracker(scheme, codecs.UniversalDecoder()) + for _, obj := range objects { + if err := o.Add(obj); err != nil { + panic(err) + } + } + + cs := &Clientset{tracker: o} + cs.discovery = &fakediscovery.FakeDiscovery{Fake: &cs.Fake} + cs.AddReactor("*", "*", testing.ObjectReaction(o)) + cs.AddWatchReactor("*", func(action testing.Action) (handled bool, ret watch.Interface, err error) { + var opts metav1.ListOptions + if watchAction, ok := action.(testing.WatchActionImpl); ok { + opts = watchAction.ListOptions + } + gvr := action.GetResource() + ns := action.GetNamespace() + watch, err := o.Watch(gvr, ns, opts) + if err != nil { + return false, nil, err + } + return true, watch, nil + }) + + return cs +} + +// Clientset implements clientset.Interface. Meant to be embedded into a +// struct to get a default implementation. This makes faking out just the method +// you want to test easier. +type Clientset struct { + testing.Fake + discovery *fakediscovery.FakeDiscovery + tracker testing.ObjectTracker +} + +func (c *Clientset) Discovery() discovery.DiscoveryInterface { + return c.discovery +} + +func (c *Clientset) Tracker() testing.ObjectTracker { + return c.tracker +} + +// IsWatchListSemanticsSupported informs the reflector that this client +// doesn't support WatchList semantics. +// +// This is a synthetic method whose sole purpose is to satisfy the optional +// interface check performed by the reflector. +// Returning true signals that WatchList can NOT be used. +// No additional logic is implemented here. +func (c *Clientset) IsWatchListSemanticsUnSupported() bool { + return true +} + +// NewClientset returns a clientset that will respond with the provided objects. +// It's backed by a very simple object tracker that processes creates, updates and deletions as-is, +// without applying any validations and/or defaults. It shouldn't be considered a replacement +// for a real clientset and is mostly useful in simple unit tests. +func NewClientset(objects ...runtime.Object) *Clientset { + o := testing.NewFieldManagedObjectTracker( + scheme, + codecs.UniversalDecoder(), + applyconfigurations.NewTypeConverter(scheme), + ) + for _, obj := range objects { + if err := o.Add(obj); err != nil { + panic(err) + } + } + + cs := &Clientset{tracker: o} + cs.discovery = &fakediscovery.FakeDiscovery{Fake: &cs.Fake} + cs.AddReactor("*", "*", testing.ObjectReaction(o)) + cs.AddWatchReactor("*", func(action testing.Action) (handled bool, ret watch.Interface, err error) { + var opts metav1.ListOptions + if watchAction, ok := action.(testing.WatchActionImpl); ok { + opts = watchAction.ListOptions + } + gvr := action.GetResource() + ns := action.GetNamespace() + watch, err := o.Watch(gvr, ns, opts) + if err != nil { + return false, nil, err + } + return true, watch, nil + }) + + return cs +} + +var ( + _ clientset.Interface = &Clientset{} + _ testing.FakeClient = &Clientset{} +) + +// ConsoleV1 retrieves the ConsoleV1Client +func (c *Clientset) ConsoleV1() consolev1.ConsoleV1Interface { + return &fakeconsolev1.FakeConsoleV1{Fake: &c.Fake} +} diff --git a/vendor/github.com/openshift/client-go/console/clientset/versioned/fake/doc.go b/vendor/github.com/openshift/client-go/console/clientset/versioned/fake/doc.go new file mode 100644 index 000000000..3630ed1cd --- /dev/null +++ b/vendor/github.com/openshift/client-go/console/clientset/versioned/fake/doc.go @@ -0,0 +1,4 @@ +// Code generated by client-gen. DO NOT EDIT. + +// This package has the automatically generated fake clientset. +package fake diff --git a/vendor/github.com/openshift/client-go/console/clientset/versioned/fake/register.go b/vendor/github.com/openshift/client-go/console/clientset/versioned/fake/register.go new file mode 100644 index 000000000..f9d5314b0 --- /dev/null +++ b/vendor/github.com/openshift/client-go/console/clientset/versioned/fake/register.go @@ -0,0 +1,40 @@ +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + consolev1 "github.com/openshift/api/console/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + schema "k8s.io/apimachinery/pkg/runtime/schema" + serializer "k8s.io/apimachinery/pkg/runtime/serializer" + utilruntime "k8s.io/apimachinery/pkg/util/runtime" +) + +var scheme = runtime.NewScheme() +var codecs = serializer.NewCodecFactory(scheme) + +var localSchemeBuilder = runtime.SchemeBuilder{ + consolev1.AddToScheme, +} + +// AddToScheme adds all types of this clientset into the given scheme. This allows composition +// of clientsets, like in: +// +// import ( +// "k8s.io/client-go/kubernetes" +// clientsetscheme "k8s.io/client-go/kubernetes/scheme" +// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme" +// ) +// +// kclientset, _ := kubernetes.NewForConfig(c) +// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) +// +// After this, RawExtensions in Kubernetes types will serialize kube-aggregator types +// correctly. +var AddToScheme = localSchemeBuilder.AddToScheme + +func init() { + v1.AddToGroupVersion(scheme, schema.GroupVersion{Version: "v1"}) + utilruntime.Must(AddToScheme(scheme)) +} diff --git a/vendor/github.com/openshift/client-go/console/clientset/versioned/scheme/doc.go b/vendor/github.com/openshift/client-go/console/clientset/versioned/scheme/doc.go new file mode 100644 index 000000000..14db57a58 --- /dev/null +++ b/vendor/github.com/openshift/client-go/console/clientset/versioned/scheme/doc.go @@ -0,0 +1,4 @@ +// Code generated by client-gen. DO NOT EDIT. + +// This package contains the scheme of the automatically generated clientset. +package scheme diff --git a/vendor/github.com/openshift/client-go/console/clientset/versioned/scheme/register.go b/vendor/github.com/openshift/client-go/console/clientset/versioned/scheme/register.go new file mode 100644 index 000000000..05b26832c --- /dev/null +++ b/vendor/github.com/openshift/client-go/console/clientset/versioned/scheme/register.go @@ -0,0 +1,40 @@ +// Code generated by client-gen. DO NOT EDIT. + +package scheme + +import ( + consolev1 "github.com/openshift/api/console/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + schema "k8s.io/apimachinery/pkg/runtime/schema" + serializer "k8s.io/apimachinery/pkg/runtime/serializer" + utilruntime "k8s.io/apimachinery/pkg/util/runtime" +) + +var Scheme = runtime.NewScheme() +var Codecs = serializer.NewCodecFactory(Scheme) +var ParameterCodec = runtime.NewParameterCodec(Scheme) +var localSchemeBuilder = runtime.SchemeBuilder{ + consolev1.AddToScheme, +} + +// AddToScheme adds all types of this clientset into the given scheme. This allows composition +// of clientsets, like in: +// +// import ( +// "k8s.io/client-go/kubernetes" +// clientsetscheme "k8s.io/client-go/kubernetes/scheme" +// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme" +// ) +// +// kclientset, _ := kubernetes.NewForConfig(c) +// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) +// +// After this, RawExtensions in Kubernetes types will serialize kube-aggregator types +// correctly. +var AddToScheme = localSchemeBuilder.AddToScheme + +func init() { + v1.AddToGroupVersion(Scheme, schema.GroupVersion{Version: "v1"}) + utilruntime.Must(AddToScheme(Scheme)) +} diff --git a/vendor/github.com/openshift/client-go/console/clientset/versioned/typed/console/v1/console_client.go b/vendor/github.com/openshift/client-go/console/clientset/versioned/typed/console/v1/console_client.go new file mode 100644 index 000000000..b54aa3924 --- /dev/null +++ b/vendor/github.com/openshift/client-go/console/clientset/versioned/typed/console/v1/console_client.go @@ -0,0 +1,120 @@ +// Code generated by client-gen. DO NOT EDIT. + +package v1 + +import ( + http "net/http" + + consolev1 "github.com/openshift/api/console/v1" + scheme "github.com/openshift/client-go/console/clientset/versioned/scheme" + rest "k8s.io/client-go/rest" +) + +type ConsoleV1Interface interface { + RESTClient() rest.Interface + ConsoleCLIDownloadsGetter + ConsoleExternalLogLinksGetter + ConsoleLinksGetter + ConsoleNotificationsGetter + ConsolePluginsGetter + ConsoleQuickStartsGetter + ConsoleSamplesGetter + ConsoleYAMLSamplesGetter +} + +// ConsoleV1Client is used to interact with features provided by the console.openshift.io group. +type ConsoleV1Client struct { + restClient rest.Interface +} + +func (c *ConsoleV1Client) ConsoleCLIDownloads() ConsoleCLIDownloadInterface { + return newConsoleCLIDownloads(c) +} + +func (c *ConsoleV1Client) ConsoleExternalLogLinks() ConsoleExternalLogLinkInterface { + return newConsoleExternalLogLinks(c) +} + +func (c *ConsoleV1Client) ConsoleLinks() ConsoleLinkInterface { + return newConsoleLinks(c) +} + +func (c *ConsoleV1Client) ConsoleNotifications() ConsoleNotificationInterface { + return newConsoleNotifications(c) +} + +func (c *ConsoleV1Client) ConsolePlugins() ConsolePluginInterface { + return newConsolePlugins(c) +} + +func (c *ConsoleV1Client) ConsoleQuickStarts() ConsoleQuickStartInterface { + return newConsoleQuickStarts(c) +} + +func (c *ConsoleV1Client) ConsoleSamples() ConsoleSampleInterface { + return newConsoleSamples(c) +} + +func (c *ConsoleV1Client) ConsoleYAMLSamples() ConsoleYAMLSampleInterface { + return newConsoleYAMLSamples(c) +} + +// NewForConfig creates a new ConsoleV1Client for the given config. +// NewForConfig is equivalent to NewForConfigAndClient(c, httpClient), +// where httpClient was generated with rest.HTTPClientFor(c). +func NewForConfig(c *rest.Config) (*ConsoleV1Client, error) { + config := *c + setConfigDefaults(&config) + httpClient, err := rest.HTTPClientFor(&config) + if err != nil { + return nil, err + } + return NewForConfigAndClient(&config, httpClient) +} + +// NewForConfigAndClient creates a new ConsoleV1Client for the given config and http client. +// Note the http client provided takes precedence over the configured transport values. +func NewForConfigAndClient(c *rest.Config, h *http.Client) (*ConsoleV1Client, error) { + config := *c + setConfigDefaults(&config) + client, err := rest.RESTClientForConfigAndClient(&config, h) + if err != nil { + return nil, err + } + return &ConsoleV1Client{client}, nil +} + +// NewForConfigOrDie creates a new ConsoleV1Client for the given config and +// panics if there is an error in the config. +func NewForConfigOrDie(c *rest.Config) *ConsoleV1Client { + client, err := NewForConfig(c) + if err != nil { + panic(err) + } + return client +} + +// New creates a new ConsoleV1Client for the given RESTClient. +func New(c rest.Interface) *ConsoleV1Client { + return &ConsoleV1Client{c} +} + +func setConfigDefaults(config *rest.Config) { + gv := consolev1.SchemeGroupVersion + config.GroupVersion = &gv + config.APIPath = "/apis" + config.NegotiatedSerializer = rest.CodecFactoryForGeneratedClient(scheme.Scheme, scheme.Codecs).WithoutConversion() + + if config.UserAgent == "" { + config.UserAgent = rest.DefaultKubernetesUserAgent() + } +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *ConsoleV1Client) RESTClient() rest.Interface { + if c == nil { + return nil + } + return c.restClient +} diff --git a/vendor/github.com/openshift/client-go/console/clientset/versioned/typed/console/v1/consoleclidownload.go b/vendor/github.com/openshift/client-go/console/clientset/versioned/typed/console/v1/consoleclidownload.go new file mode 100644 index 000000000..0081fd62a --- /dev/null +++ b/vendor/github.com/openshift/client-go/console/clientset/versioned/typed/console/v1/consoleclidownload.go @@ -0,0 +1,54 @@ +// Code generated by client-gen. DO NOT EDIT. + +package v1 + +import ( + context "context" + + consolev1 "github.com/openshift/api/console/v1" + applyconfigurationsconsolev1 "github.com/openshift/client-go/console/applyconfigurations/console/v1" + scheme "github.com/openshift/client-go/console/clientset/versioned/scheme" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + gentype "k8s.io/client-go/gentype" +) + +// ConsoleCLIDownloadsGetter has a method to return a ConsoleCLIDownloadInterface. +// A group's client should implement this interface. +type ConsoleCLIDownloadsGetter interface { + ConsoleCLIDownloads() ConsoleCLIDownloadInterface +} + +// ConsoleCLIDownloadInterface has methods to work with ConsoleCLIDownload resources. +type ConsoleCLIDownloadInterface interface { + Create(ctx context.Context, consoleCLIDownload *consolev1.ConsoleCLIDownload, opts metav1.CreateOptions) (*consolev1.ConsoleCLIDownload, error) + Update(ctx context.Context, consoleCLIDownload *consolev1.ConsoleCLIDownload, opts metav1.UpdateOptions) (*consolev1.ConsoleCLIDownload, error) + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*consolev1.ConsoleCLIDownload, error) + List(ctx context.Context, opts metav1.ListOptions) (*consolev1.ConsoleCLIDownloadList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *consolev1.ConsoleCLIDownload, err error) + Apply(ctx context.Context, consoleCLIDownload *applyconfigurationsconsolev1.ConsoleCLIDownloadApplyConfiguration, opts metav1.ApplyOptions) (result *consolev1.ConsoleCLIDownload, err error) + ConsoleCLIDownloadExpansion +} + +// consoleCLIDownloads implements ConsoleCLIDownloadInterface +type consoleCLIDownloads struct { + *gentype.ClientWithListAndApply[*consolev1.ConsoleCLIDownload, *consolev1.ConsoleCLIDownloadList, *applyconfigurationsconsolev1.ConsoleCLIDownloadApplyConfiguration] +} + +// newConsoleCLIDownloads returns a ConsoleCLIDownloads +func newConsoleCLIDownloads(c *ConsoleV1Client) *consoleCLIDownloads { + return &consoleCLIDownloads{ + gentype.NewClientWithListAndApply[*consolev1.ConsoleCLIDownload, *consolev1.ConsoleCLIDownloadList, *applyconfigurationsconsolev1.ConsoleCLIDownloadApplyConfiguration]( + "consoleclidownloads", + c.RESTClient(), + scheme.ParameterCodec, + "", + func() *consolev1.ConsoleCLIDownload { return &consolev1.ConsoleCLIDownload{} }, + func() *consolev1.ConsoleCLIDownloadList { return &consolev1.ConsoleCLIDownloadList{} }, + ), + } +} diff --git a/vendor/github.com/openshift/client-go/console/clientset/versioned/typed/console/v1/consoleexternalloglink.go b/vendor/github.com/openshift/client-go/console/clientset/versioned/typed/console/v1/consoleexternalloglink.go new file mode 100644 index 000000000..08e467dd9 --- /dev/null +++ b/vendor/github.com/openshift/client-go/console/clientset/versioned/typed/console/v1/consoleexternalloglink.go @@ -0,0 +1,54 @@ +// Code generated by client-gen. DO NOT EDIT. + +package v1 + +import ( + context "context" + + consolev1 "github.com/openshift/api/console/v1" + applyconfigurationsconsolev1 "github.com/openshift/client-go/console/applyconfigurations/console/v1" + scheme "github.com/openshift/client-go/console/clientset/versioned/scheme" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + gentype "k8s.io/client-go/gentype" +) + +// ConsoleExternalLogLinksGetter has a method to return a ConsoleExternalLogLinkInterface. +// A group's client should implement this interface. +type ConsoleExternalLogLinksGetter interface { + ConsoleExternalLogLinks() ConsoleExternalLogLinkInterface +} + +// ConsoleExternalLogLinkInterface has methods to work with ConsoleExternalLogLink resources. +type ConsoleExternalLogLinkInterface interface { + Create(ctx context.Context, consoleExternalLogLink *consolev1.ConsoleExternalLogLink, opts metav1.CreateOptions) (*consolev1.ConsoleExternalLogLink, error) + Update(ctx context.Context, consoleExternalLogLink *consolev1.ConsoleExternalLogLink, opts metav1.UpdateOptions) (*consolev1.ConsoleExternalLogLink, error) + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*consolev1.ConsoleExternalLogLink, error) + List(ctx context.Context, opts metav1.ListOptions) (*consolev1.ConsoleExternalLogLinkList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *consolev1.ConsoleExternalLogLink, err error) + Apply(ctx context.Context, consoleExternalLogLink *applyconfigurationsconsolev1.ConsoleExternalLogLinkApplyConfiguration, opts metav1.ApplyOptions) (result *consolev1.ConsoleExternalLogLink, err error) + ConsoleExternalLogLinkExpansion +} + +// consoleExternalLogLinks implements ConsoleExternalLogLinkInterface +type consoleExternalLogLinks struct { + *gentype.ClientWithListAndApply[*consolev1.ConsoleExternalLogLink, *consolev1.ConsoleExternalLogLinkList, *applyconfigurationsconsolev1.ConsoleExternalLogLinkApplyConfiguration] +} + +// newConsoleExternalLogLinks returns a ConsoleExternalLogLinks +func newConsoleExternalLogLinks(c *ConsoleV1Client) *consoleExternalLogLinks { + return &consoleExternalLogLinks{ + gentype.NewClientWithListAndApply[*consolev1.ConsoleExternalLogLink, *consolev1.ConsoleExternalLogLinkList, *applyconfigurationsconsolev1.ConsoleExternalLogLinkApplyConfiguration]( + "consoleexternalloglinks", + c.RESTClient(), + scheme.ParameterCodec, + "", + func() *consolev1.ConsoleExternalLogLink { return &consolev1.ConsoleExternalLogLink{} }, + func() *consolev1.ConsoleExternalLogLinkList { return &consolev1.ConsoleExternalLogLinkList{} }, + ), + } +} diff --git a/vendor/github.com/openshift/client-go/console/clientset/versioned/typed/console/v1/consolelink.go b/vendor/github.com/openshift/client-go/console/clientset/versioned/typed/console/v1/consolelink.go new file mode 100644 index 000000000..6acc51995 --- /dev/null +++ b/vendor/github.com/openshift/client-go/console/clientset/versioned/typed/console/v1/consolelink.go @@ -0,0 +1,54 @@ +// Code generated by client-gen. DO NOT EDIT. + +package v1 + +import ( + context "context" + + consolev1 "github.com/openshift/api/console/v1" + applyconfigurationsconsolev1 "github.com/openshift/client-go/console/applyconfigurations/console/v1" + scheme "github.com/openshift/client-go/console/clientset/versioned/scheme" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + gentype "k8s.io/client-go/gentype" +) + +// ConsoleLinksGetter has a method to return a ConsoleLinkInterface. +// A group's client should implement this interface. +type ConsoleLinksGetter interface { + ConsoleLinks() ConsoleLinkInterface +} + +// ConsoleLinkInterface has methods to work with ConsoleLink resources. +type ConsoleLinkInterface interface { + Create(ctx context.Context, consoleLink *consolev1.ConsoleLink, opts metav1.CreateOptions) (*consolev1.ConsoleLink, error) + Update(ctx context.Context, consoleLink *consolev1.ConsoleLink, opts metav1.UpdateOptions) (*consolev1.ConsoleLink, error) + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*consolev1.ConsoleLink, error) + List(ctx context.Context, opts metav1.ListOptions) (*consolev1.ConsoleLinkList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *consolev1.ConsoleLink, err error) + Apply(ctx context.Context, consoleLink *applyconfigurationsconsolev1.ConsoleLinkApplyConfiguration, opts metav1.ApplyOptions) (result *consolev1.ConsoleLink, err error) + ConsoleLinkExpansion +} + +// consoleLinks implements ConsoleLinkInterface +type consoleLinks struct { + *gentype.ClientWithListAndApply[*consolev1.ConsoleLink, *consolev1.ConsoleLinkList, *applyconfigurationsconsolev1.ConsoleLinkApplyConfiguration] +} + +// newConsoleLinks returns a ConsoleLinks +func newConsoleLinks(c *ConsoleV1Client) *consoleLinks { + return &consoleLinks{ + gentype.NewClientWithListAndApply[*consolev1.ConsoleLink, *consolev1.ConsoleLinkList, *applyconfigurationsconsolev1.ConsoleLinkApplyConfiguration]( + "consolelinks", + c.RESTClient(), + scheme.ParameterCodec, + "", + func() *consolev1.ConsoleLink { return &consolev1.ConsoleLink{} }, + func() *consolev1.ConsoleLinkList { return &consolev1.ConsoleLinkList{} }, + ), + } +} diff --git a/vendor/github.com/openshift/client-go/console/clientset/versioned/typed/console/v1/consolenotification.go b/vendor/github.com/openshift/client-go/console/clientset/versioned/typed/console/v1/consolenotification.go new file mode 100644 index 000000000..bf46fa43d --- /dev/null +++ b/vendor/github.com/openshift/client-go/console/clientset/versioned/typed/console/v1/consolenotification.go @@ -0,0 +1,54 @@ +// Code generated by client-gen. DO NOT EDIT. + +package v1 + +import ( + context "context" + + consolev1 "github.com/openshift/api/console/v1" + applyconfigurationsconsolev1 "github.com/openshift/client-go/console/applyconfigurations/console/v1" + scheme "github.com/openshift/client-go/console/clientset/versioned/scheme" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + gentype "k8s.io/client-go/gentype" +) + +// ConsoleNotificationsGetter has a method to return a ConsoleNotificationInterface. +// A group's client should implement this interface. +type ConsoleNotificationsGetter interface { + ConsoleNotifications() ConsoleNotificationInterface +} + +// ConsoleNotificationInterface has methods to work with ConsoleNotification resources. +type ConsoleNotificationInterface interface { + Create(ctx context.Context, consoleNotification *consolev1.ConsoleNotification, opts metav1.CreateOptions) (*consolev1.ConsoleNotification, error) + Update(ctx context.Context, consoleNotification *consolev1.ConsoleNotification, opts metav1.UpdateOptions) (*consolev1.ConsoleNotification, error) + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*consolev1.ConsoleNotification, error) + List(ctx context.Context, opts metav1.ListOptions) (*consolev1.ConsoleNotificationList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *consolev1.ConsoleNotification, err error) + Apply(ctx context.Context, consoleNotification *applyconfigurationsconsolev1.ConsoleNotificationApplyConfiguration, opts metav1.ApplyOptions) (result *consolev1.ConsoleNotification, err error) + ConsoleNotificationExpansion +} + +// consoleNotifications implements ConsoleNotificationInterface +type consoleNotifications struct { + *gentype.ClientWithListAndApply[*consolev1.ConsoleNotification, *consolev1.ConsoleNotificationList, *applyconfigurationsconsolev1.ConsoleNotificationApplyConfiguration] +} + +// newConsoleNotifications returns a ConsoleNotifications +func newConsoleNotifications(c *ConsoleV1Client) *consoleNotifications { + return &consoleNotifications{ + gentype.NewClientWithListAndApply[*consolev1.ConsoleNotification, *consolev1.ConsoleNotificationList, *applyconfigurationsconsolev1.ConsoleNotificationApplyConfiguration]( + "consolenotifications", + c.RESTClient(), + scheme.ParameterCodec, + "", + func() *consolev1.ConsoleNotification { return &consolev1.ConsoleNotification{} }, + func() *consolev1.ConsoleNotificationList { return &consolev1.ConsoleNotificationList{} }, + ), + } +} diff --git a/vendor/github.com/openshift/client-go/console/clientset/versioned/typed/console/v1/consoleplugin.go b/vendor/github.com/openshift/client-go/console/clientset/versioned/typed/console/v1/consoleplugin.go new file mode 100644 index 000000000..d592717e9 --- /dev/null +++ b/vendor/github.com/openshift/client-go/console/clientset/versioned/typed/console/v1/consoleplugin.go @@ -0,0 +1,54 @@ +// Code generated by client-gen. DO NOT EDIT. + +package v1 + +import ( + context "context" + + consolev1 "github.com/openshift/api/console/v1" + applyconfigurationsconsolev1 "github.com/openshift/client-go/console/applyconfigurations/console/v1" + scheme "github.com/openshift/client-go/console/clientset/versioned/scheme" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + gentype "k8s.io/client-go/gentype" +) + +// ConsolePluginsGetter has a method to return a ConsolePluginInterface. +// A group's client should implement this interface. +type ConsolePluginsGetter interface { + ConsolePlugins() ConsolePluginInterface +} + +// ConsolePluginInterface has methods to work with ConsolePlugin resources. +type ConsolePluginInterface interface { + Create(ctx context.Context, consolePlugin *consolev1.ConsolePlugin, opts metav1.CreateOptions) (*consolev1.ConsolePlugin, error) + Update(ctx context.Context, consolePlugin *consolev1.ConsolePlugin, opts metav1.UpdateOptions) (*consolev1.ConsolePlugin, error) + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*consolev1.ConsolePlugin, error) + List(ctx context.Context, opts metav1.ListOptions) (*consolev1.ConsolePluginList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *consolev1.ConsolePlugin, err error) + Apply(ctx context.Context, consolePlugin *applyconfigurationsconsolev1.ConsolePluginApplyConfiguration, opts metav1.ApplyOptions) (result *consolev1.ConsolePlugin, err error) + ConsolePluginExpansion +} + +// consolePlugins implements ConsolePluginInterface +type consolePlugins struct { + *gentype.ClientWithListAndApply[*consolev1.ConsolePlugin, *consolev1.ConsolePluginList, *applyconfigurationsconsolev1.ConsolePluginApplyConfiguration] +} + +// newConsolePlugins returns a ConsolePlugins +func newConsolePlugins(c *ConsoleV1Client) *consolePlugins { + return &consolePlugins{ + gentype.NewClientWithListAndApply[*consolev1.ConsolePlugin, *consolev1.ConsolePluginList, *applyconfigurationsconsolev1.ConsolePluginApplyConfiguration]( + "consoleplugins", + c.RESTClient(), + scheme.ParameterCodec, + "", + func() *consolev1.ConsolePlugin { return &consolev1.ConsolePlugin{} }, + func() *consolev1.ConsolePluginList { return &consolev1.ConsolePluginList{} }, + ), + } +} diff --git a/vendor/github.com/openshift/client-go/console/clientset/versioned/typed/console/v1/consolequickstart.go b/vendor/github.com/openshift/client-go/console/clientset/versioned/typed/console/v1/consolequickstart.go new file mode 100644 index 000000000..7c69b11aa --- /dev/null +++ b/vendor/github.com/openshift/client-go/console/clientset/versioned/typed/console/v1/consolequickstart.go @@ -0,0 +1,54 @@ +// Code generated by client-gen. DO NOT EDIT. + +package v1 + +import ( + context "context" + + consolev1 "github.com/openshift/api/console/v1" + applyconfigurationsconsolev1 "github.com/openshift/client-go/console/applyconfigurations/console/v1" + scheme "github.com/openshift/client-go/console/clientset/versioned/scheme" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + gentype "k8s.io/client-go/gentype" +) + +// ConsoleQuickStartsGetter has a method to return a ConsoleQuickStartInterface. +// A group's client should implement this interface. +type ConsoleQuickStartsGetter interface { + ConsoleQuickStarts() ConsoleQuickStartInterface +} + +// ConsoleQuickStartInterface has methods to work with ConsoleQuickStart resources. +type ConsoleQuickStartInterface interface { + Create(ctx context.Context, consoleQuickStart *consolev1.ConsoleQuickStart, opts metav1.CreateOptions) (*consolev1.ConsoleQuickStart, error) + Update(ctx context.Context, consoleQuickStart *consolev1.ConsoleQuickStart, opts metav1.UpdateOptions) (*consolev1.ConsoleQuickStart, error) + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*consolev1.ConsoleQuickStart, error) + List(ctx context.Context, opts metav1.ListOptions) (*consolev1.ConsoleQuickStartList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *consolev1.ConsoleQuickStart, err error) + Apply(ctx context.Context, consoleQuickStart *applyconfigurationsconsolev1.ConsoleQuickStartApplyConfiguration, opts metav1.ApplyOptions) (result *consolev1.ConsoleQuickStart, err error) + ConsoleQuickStartExpansion +} + +// consoleQuickStarts implements ConsoleQuickStartInterface +type consoleQuickStarts struct { + *gentype.ClientWithListAndApply[*consolev1.ConsoleQuickStart, *consolev1.ConsoleQuickStartList, *applyconfigurationsconsolev1.ConsoleQuickStartApplyConfiguration] +} + +// newConsoleQuickStarts returns a ConsoleQuickStarts +func newConsoleQuickStarts(c *ConsoleV1Client) *consoleQuickStarts { + return &consoleQuickStarts{ + gentype.NewClientWithListAndApply[*consolev1.ConsoleQuickStart, *consolev1.ConsoleQuickStartList, *applyconfigurationsconsolev1.ConsoleQuickStartApplyConfiguration]( + "consolequickstarts", + c.RESTClient(), + scheme.ParameterCodec, + "", + func() *consolev1.ConsoleQuickStart { return &consolev1.ConsoleQuickStart{} }, + func() *consolev1.ConsoleQuickStartList { return &consolev1.ConsoleQuickStartList{} }, + ), + } +} diff --git a/vendor/github.com/openshift/client-go/console/clientset/versioned/typed/console/v1/consolesample.go b/vendor/github.com/openshift/client-go/console/clientset/versioned/typed/console/v1/consolesample.go new file mode 100644 index 000000000..629812954 --- /dev/null +++ b/vendor/github.com/openshift/client-go/console/clientset/versioned/typed/console/v1/consolesample.go @@ -0,0 +1,54 @@ +// Code generated by client-gen. DO NOT EDIT. + +package v1 + +import ( + context "context" + + consolev1 "github.com/openshift/api/console/v1" + applyconfigurationsconsolev1 "github.com/openshift/client-go/console/applyconfigurations/console/v1" + scheme "github.com/openshift/client-go/console/clientset/versioned/scheme" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + gentype "k8s.io/client-go/gentype" +) + +// ConsoleSamplesGetter has a method to return a ConsoleSampleInterface. +// A group's client should implement this interface. +type ConsoleSamplesGetter interface { + ConsoleSamples() ConsoleSampleInterface +} + +// ConsoleSampleInterface has methods to work with ConsoleSample resources. +type ConsoleSampleInterface interface { + Create(ctx context.Context, consoleSample *consolev1.ConsoleSample, opts metav1.CreateOptions) (*consolev1.ConsoleSample, error) + Update(ctx context.Context, consoleSample *consolev1.ConsoleSample, opts metav1.UpdateOptions) (*consolev1.ConsoleSample, error) + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*consolev1.ConsoleSample, error) + List(ctx context.Context, opts metav1.ListOptions) (*consolev1.ConsoleSampleList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *consolev1.ConsoleSample, err error) + Apply(ctx context.Context, consoleSample *applyconfigurationsconsolev1.ConsoleSampleApplyConfiguration, opts metav1.ApplyOptions) (result *consolev1.ConsoleSample, err error) + ConsoleSampleExpansion +} + +// consoleSamples implements ConsoleSampleInterface +type consoleSamples struct { + *gentype.ClientWithListAndApply[*consolev1.ConsoleSample, *consolev1.ConsoleSampleList, *applyconfigurationsconsolev1.ConsoleSampleApplyConfiguration] +} + +// newConsoleSamples returns a ConsoleSamples +func newConsoleSamples(c *ConsoleV1Client) *consoleSamples { + return &consoleSamples{ + gentype.NewClientWithListAndApply[*consolev1.ConsoleSample, *consolev1.ConsoleSampleList, *applyconfigurationsconsolev1.ConsoleSampleApplyConfiguration]( + "consolesamples", + c.RESTClient(), + scheme.ParameterCodec, + "", + func() *consolev1.ConsoleSample { return &consolev1.ConsoleSample{} }, + func() *consolev1.ConsoleSampleList { return &consolev1.ConsoleSampleList{} }, + ), + } +} diff --git a/vendor/github.com/openshift/client-go/console/clientset/versioned/typed/console/v1/consoleyamlsample.go b/vendor/github.com/openshift/client-go/console/clientset/versioned/typed/console/v1/consoleyamlsample.go new file mode 100644 index 000000000..32c07d856 --- /dev/null +++ b/vendor/github.com/openshift/client-go/console/clientset/versioned/typed/console/v1/consoleyamlsample.go @@ -0,0 +1,54 @@ +// Code generated by client-gen. DO NOT EDIT. + +package v1 + +import ( + context "context" + + consolev1 "github.com/openshift/api/console/v1" + applyconfigurationsconsolev1 "github.com/openshift/client-go/console/applyconfigurations/console/v1" + scheme "github.com/openshift/client-go/console/clientset/versioned/scheme" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + gentype "k8s.io/client-go/gentype" +) + +// ConsoleYAMLSamplesGetter has a method to return a ConsoleYAMLSampleInterface. +// A group's client should implement this interface. +type ConsoleYAMLSamplesGetter interface { + ConsoleYAMLSamples() ConsoleYAMLSampleInterface +} + +// ConsoleYAMLSampleInterface has methods to work with ConsoleYAMLSample resources. +type ConsoleYAMLSampleInterface interface { + Create(ctx context.Context, consoleYAMLSample *consolev1.ConsoleYAMLSample, opts metav1.CreateOptions) (*consolev1.ConsoleYAMLSample, error) + Update(ctx context.Context, consoleYAMLSample *consolev1.ConsoleYAMLSample, opts metav1.UpdateOptions) (*consolev1.ConsoleYAMLSample, error) + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*consolev1.ConsoleYAMLSample, error) + List(ctx context.Context, opts metav1.ListOptions) (*consolev1.ConsoleYAMLSampleList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *consolev1.ConsoleYAMLSample, err error) + Apply(ctx context.Context, consoleYAMLSample *applyconfigurationsconsolev1.ConsoleYAMLSampleApplyConfiguration, opts metav1.ApplyOptions) (result *consolev1.ConsoleYAMLSample, err error) + ConsoleYAMLSampleExpansion +} + +// consoleYAMLSamples implements ConsoleYAMLSampleInterface +type consoleYAMLSamples struct { + *gentype.ClientWithListAndApply[*consolev1.ConsoleYAMLSample, *consolev1.ConsoleYAMLSampleList, *applyconfigurationsconsolev1.ConsoleYAMLSampleApplyConfiguration] +} + +// newConsoleYAMLSamples returns a ConsoleYAMLSamples +func newConsoleYAMLSamples(c *ConsoleV1Client) *consoleYAMLSamples { + return &consoleYAMLSamples{ + gentype.NewClientWithListAndApply[*consolev1.ConsoleYAMLSample, *consolev1.ConsoleYAMLSampleList, *applyconfigurationsconsolev1.ConsoleYAMLSampleApplyConfiguration]( + "consoleyamlsamples", + c.RESTClient(), + scheme.ParameterCodec, + "", + func() *consolev1.ConsoleYAMLSample { return &consolev1.ConsoleYAMLSample{} }, + func() *consolev1.ConsoleYAMLSampleList { return &consolev1.ConsoleYAMLSampleList{} }, + ), + } +} diff --git a/vendor/github.com/openshift/client-go/console/clientset/versioned/typed/console/v1/doc.go b/vendor/github.com/openshift/client-go/console/clientset/versioned/typed/console/v1/doc.go new file mode 100644 index 000000000..225e6b2be --- /dev/null +++ b/vendor/github.com/openshift/client-go/console/clientset/versioned/typed/console/v1/doc.go @@ -0,0 +1,4 @@ +// Code generated by client-gen. DO NOT EDIT. + +// This package has the automatically generated typed clients. +package v1 diff --git a/vendor/github.com/openshift/client-go/console/clientset/versioned/typed/console/v1/fake/doc.go b/vendor/github.com/openshift/client-go/console/clientset/versioned/typed/console/v1/fake/doc.go new file mode 100644 index 000000000..2b5ba4c8e --- /dev/null +++ b/vendor/github.com/openshift/client-go/console/clientset/versioned/typed/console/v1/fake/doc.go @@ -0,0 +1,4 @@ +// Code generated by client-gen. DO NOT EDIT. + +// Package fake has the automatically generated clients. +package fake diff --git a/vendor/github.com/openshift/client-go/console/clientset/versioned/typed/console/v1/fake/fake_console_client.go b/vendor/github.com/openshift/client-go/console/clientset/versioned/typed/console/v1/fake/fake_console_client.go new file mode 100644 index 000000000..05fd1edeb --- /dev/null +++ b/vendor/github.com/openshift/client-go/console/clientset/versioned/typed/console/v1/fake/fake_console_client.go @@ -0,0 +1,52 @@ +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + v1 "github.com/openshift/client-go/console/clientset/versioned/typed/console/v1" + rest "k8s.io/client-go/rest" + testing "k8s.io/client-go/testing" +) + +type FakeConsoleV1 struct { + *testing.Fake +} + +func (c *FakeConsoleV1) ConsoleCLIDownloads() v1.ConsoleCLIDownloadInterface { + return newFakeConsoleCLIDownloads(c) +} + +func (c *FakeConsoleV1) ConsoleExternalLogLinks() v1.ConsoleExternalLogLinkInterface { + return newFakeConsoleExternalLogLinks(c) +} + +func (c *FakeConsoleV1) ConsoleLinks() v1.ConsoleLinkInterface { + return newFakeConsoleLinks(c) +} + +func (c *FakeConsoleV1) ConsoleNotifications() v1.ConsoleNotificationInterface { + return newFakeConsoleNotifications(c) +} + +func (c *FakeConsoleV1) ConsolePlugins() v1.ConsolePluginInterface { + return newFakeConsolePlugins(c) +} + +func (c *FakeConsoleV1) ConsoleQuickStarts() v1.ConsoleQuickStartInterface { + return newFakeConsoleQuickStarts(c) +} + +func (c *FakeConsoleV1) ConsoleSamples() v1.ConsoleSampleInterface { + return newFakeConsoleSamples(c) +} + +func (c *FakeConsoleV1) ConsoleYAMLSamples() v1.ConsoleYAMLSampleInterface { + return newFakeConsoleYAMLSamples(c) +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *FakeConsoleV1) RESTClient() rest.Interface { + var ret *rest.RESTClient + return ret +} diff --git a/vendor/github.com/openshift/client-go/console/clientset/versioned/typed/console/v1/fake/fake_consoleclidownload.go b/vendor/github.com/openshift/client-go/console/clientset/versioned/typed/console/v1/fake/fake_consoleclidownload.go new file mode 100644 index 000000000..c4f35849d --- /dev/null +++ b/vendor/github.com/openshift/client-go/console/clientset/versioned/typed/console/v1/fake/fake_consoleclidownload.go @@ -0,0 +1,37 @@ +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + v1 "github.com/openshift/api/console/v1" + consolev1 "github.com/openshift/client-go/console/applyconfigurations/console/v1" + typedconsolev1 "github.com/openshift/client-go/console/clientset/versioned/typed/console/v1" + gentype "k8s.io/client-go/gentype" +) + +// fakeConsoleCLIDownloads implements ConsoleCLIDownloadInterface +type fakeConsoleCLIDownloads struct { + *gentype.FakeClientWithListAndApply[*v1.ConsoleCLIDownload, *v1.ConsoleCLIDownloadList, *consolev1.ConsoleCLIDownloadApplyConfiguration] + Fake *FakeConsoleV1 +} + +func newFakeConsoleCLIDownloads(fake *FakeConsoleV1) typedconsolev1.ConsoleCLIDownloadInterface { + return &fakeConsoleCLIDownloads{ + gentype.NewFakeClientWithListAndApply[*v1.ConsoleCLIDownload, *v1.ConsoleCLIDownloadList, *consolev1.ConsoleCLIDownloadApplyConfiguration]( + fake.Fake, + "", + v1.SchemeGroupVersion.WithResource("consoleclidownloads"), + v1.SchemeGroupVersion.WithKind("ConsoleCLIDownload"), + func() *v1.ConsoleCLIDownload { return &v1.ConsoleCLIDownload{} }, + func() *v1.ConsoleCLIDownloadList { return &v1.ConsoleCLIDownloadList{} }, + func(dst, src *v1.ConsoleCLIDownloadList) { dst.ListMeta = src.ListMeta }, + func(list *v1.ConsoleCLIDownloadList) []*v1.ConsoleCLIDownload { + return gentype.ToPointerSlice(list.Items) + }, + func(list *v1.ConsoleCLIDownloadList, items []*v1.ConsoleCLIDownload) { + list.Items = gentype.FromPointerSlice(items) + }, + ), + fake, + } +} diff --git a/vendor/github.com/openshift/client-go/console/clientset/versioned/typed/console/v1/fake/fake_consoleexternalloglink.go b/vendor/github.com/openshift/client-go/console/clientset/versioned/typed/console/v1/fake/fake_consoleexternalloglink.go new file mode 100644 index 000000000..c48acf872 --- /dev/null +++ b/vendor/github.com/openshift/client-go/console/clientset/versioned/typed/console/v1/fake/fake_consoleexternalloglink.go @@ -0,0 +1,37 @@ +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + v1 "github.com/openshift/api/console/v1" + consolev1 "github.com/openshift/client-go/console/applyconfigurations/console/v1" + typedconsolev1 "github.com/openshift/client-go/console/clientset/versioned/typed/console/v1" + gentype "k8s.io/client-go/gentype" +) + +// fakeConsoleExternalLogLinks implements ConsoleExternalLogLinkInterface +type fakeConsoleExternalLogLinks struct { + *gentype.FakeClientWithListAndApply[*v1.ConsoleExternalLogLink, *v1.ConsoleExternalLogLinkList, *consolev1.ConsoleExternalLogLinkApplyConfiguration] + Fake *FakeConsoleV1 +} + +func newFakeConsoleExternalLogLinks(fake *FakeConsoleV1) typedconsolev1.ConsoleExternalLogLinkInterface { + return &fakeConsoleExternalLogLinks{ + gentype.NewFakeClientWithListAndApply[*v1.ConsoleExternalLogLink, *v1.ConsoleExternalLogLinkList, *consolev1.ConsoleExternalLogLinkApplyConfiguration]( + fake.Fake, + "", + v1.SchemeGroupVersion.WithResource("consoleexternalloglinks"), + v1.SchemeGroupVersion.WithKind("ConsoleExternalLogLink"), + func() *v1.ConsoleExternalLogLink { return &v1.ConsoleExternalLogLink{} }, + func() *v1.ConsoleExternalLogLinkList { return &v1.ConsoleExternalLogLinkList{} }, + func(dst, src *v1.ConsoleExternalLogLinkList) { dst.ListMeta = src.ListMeta }, + func(list *v1.ConsoleExternalLogLinkList) []*v1.ConsoleExternalLogLink { + return gentype.ToPointerSlice(list.Items) + }, + func(list *v1.ConsoleExternalLogLinkList, items []*v1.ConsoleExternalLogLink) { + list.Items = gentype.FromPointerSlice(items) + }, + ), + fake, + } +} diff --git a/vendor/github.com/openshift/client-go/console/clientset/versioned/typed/console/v1/fake/fake_consolelink.go b/vendor/github.com/openshift/client-go/console/clientset/versioned/typed/console/v1/fake/fake_consolelink.go new file mode 100644 index 000000000..fdcc2c3d1 --- /dev/null +++ b/vendor/github.com/openshift/client-go/console/clientset/versioned/typed/console/v1/fake/fake_consolelink.go @@ -0,0 +1,33 @@ +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + v1 "github.com/openshift/api/console/v1" + consolev1 "github.com/openshift/client-go/console/applyconfigurations/console/v1" + typedconsolev1 "github.com/openshift/client-go/console/clientset/versioned/typed/console/v1" + gentype "k8s.io/client-go/gentype" +) + +// fakeConsoleLinks implements ConsoleLinkInterface +type fakeConsoleLinks struct { + *gentype.FakeClientWithListAndApply[*v1.ConsoleLink, *v1.ConsoleLinkList, *consolev1.ConsoleLinkApplyConfiguration] + Fake *FakeConsoleV1 +} + +func newFakeConsoleLinks(fake *FakeConsoleV1) typedconsolev1.ConsoleLinkInterface { + return &fakeConsoleLinks{ + gentype.NewFakeClientWithListAndApply[*v1.ConsoleLink, *v1.ConsoleLinkList, *consolev1.ConsoleLinkApplyConfiguration]( + fake.Fake, + "", + v1.SchemeGroupVersion.WithResource("consolelinks"), + v1.SchemeGroupVersion.WithKind("ConsoleLink"), + func() *v1.ConsoleLink { return &v1.ConsoleLink{} }, + func() *v1.ConsoleLinkList { return &v1.ConsoleLinkList{} }, + func(dst, src *v1.ConsoleLinkList) { dst.ListMeta = src.ListMeta }, + func(list *v1.ConsoleLinkList) []*v1.ConsoleLink { return gentype.ToPointerSlice(list.Items) }, + func(list *v1.ConsoleLinkList, items []*v1.ConsoleLink) { list.Items = gentype.FromPointerSlice(items) }, + ), + fake, + } +} diff --git a/vendor/github.com/openshift/client-go/console/clientset/versioned/typed/console/v1/fake/fake_consolenotification.go b/vendor/github.com/openshift/client-go/console/clientset/versioned/typed/console/v1/fake/fake_consolenotification.go new file mode 100644 index 000000000..09229375d --- /dev/null +++ b/vendor/github.com/openshift/client-go/console/clientset/versioned/typed/console/v1/fake/fake_consolenotification.go @@ -0,0 +1,37 @@ +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + v1 "github.com/openshift/api/console/v1" + consolev1 "github.com/openshift/client-go/console/applyconfigurations/console/v1" + typedconsolev1 "github.com/openshift/client-go/console/clientset/versioned/typed/console/v1" + gentype "k8s.io/client-go/gentype" +) + +// fakeConsoleNotifications implements ConsoleNotificationInterface +type fakeConsoleNotifications struct { + *gentype.FakeClientWithListAndApply[*v1.ConsoleNotification, *v1.ConsoleNotificationList, *consolev1.ConsoleNotificationApplyConfiguration] + Fake *FakeConsoleV1 +} + +func newFakeConsoleNotifications(fake *FakeConsoleV1) typedconsolev1.ConsoleNotificationInterface { + return &fakeConsoleNotifications{ + gentype.NewFakeClientWithListAndApply[*v1.ConsoleNotification, *v1.ConsoleNotificationList, *consolev1.ConsoleNotificationApplyConfiguration]( + fake.Fake, + "", + v1.SchemeGroupVersion.WithResource("consolenotifications"), + v1.SchemeGroupVersion.WithKind("ConsoleNotification"), + func() *v1.ConsoleNotification { return &v1.ConsoleNotification{} }, + func() *v1.ConsoleNotificationList { return &v1.ConsoleNotificationList{} }, + func(dst, src *v1.ConsoleNotificationList) { dst.ListMeta = src.ListMeta }, + func(list *v1.ConsoleNotificationList) []*v1.ConsoleNotification { + return gentype.ToPointerSlice(list.Items) + }, + func(list *v1.ConsoleNotificationList, items []*v1.ConsoleNotification) { + list.Items = gentype.FromPointerSlice(items) + }, + ), + fake, + } +} diff --git a/vendor/github.com/openshift/client-go/console/clientset/versioned/typed/console/v1/fake/fake_consoleplugin.go b/vendor/github.com/openshift/client-go/console/clientset/versioned/typed/console/v1/fake/fake_consoleplugin.go new file mode 100644 index 000000000..ae8618367 --- /dev/null +++ b/vendor/github.com/openshift/client-go/console/clientset/versioned/typed/console/v1/fake/fake_consoleplugin.go @@ -0,0 +1,35 @@ +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + v1 "github.com/openshift/api/console/v1" + consolev1 "github.com/openshift/client-go/console/applyconfigurations/console/v1" + typedconsolev1 "github.com/openshift/client-go/console/clientset/versioned/typed/console/v1" + gentype "k8s.io/client-go/gentype" +) + +// fakeConsolePlugins implements ConsolePluginInterface +type fakeConsolePlugins struct { + *gentype.FakeClientWithListAndApply[*v1.ConsolePlugin, *v1.ConsolePluginList, *consolev1.ConsolePluginApplyConfiguration] + Fake *FakeConsoleV1 +} + +func newFakeConsolePlugins(fake *FakeConsoleV1) typedconsolev1.ConsolePluginInterface { + return &fakeConsolePlugins{ + gentype.NewFakeClientWithListAndApply[*v1.ConsolePlugin, *v1.ConsolePluginList, *consolev1.ConsolePluginApplyConfiguration]( + fake.Fake, + "", + v1.SchemeGroupVersion.WithResource("consoleplugins"), + v1.SchemeGroupVersion.WithKind("ConsolePlugin"), + func() *v1.ConsolePlugin { return &v1.ConsolePlugin{} }, + func() *v1.ConsolePluginList { return &v1.ConsolePluginList{} }, + func(dst, src *v1.ConsolePluginList) { dst.ListMeta = src.ListMeta }, + func(list *v1.ConsolePluginList) []*v1.ConsolePlugin { return gentype.ToPointerSlice(list.Items) }, + func(list *v1.ConsolePluginList, items []*v1.ConsolePlugin) { + list.Items = gentype.FromPointerSlice(items) + }, + ), + fake, + } +} diff --git a/vendor/github.com/openshift/client-go/console/clientset/versioned/typed/console/v1/fake/fake_consolequickstart.go b/vendor/github.com/openshift/client-go/console/clientset/versioned/typed/console/v1/fake/fake_consolequickstart.go new file mode 100644 index 000000000..ea8afc470 --- /dev/null +++ b/vendor/github.com/openshift/client-go/console/clientset/versioned/typed/console/v1/fake/fake_consolequickstart.go @@ -0,0 +1,37 @@ +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + v1 "github.com/openshift/api/console/v1" + consolev1 "github.com/openshift/client-go/console/applyconfigurations/console/v1" + typedconsolev1 "github.com/openshift/client-go/console/clientset/versioned/typed/console/v1" + gentype "k8s.io/client-go/gentype" +) + +// fakeConsoleQuickStarts implements ConsoleQuickStartInterface +type fakeConsoleQuickStarts struct { + *gentype.FakeClientWithListAndApply[*v1.ConsoleQuickStart, *v1.ConsoleQuickStartList, *consolev1.ConsoleQuickStartApplyConfiguration] + Fake *FakeConsoleV1 +} + +func newFakeConsoleQuickStarts(fake *FakeConsoleV1) typedconsolev1.ConsoleQuickStartInterface { + return &fakeConsoleQuickStarts{ + gentype.NewFakeClientWithListAndApply[*v1.ConsoleQuickStart, *v1.ConsoleQuickStartList, *consolev1.ConsoleQuickStartApplyConfiguration]( + fake.Fake, + "", + v1.SchemeGroupVersion.WithResource("consolequickstarts"), + v1.SchemeGroupVersion.WithKind("ConsoleQuickStart"), + func() *v1.ConsoleQuickStart { return &v1.ConsoleQuickStart{} }, + func() *v1.ConsoleQuickStartList { return &v1.ConsoleQuickStartList{} }, + func(dst, src *v1.ConsoleQuickStartList) { dst.ListMeta = src.ListMeta }, + func(list *v1.ConsoleQuickStartList) []*v1.ConsoleQuickStart { + return gentype.ToPointerSlice(list.Items) + }, + func(list *v1.ConsoleQuickStartList, items []*v1.ConsoleQuickStart) { + list.Items = gentype.FromPointerSlice(items) + }, + ), + fake, + } +} diff --git a/vendor/github.com/openshift/client-go/console/clientset/versioned/typed/console/v1/fake/fake_consolesample.go b/vendor/github.com/openshift/client-go/console/clientset/versioned/typed/console/v1/fake/fake_consolesample.go new file mode 100644 index 000000000..55e67ac31 --- /dev/null +++ b/vendor/github.com/openshift/client-go/console/clientset/versioned/typed/console/v1/fake/fake_consolesample.go @@ -0,0 +1,35 @@ +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + v1 "github.com/openshift/api/console/v1" + consolev1 "github.com/openshift/client-go/console/applyconfigurations/console/v1" + typedconsolev1 "github.com/openshift/client-go/console/clientset/versioned/typed/console/v1" + gentype "k8s.io/client-go/gentype" +) + +// fakeConsoleSamples implements ConsoleSampleInterface +type fakeConsoleSamples struct { + *gentype.FakeClientWithListAndApply[*v1.ConsoleSample, *v1.ConsoleSampleList, *consolev1.ConsoleSampleApplyConfiguration] + Fake *FakeConsoleV1 +} + +func newFakeConsoleSamples(fake *FakeConsoleV1) typedconsolev1.ConsoleSampleInterface { + return &fakeConsoleSamples{ + gentype.NewFakeClientWithListAndApply[*v1.ConsoleSample, *v1.ConsoleSampleList, *consolev1.ConsoleSampleApplyConfiguration]( + fake.Fake, + "", + v1.SchemeGroupVersion.WithResource("consolesamples"), + v1.SchemeGroupVersion.WithKind("ConsoleSample"), + func() *v1.ConsoleSample { return &v1.ConsoleSample{} }, + func() *v1.ConsoleSampleList { return &v1.ConsoleSampleList{} }, + func(dst, src *v1.ConsoleSampleList) { dst.ListMeta = src.ListMeta }, + func(list *v1.ConsoleSampleList) []*v1.ConsoleSample { return gentype.ToPointerSlice(list.Items) }, + func(list *v1.ConsoleSampleList, items []*v1.ConsoleSample) { + list.Items = gentype.FromPointerSlice(items) + }, + ), + fake, + } +} diff --git a/vendor/github.com/openshift/client-go/console/clientset/versioned/typed/console/v1/fake/fake_consoleyamlsample.go b/vendor/github.com/openshift/client-go/console/clientset/versioned/typed/console/v1/fake/fake_consoleyamlsample.go new file mode 100644 index 000000000..fe399cd57 --- /dev/null +++ b/vendor/github.com/openshift/client-go/console/clientset/versioned/typed/console/v1/fake/fake_consoleyamlsample.go @@ -0,0 +1,37 @@ +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + v1 "github.com/openshift/api/console/v1" + consolev1 "github.com/openshift/client-go/console/applyconfigurations/console/v1" + typedconsolev1 "github.com/openshift/client-go/console/clientset/versioned/typed/console/v1" + gentype "k8s.io/client-go/gentype" +) + +// fakeConsoleYAMLSamples implements ConsoleYAMLSampleInterface +type fakeConsoleYAMLSamples struct { + *gentype.FakeClientWithListAndApply[*v1.ConsoleYAMLSample, *v1.ConsoleYAMLSampleList, *consolev1.ConsoleYAMLSampleApplyConfiguration] + Fake *FakeConsoleV1 +} + +func newFakeConsoleYAMLSamples(fake *FakeConsoleV1) typedconsolev1.ConsoleYAMLSampleInterface { + return &fakeConsoleYAMLSamples{ + gentype.NewFakeClientWithListAndApply[*v1.ConsoleYAMLSample, *v1.ConsoleYAMLSampleList, *consolev1.ConsoleYAMLSampleApplyConfiguration]( + fake.Fake, + "", + v1.SchemeGroupVersion.WithResource("consoleyamlsamples"), + v1.SchemeGroupVersion.WithKind("ConsoleYAMLSample"), + func() *v1.ConsoleYAMLSample { return &v1.ConsoleYAMLSample{} }, + func() *v1.ConsoleYAMLSampleList { return &v1.ConsoleYAMLSampleList{} }, + func(dst, src *v1.ConsoleYAMLSampleList) { dst.ListMeta = src.ListMeta }, + func(list *v1.ConsoleYAMLSampleList) []*v1.ConsoleYAMLSample { + return gentype.ToPointerSlice(list.Items) + }, + func(list *v1.ConsoleYAMLSampleList, items []*v1.ConsoleYAMLSample) { + list.Items = gentype.FromPointerSlice(items) + }, + ), + fake, + } +} diff --git a/vendor/github.com/openshift/client-go/console/clientset/versioned/typed/console/v1/generated_expansion.go b/vendor/github.com/openshift/client-go/console/clientset/versioned/typed/console/v1/generated_expansion.go new file mode 100644 index 000000000..8b3c38878 --- /dev/null +++ b/vendor/github.com/openshift/client-go/console/clientset/versioned/typed/console/v1/generated_expansion.go @@ -0,0 +1,19 @@ +// Code generated by client-gen. DO NOT EDIT. + +package v1 + +type ConsoleCLIDownloadExpansion interface{} + +type ConsoleExternalLogLinkExpansion interface{} + +type ConsoleLinkExpansion interface{} + +type ConsoleNotificationExpansion interface{} + +type ConsolePluginExpansion interface{} + +type ConsoleQuickStartExpansion interface{} + +type ConsoleSampleExpansion interface{} + +type ConsoleYAMLSampleExpansion interface{} diff --git a/vendor/modules.txt b/vendor/modules.txt index 84332810c..27ac9836c 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -1363,6 +1363,14 @@ github.com/openshift/client-go/config/informers/externalversions/internalinterfa github.com/openshift/client-go/config/listers/config/v1 github.com/openshift/client-go/config/listers/config/v1alpha1 github.com/openshift/client-go/config/listers/config/v1alpha2 +github.com/openshift/client-go/console/applyconfigurations +github.com/openshift/client-go/console/applyconfigurations/console/v1 +github.com/openshift/client-go/console/applyconfigurations/internal +github.com/openshift/client-go/console/clientset/versioned +github.com/openshift/client-go/console/clientset/versioned/fake +github.com/openshift/client-go/console/clientset/versioned/scheme +github.com/openshift/client-go/console/clientset/versioned/typed/console/v1 +github.com/openshift/client-go/console/clientset/versioned/typed/console/v1/fake github.com/openshift/client-go/operator/applyconfigurations/internal github.com/openshift/client-go/operator/applyconfigurations/operator/v1 github.com/openshift/client-go/operator/clientset/versioned/scheme