From 84be34e7d6279d6e75b8d7dd2d216b4fe9d467d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Ho=C3=9F?= Date: Fri, 9 May 2025 15:45:49 +0200 Subject: [PATCH] add missing resources for external-secrets MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fixes #389 Co-authored-by: Chris Olstrom Signed-off-by: Sebastian Hoß --- ...release-generators_external_secrets_io.yml | 69 + Cargo.toml | 1 + README.md | 1 + code-generator/src/catalog.rs | 16 + .../v1alpha1/clusterpushsecrets.yaml | 461 +++++ .../v1alpha1/pushsecrets.ignore | 1 + .../v1alpha1/pushsecrets.yaml | 429 +++++ .../v1alpha1/acraccesstokens.yaml | 154 ++ .../v1alpha1/clustergenerators.yaml | 1412 +++++++++++++++ .../v1alpha1/ecrauthorizationtokens.yaml | 153 ++ .../v1alpha1/fakes.yaml | 50 + .../v1alpha1/gcraccesstokens.yaml | 112 ++ .../v1alpha1/generatorstates.yaml | 83 + .../v1alpha1/githubaccesstokens.yaml | 95 + .../v1alpha1/grafanas.yaml | 107 ++ .../v1alpha1/passwords.yaml | 67 + .../v1alpha1/quayaccesstokens.yaml | 73 + .../v1alpha1/stssessiontokens.yaml | 164 ++ .../v1alpha1/uuids.yaml | 41 + .../v1alpha1/vaultdynamicsecrets.yaml | 652 +++++++ .../v1alpha1/webhooks.yaml | 132 ++ .../external_secrets_io/README.md | 1 + .../external_secrets_io/src/lib.rs | 1 + .../src/v1/clusterexternalsecrets.rs | 2 +- .../src/v1/clustersecretstores.rs | 2 +- .../src/v1/externalsecrets.rs | 2 +- .../src/v1/secretstores.rs | 2 +- .../src/v1alpha1/clusterpushsecrets.rs | 427 +++++ .../src/v1alpha1/clustersecretstores.rs | 2 +- .../src/v1alpha1/externalsecrets.rs | 2 +- .../external_secrets_io/src/v1alpha1/mod.rs | 1 + .../src/v1alpha1/secretstores.rs | 2 +- .../src/v1beta1/clusterexternalsecrets.rs | 2 +- .../src/v1beta1/clustersecretstores.rs | 2 +- .../src/v1beta1/externalsecrets.rs | 2 +- .../src/v1beta1/secretstores.rs | 2 +- .../generators_external_secrets_io/Cargo.toml | 32 + .../generators_external_secrets_io/README.md | 28 + .../generators_external_secrets_io/src/lib.rs | 23 + .../src/v1alpha1/acraccesstokens.rs | 159 ++ .../src/v1alpha1/clustergenerators.rs | 1532 +++++++++++++++++ .../src/v1alpha1/ecrauthorizationtokens.rs | 136 ++ .../src/v1alpha1/fakes.rs | 30 + .../src/v1alpha1/gcraccesstokens.rs | 86 + .../src/v1alpha1/generatorstates.rs | 42 + .../src/v1alpha1/githubaccesstokens.rs | 69 + .../src/v1alpha1/grafanas.rs | 97 ++ .../src/v1alpha1/mod.rs | 14 + .../src/v1alpha1/passwords.rs | 42 + .../src/v1alpha1/quayaccesstokens.rs | 45 + .../src/v1alpha1/stssessiontokens.rs | 154 ++ .../src/v1alpha1/uuids.rs | 21 + .../src/v1alpha1/vaultdynamicsecrets.rs | 706 ++++++++ .../src/v1alpha1/webhooks.rs | 102 ++ 54 files changed, 8032 insertions(+), 11 deletions(-) create mode 100644 .github/workflows/release-generators_external_secrets_io.yml create mode 100644 crd-catalog/external-secrets/external-secrets/external-secrets.io/v1alpha1/clusterpushsecrets.yaml create mode 100644 crd-catalog/external-secrets/external-secrets/external-secrets.io/v1alpha1/pushsecrets.ignore create mode 100644 crd-catalog/external-secrets/external-secrets/external-secrets.io/v1alpha1/pushsecrets.yaml create mode 100644 crd-catalog/external-secrets/external-secrets/generators.external-secrets.io/v1alpha1/acraccesstokens.yaml create mode 100644 crd-catalog/external-secrets/external-secrets/generators.external-secrets.io/v1alpha1/clustergenerators.yaml create mode 100644 crd-catalog/external-secrets/external-secrets/generators.external-secrets.io/v1alpha1/ecrauthorizationtokens.yaml create mode 100644 crd-catalog/external-secrets/external-secrets/generators.external-secrets.io/v1alpha1/fakes.yaml create mode 100644 crd-catalog/external-secrets/external-secrets/generators.external-secrets.io/v1alpha1/gcraccesstokens.yaml create mode 100644 crd-catalog/external-secrets/external-secrets/generators.external-secrets.io/v1alpha1/generatorstates.yaml create mode 100644 crd-catalog/external-secrets/external-secrets/generators.external-secrets.io/v1alpha1/githubaccesstokens.yaml create mode 100644 crd-catalog/external-secrets/external-secrets/generators.external-secrets.io/v1alpha1/grafanas.yaml create mode 100644 crd-catalog/external-secrets/external-secrets/generators.external-secrets.io/v1alpha1/passwords.yaml create mode 100644 crd-catalog/external-secrets/external-secrets/generators.external-secrets.io/v1alpha1/quayaccesstokens.yaml create mode 100644 crd-catalog/external-secrets/external-secrets/generators.external-secrets.io/v1alpha1/stssessiontokens.yaml create mode 100644 crd-catalog/external-secrets/external-secrets/generators.external-secrets.io/v1alpha1/uuids.yaml create mode 100644 crd-catalog/external-secrets/external-secrets/generators.external-secrets.io/v1alpha1/vaultdynamicsecrets.yaml create mode 100644 crd-catalog/external-secrets/external-secrets/generators.external-secrets.io/v1alpha1/webhooks.yaml create mode 100644 custom-resources/external_secrets_io/src/v1alpha1/clusterpushsecrets.rs create mode 100644 custom-resources/generators_external_secrets_io/Cargo.toml create mode 100644 custom-resources/generators_external_secrets_io/README.md create mode 100644 custom-resources/generators_external_secrets_io/src/lib.rs create mode 100644 custom-resources/generators_external_secrets_io/src/v1alpha1/acraccesstokens.rs create mode 100644 custom-resources/generators_external_secrets_io/src/v1alpha1/clustergenerators.rs create mode 100644 custom-resources/generators_external_secrets_io/src/v1alpha1/ecrauthorizationtokens.rs create mode 100644 custom-resources/generators_external_secrets_io/src/v1alpha1/fakes.rs create mode 100644 custom-resources/generators_external_secrets_io/src/v1alpha1/gcraccesstokens.rs create mode 100644 custom-resources/generators_external_secrets_io/src/v1alpha1/generatorstates.rs create mode 100644 custom-resources/generators_external_secrets_io/src/v1alpha1/githubaccesstokens.rs create mode 100644 custom-resources/generators_external_secrets_io/src/v1alpha1/grafanas.rs create mode 100644 custom-resources/generators_external_secrets_io/src/v1alpha1/mod.rs create mode 100644 custom-resources/generators_external_secrets_io/src/v1alpha1/passwords.rs create mode 100644 custom-resources/generators_external_secrets_io/src/v1alpha1/quayaccesstokens.rs create mode 100644 custom-resources/generators_external_secrets_io/src/v1alpha1/stssessiontokens.rs create mode 100644 custom-resources/generators_external_secrets_io/src/v1alpha1/uuids.rs create mode 100644 custom-resources/generators_external_secrets_io/src/v1alpha1/vaultdynamicsecrets.rs create mode 100644 custom-resources/generators_external_secrets_io/src/v1alpha1/webhooks.rs diff --git a/.github/workflows/release-generators_external_secrets_io.yml b/.github/workflows/release-generators_external_secrets_io.yml new file mode 100644 index 000000000..363f38e40 --- /dev/null +++ b/.github/workflows/release-generators_external_secrets_io.yml @@ -0,0 +1,69 @@ +# SPDX-FileCopyrightText: The kube-custom-resources-rs Authors +# SPDX-License-Identifier: 0BSD + +name: Release generators_external_secrets_io +on: + schedule: + - cron: 12 11 * * WED + workflow_dispatch: +jobs: + release: + runs-on: ubuntu-latest + permissions: + contents: read + steps: + - id: checkout + name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - id: commits + name: Count Commits + run: echo "count=$(git rev-list --count HEAD --since='last Wednesday' -- custom-resources/generators_external_secrets_io)" >> $GITHUB_OUTPUT + - id: release + name: Create Release Version + if: steps.commits.outputs.count > 0 + run: echo "version=1.$(date --utc +'%Y%m%d').$(date --utc +'%-H%M%S')" >> $GITHUB_OUTPUT + - name: Set up Rust + if: steps.commits.outputs.count > 0 + uses: dtolnay/rust-toolchain@stable + - name: Install cargo-workspaces + uses: taiki-e/install-action@v2 + with: + tool: cargo-edit + - name: Cargo Version + if: steps.commits.outputs.count > 0 + run: cargo set-version --package kcr_generators_external_secrets_io ${{ steps.release.outputs.version }} + - name: Publish to crates.io + if: steps.commits.outputs.count > 0 + run: > + cargo publish + --allow-dirty + --token ${{ secrets.CRATES_IO_TOKEN }} + --package kcr_generators_external_secrets_io + --jobs 1 + --no-verify + env: + RUSTFLAGS: "-A warnings" + - id: mail + name: Send Mail + if: steps.commits.outputs.count > 0 + uses: dawidd6/action-send-mail@v4 + with: + server_address: ${{ secrets.MAIL_SERVER }} + server_port: ${{ secrets.MAIL_PORT }} + username: ${{ secrets.MAIL_USERNAME }} + password: ${{ secrets.MAIL_PASSWORD }} + subject: ${{ github.event.repository.name }}/generators_external_secrets_io version ${{ steps.release.outputs.version }} published + body: See ${{ steps.create_release.outputs.url }} for details. + to: ${{ secrets.MAIL_RECIPIENT }} + from: ${{ secrets.MAIL_SENDER }} + - id: matrix + name: Send Matrix Message + if: steps.commits.outputs.count > 0 + uses: s3krit/matrix-message-action@v0.0.3 + with: + room_id: ${{ secrets.MATRIX_ROOM_ID }} + access_token: ${{ secrets.MATRIX_ACCESS_TOKEN }} + message: ${{ github.event.repository.name }}/generators_external_secrets_io version [${{ steps.release.outputs.version }}](${{ steps.create_release.outputs.url }}) published + server: ${{ secrets.MATRIX_SERVER }} diff --git a/Cargo.toml b/Cargo.toml index ca2b650ba..cc11facb2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -160,6 +160,7 @@ members = [ "custom-resources/gateway_networking_k8s_io", "custom-resources/gateway_networking_x_k8s_io", "custom-resources/gateway_nginx_org", + "custom-resources/generators_external_secrets_io", "custom-resources/getambassador_io", "custom-resources/gitops_hybrid_cloud_patterns_io", "custom-resources/grafana_integreatly_org", diff --git a/README.md b/README.md index a4baad694..ed7181a24 100644 --- a/README.md +++ b/README.md @@ -200,6 +200,7 @@ The following groups are available: - [gateway.networking.k8s.io](https://crates.io/crates/kcr_gateway_networking_k8s_io) - [gateway.networking.x-k8s.io](https://crates.io/crates/kcr_gateway_networking_x_k8s_io) - [gateway.nginx.org](https://crates.io/crates/kcr_gateway_nginx_org) +- [generators.external-secrets.io](https://crates.io/crates/kcr_generators_external_secrets_io) - [getambassador.io](https://crates.io/crates/kcr_getambassador_io) - [gitops.hybrid-cloud-patterns.io](https://crates.io/crates/kcr_gitops_hybrid_cloud_patterns_io) - [grafana.integreatly.org](https://crates.io/crates/kcr_grafana_integreatly_org) diff --git a/code-generator/src/catalog.rs b/code-generator/src/catalog.rs index 6edd9a041..a99daa937 100644 --- a/code-generator/src/catalog.rs +++ b/code-generator/src/catalog.rs @@ -1305,9 +1305,25 @@ pub const CRD_V1_SOURCES: &'static [UpstreamSource] = &[ license: APACHE_V2, urls: &[ "https://github.com/external-secrets/external-secrets/blob/main/config/crds/bases/external-secrets.io_clusterexternalsecrets.yaml", + "https://github.com/external-secrets/external-secrets/blob/main/config/crds/bases/external-secrets.io_clusterpushsecrets.yaml", "https://github.com/external-secrets/external-secrets/blob/main/config/crds/bases/external-secrets.io_clustersecretstores.yaml", "https://github.com/external-secrets/external-secrets/blob/main/config/crds/bases/external-secrets.io_externalsecrets.yaml", + "https://github.com/external-secrets/external-secrets/blob/main/config/crds/bases/external-secrets.io_pushsecrets.yaml", "https://github.com/external-secrets/external-secrets/blob/main/config/crds/bases/external-secrets.io_secretstores.yaml", + "https://github.com/external-secrets/external-secrets/blob/main/config/crds/bases/generators.external-secrets.io_acraccesstokens.yaml", + "https://github.com/external-secrets/external-secrets/blob/main/config/crds/bases/generators.external-secrets.io_clustergenerators.yaml", + "https://github.com/external-secrets/external-secrets/blob/main/config/crds/bases/generators.external-secrets.io_ecrauthorizationtokens.yaml", + "https://github.com/external-secrets/external-secrets/blob/main/config/crds/bases/generators.external-secrets.io_fakes.yaml", + "https://github.com/external-secrets/external-secrets/blob/main/config/crds/bases/generators.external-secrets.io_gcraccesstokens.yaml", + "https://github.com/external-secrets/external-secrets/blob/main/config/crds/bases/generators.external-secrets.io_generatorstates.yaml", + "https://github.com/external-secrets/external-secrets/blob/main/config/crds/bases/generators.external-secrets.io_githubaccesstokens.yaml", + "https://github.com/external-secrets/external-secrets/blob/main/config/crds/bases/generators.external-secrets.io_grafanas.yaml", + "https://github.com/external-secrets/external-secrets/blob/main/config/crds/bases/generators.external-secrets.io_passwords.yaml", + "https://github.com/external-secrets/external-secrets/blob/main/config/crds/bases/generators.external-secrets.io_quayaccesstokens.yaml", + "https://github.com/external-secrets/external-secrets/blob/main/config/crds/bases/generators.external-secrets.io_stssessiontokens.yaml", + "https://github.com/external-secrets/external-secrets/blob/main/config/crds/bases/generators.external-secrets.io_uuids.yaml", + "https://github.com/external-secrets/external-secrets/blob/main/config/crds/bases/generators.external-secrets.io_vaultdynamicsecrets.yaml", + "https://github.com/external-secrets/external-secrets/blob/main/config/crds/bases/generators.external-secrets.io_webhooks.yaml", ], ignores: &[], }, diff --git a/crd-catalog/external-secrets/external-secrets/external-secrets.io/v1alpha1/clusterpushsecrets.yaml b/crd-catalog/external-secrets/external-secrets/external-secrets.io/v1alpha1/clusterpushsecrets.yaml new file mode 100644 index 000000000..d18433d91 --- /dev/null +++ b/crd-catalog/external-secrets/external-secrets/external-secrets.io/v1alpha1/clusterpushsecrets.yaml @@ -0,0 +1,461 @@ +apiVersion: "apiextensions.k8s.io/v1" +kind: "CustomResourceDefinition" +metadata: + annotations: + controller-gen.kubebuilder.io/version: "v0.17.3" + labels: + external-secrets.io/component: "controller" + name: "clusterpushsecrets.external-secrets.io" +spec: + group: "external-secrets.io" + names: + categories: + - "external-secrets" + kind: "ClusterPushSecret" + listKind: "ClusterPushSecretList" + plural: "clusterpushsecrets" + singular: "clusterpushsecret" + scope: "Cluster" + versions: + - additionalPrinterColumns: + - jsonPath: ".metadata.creationTimestamp" + name: "AGE" + type: "date" + - jsonPath: ".status.conditions[?(@.type==\"Ready\")].reason" + name: "Status" + type: "string" + name: "v1alpha1" + schema: + openAPIV3Schema: + properties: + apiVersion: + description: "APIVersion defines the versioned schema of this representation of an object.\nServers should convert recognized schemas to the latest internal value, and\nmay reject unrecognized values.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources" + type: "string" + kind: + description: "Kind is a string value representing the REST resource this object represents.\nServers may infer this from the endpoint the client submits requests to.\nCannot be updated.\nIn CamelCase.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds" + type: "string" + metadata: + type: "object" + spec: + properties: + namespaceSelectors: + description: "A list of labels to select by to find the Namespaces to create the ExternalSecrets in. The selectors are ORed." + items: + description: "A label selector is a label query over a set of resources. The result of matchLabels and\nmatchExpressions are ANDed. An empty label selector matches all objects. A null\nlabel selector matches no objects." + properties: + matchExpressions: + description: "matchExpressions is a list of label selector requirements. The requirements are ANDed." + items: + description: "A label selector requirement is a selector that contains values, a key, and an operator that\nrelates the key and values." + properties: + key: + description: "key is the label key that the selector applies to." + type: "string" + operator: + description: "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist." + type: "string" + values: + description: "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch." + items: + type: "string" + type: "array" + x-kubernetes-list-type: "atomic" + required: + - "key" + - "operator" + type: "object" + type: "array" + x-kubernetes-list-type: "atomic" + matchLabels: + additionalProperties: + type: "string" + description: "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed." + type: "object" + type: "object" + x-kubernetes-map-type: "atomic" + type: "array" + pushSecretMetadata: + description: "The metadata of the external secrets to be created" + properties: + annotations: + additionalProperties: + type: "string" + type: "object" + labels: + additionalProperties: + type: "string" + type: "object" + type: "object" + pushSecretName: + description: "The name of the push secrets to be created.\nDefaults to the name of the ClusterPushSecret" + maxLength: 253 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$" + type: "string" + pushSecretSpec: + description: "PushSecretSpec defines what to do with the secrets." + properties: + data: + description: "Secret Data that should be pushed to providers" + items: + properties: + conversionStrategy: + default: "None" + description: "Used to define a conversion Strategy for the secret keys" + enum: + - "None" + - "ReverseUnicode" + type: "string" + match: + description: "Match a given Secret Key to be pushed to the provider." + properties: + remoteRef: + description: "Remote Refs to push to providers." + properties: + property: + description: "Name of the property in the resulting secret" + type: "string" + remoteKey: + description: "Name of the resulting provider secret." + type: "string" + required: + - "remoteKey" + type: "object" + secretKey: + description: "Secret Key to be pushed" + type: "string" + required: + - "remoteRef" + type: "object" + metadata: + description: "Metadata is metadata attached to the secret.\nThe structure of metadata is provider specific, please look it up in the provider documentation." + x-kubernetes-preserve-unknown-fields: true + required: + - "match" + type: "object" + type: "array" + deletionPolicy: + default: "None" + description: "Deletion Policy to handle Secrets in the provider." + enum: + - "Delete" + - "None" + type: "string" + refreshInterval: + default: "1h" + description: "The Interval to which External Secrets will try to push a secret definition" + type: "string" + secretStoreRefs: + items: + properties: + kind: + default: "SecretStore" + description: "Kind of the SecretStore resource (SecretStore or ClusterSecretStore)" + enum: + - "SecretStore" + - "ClusterSecretStore" + type: "string" + labelSelector: + description: "Optionally, sync to secret stores with label selector" + properties: + matchExpressions: + description: "matchExpressions is a list of label selector requirements. The requirements are ANDed." + items: + description: "A label selector requirement is a selector that contains values, a key, and an operator that\nrelates the key and values." + properties: + key: + description: "key is the label key that the selector applies to." + type: "string" + operator: + description: "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist." + type: "string" + values: + description: "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch." + items: + type: "string" + type: "array" + x-kubernetes-list-type: "atomic" + required: + - "key" + - "operator" + type: "object" + type: "array" + x-kubernetes-list-type: "atomic" + matchLabels: + additionalProperties: + type: "string" + description: "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed." + type: "object" + type: "object" + x-kubernetes-map-type: "atomic" + name: + description: "Optionally, sync to the SecretStore of the given name" + maxLength: 253 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$" + type: "string" + type: "object" + type: "array" + selector: + description: "The Secret Selector (k8s source) for the Push Secret" + maxProperties: 1 + minProperties: 1 + properties: + generatorRef: + description: "Point to a generator to create a Secret." + properties: + apiVersion: + default: "generators.external-secrets.io/v1alpha1" + description: "Specify the apiVersion of the generator resource" + type: "string" + kind: + description: "Specify the Kind of the generator resource" + enum: + - "ACRAccessToken" + - "ClusterGenerator" + - "ECRAuthorizationToken" + - "Fake" + - "GCRAccessToken" + - "GithubAccessToken" + - "QuayAccessToken" + - "Password" + - "STSSessionToken" + - "UUID" + - "VaultDynamicSecret" + - "Webhook" + - "Grafana" + type: "string" + name: + description: "Specify the name of the generator resource" + maxLength: 253 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$" + type: "string" + required: + - "kind" + - "name" + type: "object" + secret: + description: "Select a Secret to Push." + properties: + name: + description: "Name of the Secret.\nThe Secret must exist in the same namespace as the PushSecret manifest." + maxLength: 253 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$" + type: "string" + selector: + description: "Selector chooses secrets using a labelSelector." + properties: + matchExpressions: + description: "matchExpressions is a list of label selector requirements. The requirements are ANDed." + items: + description: "A label selector requirement is a selector that contains values, a key, and an operator that\nrelates the key and values." + properties: + key: + description: "key is the label key that the selector applies to." + type: "string" + operator: + description: "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist." + type: "string" + values: + description: "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch." + items: + type: "string" + type: "array" + x-kubernetes-list-type: "atomic" + required: + - "key" + - "operator" + type: "object" + type: "array" + x-kubernetes-list-type: "atomic" + matchLabels: + additionalProperties: + type: "string" + description: "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed." + type: "object" + type: "object" + x-kubernetes-map-type: "atomic" + type: "object" + type: "object" + template: + description: "Template defines a blueprint for the created Secret resource." + properties: + data: + additionalProperties: + type: "string" + type: "object" + engineVersion: + default: "v2" + description: "EngineVersion specifies the template engine version\nthat should be used to compile/execute the\ntemplate specified in .data and .templateFrom[]." + enum: + - "v2" + type: "string" + mergePolicy: + default: "Replace" + enum: + - "Replace" + - "Merge" + type: "string" + metadata: + description: "ExternalSecretTemplateMetadata defines metadata fields for the Secret blueprint." + properties: + annotations: + additionalProperties: + type: "string" + type: "object" + labels: + additionalProperties: + type: "string" + type: "object" + type: "object" + templateFrom: + items: + properties: + configMap: + properties: + items: + description: "A list of keys in the ConfigMap/Secret to use as templates for Secret data" + items: + properties: + key: + description: "A key in the ConfigMap/Secret" + maxLength: 253 + minLength: 1 + pattern: "^[-._a-zA-Z0-9]+$" + type: "string" + templateAs: + default: "Values" + enum: + - "Values" + - "KeysAndValues" + type: "string" + required: + - "key" + type: "object" + type: "array" + name: + description: "The name of the ConfigMap/Secret resource" + maxLength: 253 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$" + type: "string" + required: + - "items" + - "name" + type: "object" + literal: + type: "string" + secret: + properties: + items: + description: "A list of keys in the ConfigMap/Secret to use as templates for Secret data" + items: + properties: + key: + description: "A key in the ConfigMap/Secret" + maxLength: 253 + minLength: 1 + pattern: "^[-._a-zA-Z0-9]+$" + type: "string" + templateAs: + default: "Values" + enum: + - "Values" + - "KeysAndValues" + type: "string" + required: + - "key" + type: "object" + type: "array" + name: + description: "The name of the ConfigMap/Secret resource" + maxLength: 253 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$" + type: "string" + required: + - "items" + - "name" + type: "object" + target: + default: "Data" + enum: + - "Data" + - "Annotations" + - "Labels" + type: "string" + type: "object" + type: "array" + type: + type: "string" + type: "object" + updatePolicy: + default: "Replace" + description: "UpdatePolicy to handle Secrets in the provider." + enum: + - "Replace" + - "IfNotExists" + type: "string" + required: + - "secretStoreRefs" + - "selector" + type: "object" + refreshTime: + description: "The time in which the controller should reconcile its objects and recheck namespaces for labels." + type: "string" + required: + - "pushSecretSpec" + type: "object" + status: + properties: + conditions: + items: + description: "PushSecretStatusCondition indicates the status of the PushSecret." + properties: + lastTransitionTime: + format: "date-time" + type: "string" + message: + type: "string" + reason: + type: "string" + status: + type: "string" + type: + description: "PushSecretConditionType indicates the condition of the PushSecret." + type: "string" + required: + - "status" + - "type" + type: "object" + type: "array" + failedNamespaces: + description: "Failed namespaces are the namespaces that failed to apply an PushSecret" + items: + description: "ClusterPushSecretNamespaceFailure represents a failed namespace deployment and it's reason." + properties: + namespace: + description: "Namespace is the namespace that failed when trying to apply an PushSecret" + type: "string" + reason: + description: "Reason is why the PushSecret failed to apply to the namespace" + type: "string" + required: + - "namespace" + type: "object" + type: "array" + provisionedNamespaces: + description: "ProvisionedNamespaces are the namespaces where the ClusterPushSecret has secrets" + items: + type: "string" + type: "array" + pushSecretName: + type: "string" + type: "object" + type: "object" + served: true + storage: true + subresources: + status: {} diff --git a/crd-catalog/external-secrets/external-secrets/external-secrets.io/v1alpha1/pushsecrets.ignore b/crd-catalog/external-secrets/external-secrets/external-secrets.io/v1alpha1/pushsecrets.ignore new file mode 100644 index 000000000..1570a2e81 --- /dev/null +++ b/crd-catalog/external-secrets/external-secrets/external-secrets.io/v1alpha1/pushsecrets.ignore @@ -0,0 +1 @@ +cannot find type `PushSecretStatusSyncedPushSecrets` in this scope diff --git a/crd-catalog/external-secrets/external-secrets/external-secrets.io/v1alpha1/pushsecrets.yaml b/crd-catalog/external-secrets/external-secrets/external-secrets.io/v1alpha1/pushsecrets.yaml new file mode 100644 index 000000000..593322fad --- /dev/null +++ b/crd-catalog/external-secrets/external-secrets/external-secrets.io/v1alpha1/pushsecrets.yaml @@ -0,0 +1,429 @@ +apiVersion: "apiextensions.k8s.io/v1" +kind: "CustomResourceDefinition" +metadata: + annotations: + controller-gen.kubebuilder.io/version: "v0.17.3" + labels: + external-secrets.io/component: "controller" + name: "pushsecrets.external-secrets.io" +spec: + group: "external-secrets.io" + names: + categories: + - "external-secrets" + kind: "PushSecret" + listKind: "PushSecretList" + plural: "pushsecrets" + shortNames: + - "ps" + singular: "pushsecret" + scope: "Namespaced" + versions: + - additionalPrinterColumns: + - jsonPath: ".metadata.creationTimestamp" + name: "AGE" + type: "date" + - jsonPath: ".status.conditions[?(@.type==\"Ready\")].reason" + name: "Status" + type: "string" + name: "v1alpha1" + schema: + openAPIV3Schema: + properties: + apiVersion: + description: "APIVersion defines the versioned schema of this representation of an object.\nServers should convert recognized schemas to the latest internal value, and\nmay reject unrecognized values.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources" + type: "string" + kind: + description: "Kind is a string value representing the REST resource this object represents.\nServers may infer this from the endpoint the client submits requests to.\nCannot be updated.\nIn CamelCase.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds" + type: "string" + metadata: + type: "object" + spec: + description: "PushSecretSpec configures the behavior of the PushSecret." + properties: + data: + description: "Secret Data that should be pushed to providers" + items: + properties: + conversionStrategy: + default: "None" + description: "Used to define a conversion Strategy for the secret keys" + enum: + - "None" + - "ReverseUnicode" + type: "string" + match: + description: "Match a given Secret Key to be pushed to the provider." + properties: + remoteRef: + description: "Remote Refs to push to providers." + properties: + property: + description: "Name of the property in the resulting secret" + type: "string" + remoteKey: + description: "Name of the resulting provider secret." + type: "string" + required: + - "remoteKey" + type: "object" + secretKey: + description: "Secret Key to be pushed" + type: "string" + required: + - "remoteRef" + type: "object" + metadata: + description: "Metadata is metadata attached to the secret.\nThe structure of metadata is provider specific, please look it up in the provider documentation." + x-kubernetes-preserve-unknown-fields: true + required: + - "match" + type: "object" + type: "array" + deletionPolicy: + default: "None" + description: "Deletion Policy to handle Secrets in the provider." + enum: + - "Delete" + - "None" + type: "string" + refreshInterval: + default: "1h" + description: "The Interval to which External Secrets will try to push a secret definition" + type: "string" + secretStoreRefs: + items: + properties: + kind: + default: "SecretStore" + description: "Kind of the SecretStore resource (SecretStore or ClusterSecretStore)" + enum: + - "SecretStore" + - "ClusterSecretStore" + type: "string" + labelSelector: + description: "Optionally, sync to secret stores with label selector" + properties: + matchExpressions: + description: "matchExpressions is a list of label selector requirements. The requirements are ANDed." + items: + description: "A label selector requirement is a selector that contains values, a key, and an operator that\nrelates the key and values." + properties: + key: + description: "key is the label key that the selector applies to." + type: "string" + operator: + description: "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist." + type: "string" + values: + description: "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch." + items: + type: "string" + type: "array" + x-kubernetes-list-type: "atomic" + required: + - "key" + - "operator" + type: "object" + type: "array" + x-kubernetes-list-type: "atomic" + matchLabels: + additionalProperties: + type: "string" + description: "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed." + type: "object" + type: "object" + x-kubernetes-map-type: "atomic" + name: + description: "Optionally, sync to the SecretStore of the given name" + maxLength: 253 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$" + type: "string" + type: "object" + type: "array" + selector: + description: "The Secret Selector (k8s source) for the Push Secret" + maxProperties: 1 + minProperties: 1 + properties: + generatorRef: + description: "Point to a generator to create a Secret." + properties: + apiVersion: + default: "generators.external-secrets.io/v1alpha1" + description: "Specify the apiVersion of the generator resource" + type: "string" + kind: + description: "Specify the Kind of the generator resource" + enum: + - "ACRAccessToken" + - "ClusterGenerator" + - "ECRAuthorizationToken" + - "Fake" + - "GCRAccessToken" + - "GithubAccessToken" + - "QuayAccessToken" + - "Password" + - "STSSessionToken" + - "UUID" + - "VaultDynamicSecret" + - "Webhook" + - "Grafana" + type: "string" + name: + description: "Specify the name of the generator resource" + maxLength: 253 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$" + type: "string" + required: + - "kind" + - "name" + type: "object" + secret: + description: "Select a Secret to Push." + properties: + name: + description: "Name of the Secret.\nThe Secret must exist in the same namespace as the PushSecret manifest." + maxLength: 253 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$" + type: "string" + selector: + description: "Selector chooses secrets using a labelSelector." + properties: + matchExpressions: + description: "matchExpressions is a list of label selector requirements. The requirements are ANDed." + items: + description: "A label selector requirement is a selector that contains values, a key, and an operator that\nrelates the key and values." + properties: + key: + description: "key is the label key that the selector applies to." + type: "string" + operator: + description: "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist." + type: "string" + values: + description: "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch." + items: + type: "string" + type: "array" + x-kubernetes-list-type: "atomic" + required: + - "key" + - "operator" + type: "object" + type: "array" + x-kubernetes-list-type: "atomic" + matchLabels: + additionalProperties: + type: "string" + description: "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed." + type: "object" + type: "object" + x-kubernetes-map-type: "atomic" + type: "object" + type: "object" + template: + description: "Template defines a blueprint for the created Secret resource." + properties: + data: + additionalProperties: + type: "string" + type: "object" + engineVersion: + default: "v2" + description: "EngineVersion specifies the template engine version\nthat should be used to compile/execute the\ntemplate specified in .data and .templateFrom[]." + enum: + - "v2" + type: "string" + mergePolicy: + default: "Replace" + enum: + - "Replace" + - "Merge" + type: "string" + metadata: + description: "ExternalSecretTemplateMetadata defines metadata fields for the Secret blueprint." + properties: + annotations: + additionalProperties: + type: "string" + type: "object" + labels: + additionalProperties: + type: "string" + type: "object" + type: "object" + templateFrom: + items: + properties: + configMap: + properties: + items: + description: "A list of keys in the ConfigMap/Secret to use as templates for Secret data" + items: + properties: + key: + description: "A key in the ConfigMap/Secret" + maxLength: 253 + minLength: 1 + pattern: "^[-._a-zA-Z0-9]+$" + type: "string" + templateAs: + default: "Values" + enum: + - "Values" + - "KeysAndValues" + type: "string" + required: + - "key" + type: "object" + type: "array" + name: + description: "The name of the ConfigMap/Secret resource" + maxLength: 253 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$" + type: "string" + required: + - "items" + - "name" + type: "object" + literal: + type: "string" + secret: + properties: + items: + description: "A list of keys in the ConfigMap/Secret to use as templates for Secret data" + items: + properties: + key: + description: "A key in the ConfigMap/Secret" + maxLength: 253 + minLength: 1 + pattern: "^[-._a-zA-Z0-9]+$" + type: "string" + templateAs: + default: "Values" + enum: + - "Values" + - "KeysAndValues" + type: "string" + required: + - "key" + type: "object" + type: "array" + name: + description: "The name of the ConfigMap/Secret resource" + maxLength: 253 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$" + type: "string" + required: + - "items" + - "name" + type: "object" + target: + default: "Data" + enum: + - "Data" + - "Annotations" + - "Labels" + type: "string" + type: "object" + type: "array" + type: + type: "string" + type: "object" + updatePolicy: + default: "Replace" + description: "UpdatePolicy to handle Secrets in the provider." + enum: + - "Replace" + - "IfNotExists" + type: "string" + required: + - "secretStoreRefs" + - "selector" + type: "object" + status: + description: "PushSecretStatus indicates the history of the status of PushSecret." + properties: + conditions: + items: + description: "PushSecretStatusCondition indicates the status of the PushSecret." + properties: + lastTransitionTime: + format: "date-time" + type: "string" + message: + type: "string" + reason: + type: "string" + status: + type: "string" + type: + description: "PushSecretConditionType indicates the condition of the PushSecret." + type: "string" + required: + - "status" + - "type" + type: "object" + type: "array" + refreshTime: + description: "refreshTime is the time and date the external secret was fetched and\nthe target secret updated" + format: "date-time" + nullable: true + type: "string" + syncedPushSecrets: + additionalProperties: + additionalProperties: + properties: + conversionStrategy: + default: "None" + description: "Used to define a conversion Strategy for the secret keys" + enum: + - "None" + - "ReverseUnicode" + type: "string" + match: + description: "Match a given Secret Key to be pushed to the provider." + properties: + remoteRef: + description: "Remote Refs to push to providers." + properties: + property: + description: "Name of the property in the resulting secret" + type: "string" + remoteKey: + description: "Name of the resulting provider secret." + type: "string" + required: + - "remoteKey" + type: "object" + secretKey: + description: "Secret Key to be pushed" + type: "string" + required: + - "remoteRef" + type: "object" + metadata: + description: "Metadata is metadata attached to the secret.\nThe structure of metadata is provider specific, please look it up in the provider documentation." + x-kubernetes-preserve-unknown-fields: true + required: + - "match" + type: "object" + type: "object" + description: "Synced PushSecrets, including secrets that already exist in provider.\nMatches secret stores to PushSecretData that was stored to that secret store." + type: "object" + syncedResourceVersion: + description: "SyncedResourceVersion keeps track of the last synced version." + type: "string" + type: "object" + type: "object" + served: true + storage: true + subresources: + status: {} diff --git a/crd-catalog/external-secrets/external-secrets/generators.external-secrets.io/v1alpha1/acraccesstokens.yaml b/crd-catalog/external-secrets/external-secrets/generators.external-secrets.io/v1alpha1/acraccesstokens.yaml new file mode 100644 index 000000000..fad1ba172 --- /dev/null +++ b/crd-catalog/external-secrets/external-secrets/generators.external-secrets.io/v1alpha1/acraccesstokens.yaml @@ -0,0 +1,154 @@ +apiVersion: "apiextensions.k8s.io/v1" +kind: "CustomResourceDefinition" +metadata: + annotations: + controller-gen.kubebuilder.io/version: "v0.17.3" + labels: + external-secrets.io/component: "controller" + name: "acraccesstokens.generators.external-secrets.io" +spec: + group: "generators.external-secrets.io" + names: + categories: + - "external-secrets" + - "external-secrets-generators" + kind: "ACRAccessToken" + listKind: "ACRAccessTokenList" + plural: "acraccesstokens" + singular: "acraccesstoken" + scope: "Namespaced" + versions: + - name: "v1alpha1" + schema: + openAPIV3Schema: + description: "ACRAccessToken returns an Azure Container Registry token\nthat can be used for pushing/pulling images.\nNote: by default it will return an ACR Refresh Token with full access\n(depending on the identity).\nThis can be scoped down to the repository level using .spec.scope.\nIn case scope is defined it will return an ACR Access Token.\n\nSee docs: https://github.com/Azure/acr/blob/main/docs/AAD-OAuth.md" + properties: + apiVersion: + description: "APIVersion defines the versioned schema of this representation of an object.\nServers should convert recognized schemas to the latest internal value, and\nmay reject unrecognized values.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources" + type: "string" + kind: + description: "Kind is a string value representing the REST resource this object represents.\nServers may infer this from the endpoint the client submits requests to.\nCannot be updated.\nIn CamelCase.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds" + type: "string" + metadata: + type: "object" + spec: + description: "ACRAccessTokenSpec defines how to generate the access token\ne.g. how to authenticate and which registry to use.\nsee: https://github.com/Azure/acr/blob/main/docs/AAD-OAuth.md#overview" + properties: + auth: + properties: + managedIdentity: + description: "ManagedIdentity uses Azure Managed Identity to authenticate with Azure." + properties: + identityId: + description: "If multiple Managed Identity is assigned to the pod, you can select the one to be used" + type: "string" + type: "object" + servicePrincipal: + description: "ServicePrincipal uses Azure Service Principal credentials to authenticate with Azure." + properties: + secretRef: + description: "Configuration used to authenticate with Azure using static\ncredentials stored in a Kind=Secret." + properties: + clientId: + description: "The Azure clientId of the service principle used for authentication." + properties: + key: + description: "A key in the referenced Secret.\nSome instances of this field may be defaulted, in others it may be required." + maxLength: 253 + minLength: 1 + pattern: "^[-._a-zA-Z0-9]+$" + type: "string" + name: + description: "The name of the Secret resource being referred to." + maxLength: 253 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$" + type: "string" + namespace: + description: "The namespace of the Secret resource being referred to.\nIgnored if referent is not cluster-scoped, otherwise defaults to the namespace of the referent." + maxLength: 63 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" + type: "string" + type: "object" + clientSecret: + description: "The Azure ClientSecret of the service principle used for authentication." + properties: + key: + description: "A key in the referenced Secret.\nSome instances of this field may be defaulted, in others it may be required." + maxLength: 253 + minLength: 1 + pattern: "^[-._a-zA-Z0-9]+$" + type: "string" + name: + description: "The name of the Secret resource being referred to." + maxLength: 253 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$" + type: "string" + namespace: + description: "The namespace of the Secret resource being referred to.\nIgnored if referent is not cluster-scoped, otherwise defaults to the namespace of the referent." + maxLength: 63 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" + type: "string" + type: "object" + type: "object" + required: + - "secretRef" + type: "object" + workloadIdentity: + description: "WorkloadIdentity uses Azure Workload Identity to authenticate with Azure." + properties: + serviceAccountRef: + description: "ServiceAccountRef specified the service account\nthat should be used when authenticating with WorkloadIdentity." + properties: + audiences: + description: "Audience specifies the `aud` claim for the service account token\nIf the service account uses a well-known annotation for e.g. IRSA or GCP Workload Identity\nthen this audiences will be appended to the list" + items: + type: "string" + type: "array" + name: + description: "The name of the ServiceAccount resource being referred to." + maxLength: 253 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$" + type: "string" + namespace: + description: "Namespace of the resource being referred to.\nIgnored if referent is not cluster-scoped, otherwise defaults to the namespace of the referent." + maxLength: 63 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" + type: "string" + required: + - "name" + type: "object" + type: "object" + type: "object" + environmentType: + default: "PublicCloud" + description: "EnvironmentType specifies the Azure cloud environment endpoints to use for\nconnecting and authenticating with Azure. By default it points to the public cloud AAD endpoint.\nThe following endpoints are available, also see here: https://github.com/Azure/go-autorest/blob/main/autorest/azure/environments.go#L152\nPublicCloud, USGovernmentCloud, ChinaCloud, GermanCloud" + enum: + - "PublicCloud" + - "USGovernmentCloud" + - "ChinaCloud" + - "GermanCloud" + type: "string" + registry: + description: "the domain name of the ACR registry\ne.g. foobarexample.azurecr.io" + type: "string" + scope: + description: "Define the scope for the access token, e.g. pull/push access for a repository.\nif not provided it will return a refresh token that has full scope.\nNote: you need to pin it down to the repository level, there is no wildcard available.\n\nexamples:\nrepository:my-repository:pull,push\nrepository:my-repository:pull\n\nsee docs for details: https://docs.docker.com/registry/spec/auth/scope/" + type: "string" + tenantId: + description: "TenantID configures the Azure Tenant to send requests to. Required for ServicePrincipal auth type." + type: "string" + required: + - "auth" + - "registry" + type: "object" + type: "object" + served: true + storage: true + subresources: + status: {} diff --git a/crd-catalog/external-secrets/external-secrets/generators.external-secrets.io/v1alpha1/clustergenerators.yaml b/crd-catalog/external-secrets/external-secrets/generators.external-secrets.io/v1alpha1/clustergenerators.yaml new file mode 100644 index 000000000..b54ddfd20 --- /dev/null +++ b/crd-catalog/external-secrets/external-secrets/generators.external-secrets.io/v1alpha1/clustergenerators.yaml @@ -0,0 +1,1412 @@ +apiVersion: "apiextensions.k8s.io/v1" +kind: "CustomResourceDefinition" +metadata: + annotations: + controller-gen.kubebuilder.io/version: "v0.17.3" + labels: + external-secrets.io/component: "controller" + name: "clustergenerators.generators.external-secrets.io" +spec: + group: "generators.external-secrets.io" + names: + categories: + - "external-secrets" + - "external-secrets-generators" + kind: "ClusterGenerator" + listKind: "ClusterGeneratorList" + plural: "clustergenerators" + singular: "clustergenerator" + scope: "Cluster" + versions: + - name: "v1alpha1" + schema: + openAPIV3Schema: + description: "ClusterGenerator represents a cluster-wide generator which can be referenced as part of `generatorRef` fields." + properties: + apiVersion: + description: "APIVersion defines the versioned schema of this representation of an object.\nServers should convert recognized schemas to the latest internal value, and\nmay reject unrecognized values.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources" + type: "string" + kind: + description: "Kind is a string value representing the REST resource this object represents.\nServers may infer this from the endpoint the client submits requests to.\nCannot be updated.\nIn CamelCase.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds" + type: "string" + metadata: + type: "object" + spec: + properties: + generator: + description: "Generator the spec for this generator, must match the kind." + maxProperties: 1 + minProperties: 1 + properties: + acrAccessTokenSpec: + description: "ACRAccessTokenSpec defines how to generate the access token\ne.g. how to authenticate and which registry to use.\nsee: https://github.com/Azure/acr/blob/main/docs/AAD-OAuth.md#overview" + properties: + auth: + properties: + managedIdentity: + description: "ManagedIdentity uses Azure Managed Identity to authenticate with Azure." + properties: + identityId: + description: "If multiple Managed Identity is assigned to the pod, you can select the one to be used" + type: "string" + type: "object" + servicePrincipal: + description: "ServicePrincipal uses Azure Service Principal credentials to authenticate with Azure." + properties: + secretRef: + description: "Configuration used to authenticate with Azure using static\ncredentials stored in a Kind=Secret." + properties: + clientId: + description: "The Azure clientId of the service principle used for authentication." + properties: + key: + description: "A key in the referenced Secret.\nSome instances of this field may be defaulted, in others it may be required." + maxLength: 253 + minLength: 1 + pattern: "^[-._a-zA-Z0-9]+$" + type: "string" + name: + description: "The name of the Secret resource being referred to." + maxLength: 253 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$" + type: "string" + namespace: + description: "The namespace of the Secret resource being referred to.\nIgnored if referent is not cluster-scoped, otherwise defaults to the namespace of the referent." + maxLength: 63 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" + type: "string" + type: "object" + clientSecret: + description: "The Azure ClientSecret of the service principle used for authentication." + properties: + key: + description: "A key in the referenced Secret.\nSome instances of this field may be defaulted, in others it may be required." + maxLength: 253 + minLength: 1 + pattern: "^[-._a-zA-Z0-9]+$" + type: "string" + name: + description: "The name of the Secret resource being referred to." + maxLength: 253 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$" + type: "string" + namespace: + description: "The namespace of the Secret resource being referred to.\nIgnored if referent is not cluster-scoped, otherwise defaults to the namespace of the referent." + maxLength: 63 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" + type: "string" + type: "object" + type: "object" + required: + - "secretRef" + type: "object" + workloadIdentity: + description: "WorkloadIdentity uses Azure Workload Identity to authenticate with Azure." + properties: + serviceAccountRef: + description: "ServiceAccountRef specified the service account\nthat should be used when authenticating with WorkloadIdentity." + properties: + audiences: + description: "Audience specifies the `aud` claim for the service account token\nIf the service account uses a well-known annotation for e.g. IRSA or GCP Workload Identity\nthen this audiences will be appended to the list" + items: + type: "string" + type: "array" + name: + description: "The name of the ServiceAccount resource being referred to." + maxLength: 253 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$" + type: "string" + namespace: + description: "Namespace of the resource being referred to.\nIgnored if referent is not cluster-scoped, otherwise defaults to the namespace of the referent." + maxLength: 63 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" + type: "string" + required: + - "name" + type: "object" + type: "object" + type: "object" + environmentType: + default: "PublicCloud" + description: "EnvironmentType specifies the Azure cloud environment endpoints to use for\nconnecting and authenticating with Azure. By default it points to the public cloud AAD endpoint.\nThe following endpoints are available, also see here: https://github.com/Azure/go-autorest/blob/main/autorest/azure/environments.go#L152\nPublicCloud, USGovernmentCloud, ChinaCloud, GermanCloud" + enum: + - "PublicCloud" + - "USGovernmentCloud" + - "ChinaCloud" + - "GermanCloud" + type: "string" + registry: + description: "the domain name of the ACR registry\ne.g. foobarexample.azurecr.io" + type: "string" + scope: + description: "Define the scope for the access token, e.g. pull/push access for a repository.\nif not provided it will return a refresh token that has full scope.\nNote: you need to pin it down to the repository level, there is no wildcard available.\n\nexamples:\nrepository:my-repository:pull,push\nrepository:my-repository:pull\n\nsee docs for details: https://docs.docker.com/registry/spec/auth/scope/" + type: "string" + tenantId: + description: "TenantID configures the Azure Tenant to send requests to. Required for ServicePrincipal auth type." + type: "string" + required: + - "auth" + - "registry" + type: "object" + ecrAuthorizationTokenSpec: + properties: + auth: + description: "Auth defines how to authenticate with AWS" + properties: + jwt: + description: "Authenticate against AWS using service account tokens." + properties: + serviceAccountRef: + description: "A reference to a ServiceAccount resource." + properties: + audiences: + description: "Audience specifies the `aud` claim for the service account token\nIf the service account uses a well-known annotation for e.g. IRSA or GCP Workload Identity\nthen this audiences will be appended to the list" + items: + type: "string" + type: "array" + name: + description: "The name of the ServiceAccount resource being referred to." + maxLength: 253 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$" + type: "string" + namespace: + description: "Namespace of the resource being referred to.\nIgnored if referent is not cluster-scoped, otherwise defaults to the namespace of the referent." + maxLength: 63 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" + type: "string" + required: + - "name" + type: "object" + type: "object" + secretRef: + description: "AWSAuthSecretRef holds secret references for AWS credentials\nboth AccessKeyID and SecretAccessKey must be defined in order to properly authenticate." + properties: + accessKeyIDSecretRef: + description: "The AccessKeyID is used for authentication" + properties: + key: + description: "A key in the referenced Secret.\nSome instances of this field may be defaulted, in others it may be required." + maxLength: 253 + minLength: 1 + pattern: "^[-._a-zA-Z0-9]+$" + type: "string" + name: + description: "The name of the Secret resource being referred to." + maxLength: 253 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$" + type: "string" + namespace: + description: "The namespace of the Secret resource being referred to.\nIgnored if referent is not cluster-scoped, otherwise defaults to the namespace of the referent." + maxLength: 63 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" + type: "string" + type: "object" + secretAccessKeySecretRef: + description: "The SecretAccessKey is used for authentication" + properties: + key: + description: "A key in the referenced Secret.\nSome instances of this field may be defaulted, in others it may be required." + maxLength: 253 + minLength: 1 + pattern: "^[-._a-zA-Z0-9]+$" + type: "string" + name: + description: "The name of the Secret resource being referred to." + maxLength: 253 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$" + type: "string" + namespace: + description: "The namespace of the Secret resource being referred to.\nIgnored if referent is not cluster-scoped, otherwise defaults to the namespace of the referent." + maxLength: 63 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" + type: "string" + type: "object" + sessionTokenSecretRef: + description: "The SessionToken used for authentication\nThis must be defined if AccessKeyID and SecretAccessKey are temporary credentials\nsee: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_use-resources.html" + properties: + key: + description: "A key in the referenced Secret.\nSome instances of this field may be defaulted, in others it may be required." + maxLength: 253 + minLength: 1 + pattern: "^[-._a-zA-Z0-9]+$" + type: "string" + name: + description: "The name of the Secret resource being referred to." + maxLength: 253 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$" + type: "string" + namespace: + description: "The namespace of the Secret resource being referred to.\nIgnored if referent is not cluster-scoped, otherwise defaults to the namespace of the referent." + maxLength: 63 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" + type: "string" + type: "object" + type: "object" + type: "object" + region: + description: "Region specifies the region to operate in." + type: "string" + role: + description: "You can assume a role before making calls to the\ndesired AWS service." + type: "string" + scope: + description: "Scope specifies the ECR service scope.\nValid options are private and public." + type: "string" + required: + - "region" + type: "object" + fakeSpec: + description: "FakeSpec contains the static data." + properties: + controller: + description: "Used to select the correct ESO controller (think: ingress.ingressClassName)\nThe ESO controller is instantiated with a specific controller name and filters VDS based on this property" + type: "string" + data: + additionalProperties: + type: "string" + description: "Data defines the static data returned\nby this generator." + type: "object" + type: "object" + gcrAccessTokenSpec: + properties: + auth: + description: "Auth defines the means for authenticating with GCP" + properties: + secretRef: + properties: + secretAccessKeySecretRef: + description: "The SecretAccessKey is used for authentication" + properties: + key: + description: "A key in the referenced Secret.\nSome instances of this field may be defaulted, in others it may be required." + maxLength: 253 + minLength: 1 + pattern: "^[-._a-zA-Z0-9]+$" + type: "string" + name: + description: "The name of the Secret resource being referred to." + maxLength: 253 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$" + type: "string" + namespace: + description: "The namespace of the Secret resource being referred to.\nIgnored if referent is not cluster-scoped, otherwise defaults to the namespace of the referent." + maxLength: 63 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" + type: "string" + type: "object" + type: "object" + workloadIdentity: + properties: + clusterLocation: + type: "string" + clusterName: + type: "string" + clusterProjectID: + type: "string" + serviceAccountRef: + description: "A reference to a ServiceAccount resource." + properties: + audiences: + description: "Audience specifies the `aud` claim for the service account token\nIf the service account uses a well-known annotation for e.g. IRSA or GCP Workload Identity\nthen this audiences will be appended to the list" + items: + type: "string" + type: "array" + name: + description: "The name of the ServiceAccount resource being referred to." + maxLength: 253 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$" + type: "string" + namespace: + description: "Namespace of the resource being referred to.\nIgnored if referent is not cluster-scoped, otherwise defaults to the namespace of the referent." + maxLength: 63 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" + type: "string" + required: + - "name" + type: "object" + required: + - "clusterLocation" + - "clusterName" + - "serviceAccountRef" + type: "object" + type: "object" + projectID: + description: "ProjectID defines which project to use to authenticate with" + type: "string" + required: + - "auth" + - "projectID" + type: "object" + githubAccessTokenSpec: + properties: + appID: + type: "string" + auth: + description: "Auth configures how ESO authenticates with a Github instance." + properties: + privateKey: + properties: + secretRef: + description: "A reference to a specific 'key' within a Secret resource.\nIn some instances, `key` is a required field." + properties: + key: + description: "A key in the referenced Secret.\nSome instances of this field may be defaulted, in others it may be required." + maxLength: 253 + minLength: 1 + pattern: "^[-._a-zA-Z0-9]+$" + type: "string" + name: + description: "The name of the Secret resource being referred to." + maxLength: 253 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$" + type: "string" + namespace: + description: "The namespace of the Secret resource being referred to.\nIgnored if referent is not cluster-scoped, otherwise defaults to the namespace of the referent." + maxLength: 63 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" + type: "string" + type: "object" + required: + - "secretRef" + type: "object" + required: + - "privateKey" + type: "object" + installID: + type: "string" + permissions: + additionalProperties: + type: "string" + description: "Map of permissions the token will have. If omitted, defaults to all permissions the GitHub App has." + type: "object" + repositories: + description: "List of repositories the token will have access to. If omitted, defaults to all repositories the GitHub App\nis installed to." + items: + type: "string" + type: "array" + url: + description: "URL configures the Github instance URL. Defaults to https://github.com/." + type: "string" + required: + - "appID" + - "auth" + - "installID" + type: "object" + grafanaSpec: + description: "GrafanaSpec controls the behavior of the grafana generator." + properties: + auth: + description: "Auth is the authentication configuration to authenticate\nagainst the Grafana instance." + properties: + basic: + description: "Basic auth credentials used to authenticate against the Grafana instance.\nNote: you need a token which has elevated permissions to create service accounts.\nSee here for the documentation on basic roles offered by Grafana:\nhttps://grafana.com/docs/grafana/latest/administration/roles-and-permissions/access-control/rbac-fixed-basic-role-definitions/" + properties: + password: + description: "A basic auth password used to authenticate against the Grafana instance." + properties: + key: + description: "The key where the token is found." + maxLength: 253 + minLength: 1 + pattern: "^[-._a-zA-Z0-9]+$" + type: "string" + name: + description: "The name of the Secret resource being referred to." + maxLength: 253 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$" + type: "string" + type: "object" + username: + description: "A basic auth username used to authenticate against the Grafana instance." + type: "string" + required: + - "password" + - "username" + type: "object" + token: + description: "A service account token used to authenticate against the Grafana instance.\nNote: you need a token which has elevated permissions to create service accounts.\nSee here for the documentation on basic roles offered by Grafana:\nhttps://grafana.com/docs/grafana/latest/administration/roles-and-permissions/access-control/rbac-fixed-basic-role-definitions/" + properties: + key: + description: "The key where the token is found." + maxLength: 253 + minLength: 1 + pattern: "^[-._a-zA-Z0-9]+$" + type: "string" + name: + description: "The name of the Secret resource being referred to." + maxLength: 253 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$" + type: "string" + type: "object" + type: "object" + serviceAccount: + description: "ServiceAccount is the configuration for the service account that\nis supposed to be generated by the generator." + properties: + name: + description: "Name is the name of the service account that will be created by ESO." + type: "string" + role: + description: "Role is the role of the service account.\nSee here for the documentation on basic roles offered by Grafana:\nhttps://grafana.com/docs/grafana/latest/administration/roles-and-permissions/access-control/rbac-fixed-basic-role-definitions/" + type: "string" + required: + - "name" + - "role" + type: "object" + url: + description: "URL is the URL of the Grafana instance." + type: "string" + required: + - "auth" + - "serviceAccount" + - "url" + type: "object" + passwordSpec: + description: "PasswordSpec controls the behavior of the password generator." + properties: + allowRepeat: + default: false + description: "set AllowRepeat to true to allow repeating characters." + type: "boolean" + digits: + description: "Digits specifies the number of digits in the generated\npassword. If omitted it defaults to 25% of the length of the password" + type: "integer" + length: + default: 24 + description: "Length of the password to be generated.\nDefaults to 24" + type: "integer" + noUpper: + default: false + description: "Set NoUpper to disable uppercase characters" + type: "boolean" + symbolCharacters: + description: "SymbolCharacters specifies the special characters that should be used\nin the generated password." + type: "string" + symbols: + description: "Symbols specifies the number of symbol characters in the generated\npassword. If omitted it defaults to 25% of the length of the password" + type: "integer" + required: + - "allowRepeat" + - "length" + - "noUpper" + type: "object" + quayAccessTokenSpec: + properties: + robotAccount: + description: "Name of the robot account you are federating with" + type: "string" + serviceAccountRef: + description: "Name of the service account you are federating with" + properties: + audiences: + description: "Audience specifies the `aud` claim for the service account token\nIf the service account uses a well-known annotation for e.g. IRSA or GCP Workload Identity\nthen this audiences will be appended to the list" + items: + type: "string" + type: "array" + name: + description: "The name of the ServiceAccount resource being referred to." + maxLength: 253 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$" + type: "string" + namespace: + description: "Namespace of the resource being referred to.\nIgnored if referent is not cluster-scoped, otherwise defaults to the namespace of the referent." + maxLength: 63 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" + type: "string" + required: + - "name" + type: "object" + url: + description: "URL configures the Quay instance URL. Defaults to quay.io." + type: "string" + required: + - "robotAccount" + - "serviceAccountRef" + type: "object" + stsSessionTokenSpec: + properties: + auth: + description: "Auth defines how to authenticate with AWS" + properties: + jwt: + description: "Authenticate against AWS using service account tokens." + properties: + serviceAccountRef: + description: "A reference to a ServiceAccount resource." + properties: + audiences: + description: "Audience specifies the `aud` claim for the service account token\nIf the service account uses a well-known annotation for e.g. IRSA or GCP Workload Identity\nthen this audiences will be appended to the list" + items: + type: "string" + type: "array" + name: + description: "The name of the ServiceAccount resource being referred to." + maxLength: 253 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$" + type: "string" + namespace: + description: "Namespace of the resource being referred to.\nIgnored if referent is not cluster-scoped, otherwise defaults to the namespace of the referent." + maxLength: 63 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" + type: "string" + required: + - "name" + type: "object" + type: "object" + secretRef: + description: "AWSAuthSecretRef holds secret references for AWS credentials\nboth AccessKeyID and SecretAccessKey must be defined in order to properly authenticate." + properties: + accessKeyIDSecretRef: + description: "The AccessKeyID is used for authentication" + properties: + key: + description: "A key in the referenced Secret.\nSome instances of this field may be defaulted, in others it may be required." + maxLength: 253 + minLength: 1 + pattern: "^[-._a-zA-Z0-9]+$" + type: "string" + name: + description: "The name of the Secret resource being referred to." + maxLength: 253 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$" + type: "string" + namespace: + description: "The namespace of the Secret resource being referred to.\nIgnored if referent is not cluster-scoped, otherwise defaults to the namespace of the referent." + maxLength: 63 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" + type: "string" + type: "object" + secretAccessKeySecretRef: + description: "The SecretAccessKey is used for authentication" + properties: + key: + description: "A key in the referenced Secret.\nSome instances of this field may be defaulted, in others it may be required." + maxLength: 253 + minLength: 1 + pattern: "^[-._a-zA-Z0-9]+$" + type: "string" + name: + description: "The name of the Secret resource being referred to." + maxLength: 253 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$" + type: "string" + namespace: + description: "The namespace of the Secret resource being referred to.\nIgnored if referent is not cluster-scoped, otherwise defaults to the namespace of the referent." + maxLength: 63 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" + type: "string" + type: "object" + sessionTokenSecretRef: + description: "The SessionToken used for authentication\nThis must be defined if AccessKeyID and SecretAccessKey are temporary credentials\nsee: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_use-resources.html" + properties: + key: + description: "A key in the referenced Secret.\nSome instances of this field may be defaulted, in others it may be required." + maxLength: 253 + minLength: 1 + pattern: "^[-._a-zA-Z0-9]+$" + type: "string" + name: + description: "The name of the Secret resource being referred to." + maxLength: 253 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$" + type: "string" + namespace: + description: "The namespace of the Secret resource being referred to.\nIgnored if referent is not cluster-scoped, otherwise defaults to the namespace of the referent." + maxLength: 63 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" + type: "string" + type: "object" + type: "object" + type: "object" + region: + description: "Region specifies the region to operate in." + type: "string" + requestParameters: + description: "RequestParameters contains parameters that can be passed to the STS service." + properties: + serialNumber: + description: "SerialNumber is the identification number of the MFA device that is associated with the IAM user who is making\nthe GetSessionToken call.\nPossible values: hardware device (such as GAHT12345678) or an Amazon Resource Name (ARN) for a virtual device\n(such as arn:aws:iam::123456789012:mfa/user)" + type: "string" + sessionDuration: + description: "SessionDuration The duration, in seconds, that the credentials should remain valid. Acceptable durations for\nIAM user sessions range from 900 seconds (15 minutes) to 129,600 seconds (36 hours), with 43,200 seconds\n(12 hours) as the default." + format: "int64" + type: "integer" + tokenCode: + description: "TokenCode is the value provided by the MFA device, if MFA is required." + type: "string" + type: "object" + role: + description: "You can assume a role before making calls to the\ndesired AWS service." + type: "string" + required: + - "region" + type: "object" + uuidSpec: + description: "UUIDSpec controls the behavior of the uuid generator." + type: "object" + vaultDynamicSecretSpec: + properties: + allowEmptyResponse: + default: false + description: "Do not fail if no secrets are found. Useful for requests where no data is expected." + type: "boolean" + controller: + description: "Used to select the correct ESO controller (think: ingress.ingressClassName)\nThe ESO controller is instantiated with a specific controller name and filters VDS based on this property" + type: "string" + method: + description: "Vault API method to use (GET/POST/other)" + type: "string" + parameters: + description: "Parameters to pass to Vault write (for non-GET methods)" + x-kubernetes-preserve-unknown-fields: true + path: + description: "Vault path to obtain the dynamic secret from" + type: "string" + provider: + description: "Vault provider common spec" + properties: + auth: + description: "Auth configures how secret-manager authenticates with the Vault server." + properties: + appRole: + description: "AppRole authenticates with Vault using the App Role auth mechanism,\nwith the role and secret stored in a Kubernetes Secret resource." + properties: + path: + default: "approle" + description: "Path where the App Role authentication backend is mounted\nin Vault, e.g: \"approle\"" + type: "string" + roleId: + description: "RoleID configured in the App Role authentication backend when setting\nup the authentication backend in Vault." + type: "string" + roleRef: + description: "Reference to a key in a Secret that contains the App Role ID used\nto authenticate with Vault.\nThe `key` field must be specified and denotes which entry within the Secret\nresource is used as the app role id." + properties: + key: + description: "A key in the referenced Secret.\nSome instances of this field may be defaulted, in others it may be required." + maxLength: 253 + minLength: 1 + pattern: "^[-._a-zA-Z0-9]+$" + type: "string" + name: + description: "The name of the Secret resource being referred to." + maxLength: 253 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$" + type: "string" + namespace: + description: "The namespace of the Secret resource being referred to.\nIgnored if referent is not cluster-scoped, otherwise defaults to the namespace of the referent." + maxLength: 63 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" + type: "string" + type: "object" + secretRef: + description: "Reference to a key in a Secret that contains the App Role secret used\nto authenticate with Vault.\nThe `key` field must be specified and denotes which entry within the Secret\nresource is used as the app role secret." + properties: + key: + description: "A key in the referenced Secret.\nSome instances of this field may be defaulted, in others it may be required." + maxLength: 253 + minLength: 1 + pattern: "^[-._a-zA-Z0-9]+$" + type: "string" + name: + description: "The name of the Secret resource being referred to." + maxLength: 253 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$" + type: "string" + namespace: + description: "The namespace of the Secret resource being referred to.\nIgnored if referent is not cluster-scoped, otherwise defaults to the namespace of the referent." + maxLength: 63 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" + type: "string" + type: "object" + required: + - "path" + - "secretRef" + type: "object" + cert: + description: "Cert authenticates with TLS Certificates by passing client certificate, private key and ca certificate\nCert authentication method" + properties: + clientCert: + description: "ClientCert is a certificate to authenticate using the Cert Vault\nauthentication method" + properties: + key: + description: "A key in the referenced Secret.\nSome instances of this field may be defaulted, in others it may be required." + maxLength: 253 + minLength: 1 + pattern: "^[-._a-zA-Z0-9]+$" + type: "string" + name: + description: "The name of the Secret resource being referred to." + maxLength: 253 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$" + type: "string" + namespace: + description: "The namespace of the Secret resource being referred to.\nIgnored if referent is not cluster-scoped, otherwise defaults to the namespace of the referent." + maxLength: 63 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" + type: "string" + type: "object" + secretRef: + description: "SecretRef to a key in a Secret resource containing client private key to\nauthenticate with Vault using the Cert authentication method" + properties: + key: + description: "A key in the referenced Secret.\nSome instances of this field may be defaulted, in others it may be required." + maxLength: 253 + minLength: 1 + pattern: "^[-._a-zA-Z0-9]+$" + type: "string" + name: + description: "The name of the Secret resource being referred to." + maxLength: 253 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$" + type: "string" + namespace: + description: "The namespace of the Secret resource being referred to.\nIgnored if referent is not cluster-scoped, otherwise defaults to the namespace of the referent." + maxLength: 63 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" + type: "string" + type: "object" + type: "object" + iam: + description: "Iam authenticates with vault by passing a special AWS request signed with AWS IAM credentials\nAWS IAM authentication method" + properties: + externalID: + description: "AWS External ID set on assumed IAM roles" + type: "string" + jwt: + description: "Specify a service account with IRSA enabled" + properties: + serviceAccountRef: + description: "A reference to a ServiceAccount resource." + properties: + audiences: + description: "Audience specifies the `aud` claim for the service account token\nIf the service account uses a well-known annotation for e.g. IRSA or GCP Workload Identity\nthen this audiences will be appended to the list" + items: + type: "string" + type: "array" + name: + description: "The name of the ServiceAccount resource being referred to." + maxLength: 253 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$" + type: "string" + namespace: + description: "Namespace of the resource being referred to.\nIgnored if referent is not cluster-scoped, otherwise defaults to the namespace of the referent." + maxLength: 63 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" + type: "string" + required: + - "name" + type: "object" + type: "object" + path: + description: "Path where the AWS auth method is enabled in Vault, e.g: \"aws\"" + type: "string" + region: + description: "AWS region" + type: "string" + role: + description: "This is the AWS role to be assumed before talking to vault" + type: "string" + secretRef: + description: "Specify credentials in a Secret object" + properties: + accessKeyIDSecretRef: + description: "The AccessKeyID is used for authentication" + properties: + key: + description: "A key in the referenced Secret.\nSome instances of this field may be defaulted, in others it may be required." + maxLength: 253 + minLength: 1 + pattern: "^[-._a-zA-Z0-9]+$" + type: "string" + name: + description: "The name of the Secret resource being referred to." + maxLength: 253 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$" + type: "string" + namespace: + description: "The namespace of the Secret resource being referred to.\nIgnored if referent is not cluster-scoped, otherwise defaults to the namespace of the referent." + maxLength: 63 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" + type: "string" + type: "object" + secretAccessKeySecretRef: + description: "The SecretAccessKey is used for authentication" + properties: + key: + description: "A key in the referenced Secret.\nSome instances of this field may be defaulted, in others it may be required." + maxLength: 253 + minLength: 1 + pattern: "^[-._a-zA-Z0-9]+$" + type: "string" + name: + description: "The name of the Secret resource being referred to." + maxLength: 253 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$" + type: "string" + namespace: + description: "The namespace of the Secret resource being referred to.\nIgnored if referent is not cluster-scoped, otherwise defaults to the namespace of the referent." + maxLength: 63 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" + type: "string" + type: "object" + sessionTokenSecretRef: + description: "The SessionToken used for authentication\nThis must be defined if AccessKeyID and SecretAccessKey are temporary credentials\nsee: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_use-resources.html" + properties: + key: + description: "A key in the referenced Secret.\nSome instances of this field may be defaulted, in others it may be required." + maxLength: 253 + minLength: 1 + pattern: "^[-._a-zA-Z0-9]+$" + type: "string" + name: + description: "The name of the Secret resource being referred to." + maxLength: 253 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$" + type: "string" + namespace: + description: "The namespace of the Secret resource being referred to.\nIgnored if referent is not cluster-scoped, otherwise defaults to the namespace of the referent." + maxLength: 63 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" + type: "string" + type: "object" + type: "object" + vaultAwsIamServerID: + description: "X-Vault-AWS-IAM-Server-ID is an additional header used by Vault IAM auth method to mitigate against different types of replay attacks. More details here: https://developer.hashicorp.com/vault/docs/auth/aws" + type: "string" + vaultRole: + description: "Vault Role. In vault, a role describes an identity with a set of permissions, groups, or policies you want to attach a user of the secrets engine" + type: "string" + required: + - "vaultRole" + type: "object" + jwt: + description: "Jwt authenticates with Vault by passing role and JWT token using the\nJWT/OIDC authentication method" + properties: + kubernetesServiceAccountToken: + description: "Optional ServiceAccountToken specifies the Kubernetes service account for which to request\na token for with the `TokenRequest` API." + properties: + audiences: + description: "Optional audiences field that will be used to request a temporary Kubernetes service\naccount token for the service account referenced by `serviceAccountRef`.\nDefaults to a single audience `vault` it not specified.\nDeprecated: use serviceAccountRef.Audiences instead" + items: + type: "string" + type: "array" + expirationSeconds: + description: "Optional expiration time in seconds that will be used to request a temporary\nKubernetes service account token for the service account referenced by\n`serviceAccountRef`.\nDeprecated: this will be removed in the future.\nDefaults to 10 minutes." + format: "int64" + type: "integer" + serviceAccountRef: + description: "Service account field containing the name of a kubernetes ServiceAccount." + properties: + audiences: + description: "Audience specifies the `aud` claim for the service account token\nIf the service account uses a well-known annotation for e.g. IRSA or GCP Workload Identity\nthen this audiences will be appended to the list" + items: + type: "string" + type: "array" + name: + description: "The name of the ServiceAccount resource being referred to." + maxLength: 253 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$" + type: "string" + namespace: + description: "Namespace of the resource being referred to.\nIgnored if referent is not cluster-scoped, otherwise defaults to the namespace of the referent." + maxLength: 63 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" + type: "string" + required: + - "name" + type: "object" + required: + - "serviceAccountRef" + type: "object" + path: + default: "jwt" + description: "Path where the JWT authentication backend is mounted\nin Vault, e.g: \"jwt\"" + type: "string" + role: + description: "Role is a JWT role to authenticate using the JWT/OIDC Vault\nauthentication method" + type: "string" + secretRef: + description: "Optional SecretRef that refers to a key in a Secret resource containing JWT token to\nauthenticate with Vault using the JWT/OIDC authentication method." + properties: + key: + description: "A key in the referenced Secret.\nSome instances of this field may be defaulted, in others it may be required." + maxLength: 253 + minLength: 1 + pattern: "^[-._a-zA-Z0-9]+$" + type: "string" + name: + description: "The name of the Secret resource being referred to." + maxLength: 253 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$" + type: "string" + namespace: + description: "The namespace of the Secret resource being referred to.\nIgnored if referent is not cluster-scoped, otherwise defaults to the namespace of the referent." + maxLength: 63 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" + type: "string" + type: "object" + required: + - "path" + type: "object" + kubernetes: + description: "Kubernetes authenticates with Vault by passing the ServiceAccount\ntoken stored in the named Secret resource to the Vault server." + properties: + mountPath: + default: "kubernetes" + description: "Path where the Kubernetes authentication backend is mounted in Vault, e.g:\n\"kubernetes\"" + type: "string" + role: + description: "A required field containing the Vault Role to assume. A Role binds a\nKubernetes ServiceAccount with a set of Vault policies." + type: "string" + secretRef: + description: "Optional secret field containing a Kubernetes ServiceAccount JWT used\nfor authenticating with Vault. If a name is specified without a key,\n`token` is the default. If one is not specified, the one bound to\nthe controller will be used." + properties: + key: + description: "A key in the referenced Secret.\nSome instances of this field may be defaulted, in others it may be required." + maxLength: 253 + minLength: 1 + pattern: "^[-._a-zA-Z0-9]+$" + type: "string" + name: + description: "The name of the Secret resource being referred to." + maxLength: 253 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$" + type: "string" + namespace: + description: "The namespace of the Secret resource being referred to.\nIgnored if referent is not cluster-scoped, otherwise defaults to the namespace of the referent." + maxLength: 63 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" + type: "string" + type: "object" + serviceAccountRef: + description: "Optional service account field containing the name of a kubernetes ServiceAccount.\nIf the service account is specified, the service account secret token JWT will be used\nfor authenticating with Vault. If the service account selector is not supplied,\nthe secretRef will be used instead." + properties: + audiences: + description: "Audience specifies the `aud` claim for the service account token\nIf the service account uses a well-known annotation for e.g. IRSA or GCP Workload Identity\nthen this audiences will be appended to the list" + items: + type: "string" + type: "array" + name: + description: "The name of the ServiceAccount resource being referred to." + maxLength: 253 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$" + type: "string" + namespace: + description: "Namespace of the resource being referred to.\nIgnored if referent is not cluster-scoped, otherwise defaults to the namespace of the referent." + maxLength: 63 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" + type: "string" + required: + - "name" + type: "object" + required: + - "mountPath" + - "role" + type: "object" + ldap: + description: "Ldap authenticates with Vault by passing username/password pair using\nthe LDAP authentication method" + properties: + path: + default: "ldap" + description: "Path where the LDAP authentication backend is mounted\nin Vault, e.g: \"ldap\"" + type: "string" + secretRef: + description: "SecretRef to a key in a Secret resource containing password for the LDAP\nuser used to authenticate with Vault using the LDAP authentication\nmethod" + properties: + key: + description: "A key in the referenced Secret.\nSome instances of this field may be defaulted, in others it may be required." + maxLength: 253 + minLength: 1 + pattern: "^[-._a-zA-Z0-9]+$" + type: "string" + name: + description: "The name of the Secret resource being referred to." + maxLength: 253 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$" + type: "string" + namespace: + description: "The namespace of the Secret resource being referred to.\nIgnored if referent is not cluster-scoped, otherwise defaults to the namespace of the referent." + maxLength: 63 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" + type: "string" + type: "object" + username: + description: "Username is an LDAP username used to authenticate using the LDAP Vault\nauthentication method" + type: "string" + required: + - "path" + - "username" + type: "object" + namespace: + description: "Name of the vault namespace to authenticate to. This can be different than the namespace your secret is in.\nNamespaces is a set of features within Vault Enterprise that allows\nVault environments to support Secure Multi-tenancy. e.g: \"ns1\".\nMore about namespaces can be found here https://www.vaultproject.io/docs/enterprise/namespaces\nThis will default to Vault.Namespace field if set, or empty otherwise" + type: "string" + tokenSecretRef: + description: "TokenSecretRef authenticates with Vault by presenting a token." + properties: + key: + description: "A key in the referenced Secret.\nSome instances of this field may be defaulted, in others it may be required." + maxLength: 253 + minLength: 1 + pattern: "^[-._a-zA-Z0-9]+$" + type: "string" + name: + description: "The name of the Secret resource being referred to." + maxLength: 253 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$" + type: "string" + namespace: + description: "The namespace of the Secret resource being referred to.\nIgnored if referent is not cluster-scoped, otherwise defaults to the namespace of the referent." + maxLength: 63 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" + type: "string" + type: "object" + userPass: + description: "UserPass authenticates with Vault by passing username/password pair" + properties: + path: + default: "userpass" + description: "Path where the UserPassword authentication backend is mounted\nin Vault, e.g: \"userpass\"" + type: "string" + secretRef: + description: "SecretRef to a key in a Secret resource containing password for the\nuser used to authenticate with Vault using the UserPass authentication\nmethod" + properties: + key: + description: "A key in the referenced Secret.\nSome instances of this field may be defaulted, in others it may be required." + maxLength: 253 + minLength: 1 + pattern: "^[-._a-zA-Z0-9]+$" + type: "string" + name: + description: "The name of the Secret resource being referred to." + maxLength: 253 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$" + type: "string" + namespace: + description: "The namespace of the Secret resource being referred to.\nIgnored if referent is not cluster-scoped, otherwise defaults to the namespace of the referent." + maxLength: 63 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" + type: "string" + type: "object" + username: + description: "Username is a username used to authenticate using the UserPass Vault\nauthentication method" + type: "string" + required: + - "path" + - "username" + type: "object" + type: "object" + caBundle: + description: "PEM encoded CA bundle used to validate Vault server certificate. Only used\nif the Server URL is using HTTPS protocol. This parameter is ignored for\nplain HTTP protocol connection. If not set the system root certificates\nare used to validate the TLS connection." + format: "byte" + type: "string" + caProvider: + description: "The provider for the CA bundle to use to validate Vault server certificate." + properties: + key: + description: "The key where the CA certificate can be found in the Secret or ConfigMap." + maxLength: 253 + minLength: 1 + pattern: "^[-._a-zA-Z0-9]+$" + type: "string" + name: + description: "The name of the object located at the provider type." + maxLength: 253 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$" + type: "string" + namespace: + description: "The namespace the Provider type is in.\nCan only be defined when used in a ClusterSecretStore." + maxLength: 63 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" + type: "string" + type: + description: "The type of provider to use such as \"Secret\", or \"ConfigMap\"." + enum: + - "Secret" + - "ConfigMap" + type: "string" + required: + - "name" + - "type" + type: "object" + forwardInconsistent: + description: "ForwardInconsistent tells Vault to forward read-after-write requests to the Vault\nleader instead of simply retrying within a loop. This can increase performance if\nthe option is enabled serverside.\nhttps://www.vaultproject.io/docs/configuration/replication#allow_forwarding_via_header" + type: "boolean" + headers: + additionalProperties: + type: "string" + description: "Headers to be added in Vault request" + type: "object" + namespace: + description: "Name of the vault namespace. Namespaces is a set of features within Vault Enterprise that allows\nVault environments to support Secure Multi-tenancy. e.g: \"ns1\".\nMore about namespaces can be found here https://www.vaultproject.io/docs/enterprise/namespaces" + type: "string" + path: + description: "Path is the mount path of the Vault KV backend endpoint, e.g:\n\"secret\". The v2 KV secret engine version specific \"/data\" path suffix\nfor fetching secrets from Vault is optional and will be appended\nif not present in specified path." + type: "string" + readYourWrites: + description: "ReadYourWrites ensures isolated read-after-write semantics by\nproviding discovered cluster replication states in each request.\nMore information about eventual consistency in Vault can be found here\nhttps://www.vaultproject.io/docs/enterprise/consistency" + type: "boolean" + server: + description: "Server is the connection address for the Vault server, e.g: \"https://vault.example.com:8200\"." + type: "string" + tls: + description: "The configuration used for client side related TLS communication, when the Vault server\nrequires mutual authentication. Only used if the Server URL is using HTTPS protocol.\nThis parameter is ignored for plain HTTP protocol connection.\nIt's worth noting this configuration is different from the \"TLS certificates auth method\",\nwhich is available under the `auth.cert` section." + properties: + certSecretRef: + description: "CertSecretRef is a certificate added to the transport layer\nwhen communicating with the Vault server.\nIf no key for the Secret is specified, external-secret will default to 'tls.crt'." + properties: + key: + description: "A key in the referenced Secret.\nSome instances of this field may be defaulted, in others it may be required." + maxLength: 253 + minLength: 1 + pattern: "^[-._a-zA-Z0-9]+$" + type: "string" + name: + description: "The name of the Secret resource being referred to." + maxLength: 253 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$" + type: "string" + namespace: + description: "The namespace of the Secret resource being referred to.\nIgnored if referent is not cluster-scoped, otherwise defaults to the namespace of the referent." + maxLength: 63 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" + type: "string" + type: "object" + keySecretRef: + description: "KeySecretRef to a key in a Secret resource containing client private key\nadded to the transport layer when communicating with the Vault server.\nIf no key for the Secret is specified, external-secret will default to 'tls.key'." + properties: + key: + description: "A key in the referenced Secret.\nSome instances of this field may be defaulted, in others it may be required." + maxLength: 253 + minLength: 1 + pattern: "^[-._a-zA-Z0-9]+$" + type: "string" + name: + description: "The name of the Secret resource being referred to." + maxLength: 253 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$" + type: "string" + namespace: + description: "The namespace of the Secret resource being referred to.\nIgnored if referent is not cluster-scoped, otherwise defaults to the namespace of the referent." + maxLength: 63 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" + type: "string" + type: "object" + type: "object" + version: + default: "v2" + description: "Version is the Vault KV secret engine version. This can be either \"v1\" or\n\"v2\". Version defaults to \"v2\"." + enum: + - "v1" + - "v2" + type: "string" + required: + - "server" + type: "object" + resultType: + default: "Data" + description: "Result type defines which data is returned from the generator.\nBy default it is the \"data\" section of the Vault API response.\nWhen using e.g. /auth/token/create the \"data\" section is empty but\nthe \"auth\" section contains the generated token.\nPlease refer to the vault docs regarding the result data structure.\nAdditionally, accessing the raw response is possibly by using \"Raw\" result type." + enum: + - "Data" + - "Auth" + - "Raw" + type: "string" + retrySettings: + description: "Used to configure http retries if failed" + properties: + maxRetries: + format: "int32" + type: "integer" + retryInterval: + type: "string" + type: "object" + required: + - "path" + - "provider" + type: "object" + webhookSpec: + description: "WebhookSpec controls the behavior of the external generator. Any body parameters should be passed to the server through the parameters field." + properties: + body: + description: "Body" + type: "string" + caBundle: + description: "PEM encoded CA bundle used to validate webhook server certificate. Only used\nif the Server URL is using HTTPS protocol. This parameter is ignored for\nplain HTTP protocol connection. If not set the system root certificates\nare used to validate the TLS connection." + format: "byte" + type: "string" + caProvider: + description: "The provider for the CA bundle to use to validate webhook server certificate." + properties: + key: + description: "The key where the CA certificate can be found in the Secret or ConfigMap." + maxLength: 253 + minLength: 1 + pattern: "^[-._a-zA-Z0-9]+$" + type: "string" + name: + description: "The name of the object located at the provider type." + maxLength: 253 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$" + type: "string" + namespace: + description: "The namespace the Provider type is in." + maxLength: 63 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" + type: "string" + type: + description: "The type of provider to use such as \"Secret\", or \"ConfigMap\"." + enum: + - "Secret" + - "ConfigMap" + type: "string" + required: + - "name" + - "type" + type: "object" + headers: + additionalProperties: + type: "string" + description: "Headers" + type: "object" + method: + description: "Webhook Method" + type: "string" + result: + description: "Result formatting" + properties: + jsonPath: + description: "Json path of return value" + type: "string" + type: "object" + secrets: + description: "Secrets to fill in templates\nThese secrets will be passed to the templating function as key value pairs under the given name" + items: + properties: + name: + description: "Name of this secret in templates" + type: "string" + secretRef: + description: "Secret ref to fill in credentials" + properties: + key: + description: "The key where the token is found." + maxLength: 253 + minLength: 1 + pattern: "^[-._a-zA-Z0-9]+$" + type: "string" + name: + description: "The name of the Secret resource being referred to." + maxLength: 253 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$" + type: "string" + type: "object" + required: + - "name" + - "secretRef" + type: "object" + type: "array" + timeout: + description: "Timeout" + type: "string" + url: + description: "Webhook url to call" + type: "string" + required: + - "result" + - "url" + type: "object" + type: "object" + kind: + description: "Kind the kind of this generator." + enum: + - "ACRAccessToken" + - "ECRAuthorizationToken" + - "Fake" + - "GCRAccessToken" + - "GithubAccessToken" + - "QuayAccessToken" + - "Password" + - "STSSessionToken" + - "UUID" + - "VaultDynamicSecret" + - "Webhook" + - "Grafana" + type: "string" + required: + - "generator" + - "kind" + type: "object" + type: "object" + served: true + storage: true + subresources: + status: {} diff --git a/crd-catalog/external-secrets/external-secrets/generators.external-secrets.io/v1alpha1/ecrauthorizationtokens.yaml b/crd-catalog/external-secrets/external-secrets/generators.external-secrets.io/v1alpha1/ecrauthorizationtokens.yaml new file mode 100644 index 000000000..29e713e44 --- /dev/null +++ b/crd-catalog/external-secrets/external-secrets/generators.external-secrets.io/v1alpha1/ecrauthorizationtokens.yaml @@ -0,0 +1,153 @@ +apiVersion: "apiextensions.k8s.io/v1" +kind: "CustomResourceDefinition" +metadata: + annotations: + controller-gen.kubebuilder.io/version: "v0.17.3" + labels: + external-secrets.io/component: "controller" + name: "ecrauthorizationtokens.generators.external-secrets.io" +spec: + group: "generators.external-secrets.io" + names: + categories: + - "external-secrets" + - "external-secrets-generators" + kind: "ECRAuthorizationToken" + listKind: "ECRAuthorizationTokenList" + plural: "ecrauthorizationtokens" + singular: "ecrauthorizationtoken" + scope: "Namespaced" + versions: + - name: "v1alpha1" + schema: + openAPIV3Schema: + description: "ECRAuthorizationTokenSpec uses the GetAuthorizationToken API to retrieve an\nauthorization token.\nThe authorization token is valid for 12 hours.\nThe authorizationToken returned is a base64 encoded string that can be decoded\nand used in a docker login command to authenticate to a registry.\nFor more information, see Registry authentication (https://docs.aws.amazon.com/AmazonECR/latest/userguide/Registries.html#registry_auth) in the Amazon Elastic Container Registry User Guide." + properties: + apiVersion: + description: "APIVersion defines the versioned schema of this representation of an object.\nServers should convert recognized schemas to the latest internal value, and\nmay reject unrecognized values.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources" + type: "string" + kind: + description: "Kind is a string value representing the REST resource this object represents.\nServers may infer this from the endpoint the client submits requests to.\nCannot be updated.\nIn CamelCase.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds" + type: "string" + metadata: + type: "object" + spec: + properties: + auth: + description: "Auth defines how to authenticate with AWS" + properties: + jwt: + description: "Authenticate against AWS using service account tokens." + properties: + serviceAccountRef: + description: "A reference to a ServiceAccount resource." + properties: + audiences: + description: "Audience specifies the `aud` claim for the service account token\nIf the service account uses a well-known annotation for e.g. IRSA or GCP Workload Identity\nthen this audiences will be appended to the list" + items: + type: "string" + type: "array" + name: + description: "The name of the ServiceAccount resource being referred to." + maxLength: 253 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$" + type: "string" + namespace: + description: "Namespace of the resource being referred to.\nIgnored if referent is not cluster-scoped, otherwise defaults to the namespace of the referent." + maxLength: 63 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" + type: "string" + required: + - "name" + type: "object" + type: "object" + secretRef: + description: "AWSAuthSecretRef holds secret references for AWS credentials\nboth AccessKeyID and SecretAccessKey must be defined in order to properly authenticate." + properties: + accessKeyIDSecretRef: + description: "The AccessKeyID is used for authentication" + properties: + key: + description: "A key in the referenced Secret.\nSome instances of this field may be defaulted, in others it may be required." + maxLength: 253 + minLength: 1 + pattern: "^[-._a-zA-Z0-9]+$" + type: "string" + name: + description: "The name of the Secret resource being referred to." + maxLength: 253 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$" + type: "string" + namespace: + description: "The namespace of the Secret resource being referred to.\nIgnored if referent is not cluster-scoped, otherwise defaults to the namespace of the referent." + maxLength: 63 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" + type: "string" + type: "object" + secretAccessKeySecretRef: + description: "The SecretAccessKey is used for authentication" + properties: + key: + description: "A key in the referenced Secret.\nSome instances of this field may be defaulted, in others it may be required." + maxLength: 253 + minLength: 1 + pattern: "^[-._a-zA-Z0-9]+$" + type: "string" + name: + description: "The name of the Secret resource being referred to." + maxLength: 253 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$" + type: "string" + namespace: + description: "The namespace of the Secret resource being referred to.\nIgnored if referent is not cluster-scoped, otherwise defaults to the namespace of the referent." + maxLength: 63 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" + type: "string" + type: "object" + sessionTokenSecretRef: + description: "The SessionToken used for authentication\nThis must be defined if AccessKeyID and SecretAccessKey are temporary credentials\nsee: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_use-resources.html" + properties: + key: + description: "A key in the referenced Secret.\nSome instances of this field may be defaulted, in others it may be required." + maxLength: 253 + minLength: 1 + pattern: "^[-._a-zA-Z0-9]+$" + type: "string" + name: + description: "The name of the Secret resource being referred to." + maxLength: 253 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$" + type: "string" + namespace: + description: "The namespace of the Secret resource being referred to.\nIgnored if referent is not cluster-scoped, otherwise defaults to the namespace of the referent." + maxLength: 63 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" + type: "string" + type: "object" + type: "object" + type: "object" + region: + description: "Region specifies the region to operate in." + type: "string" + role: + description: "You can assume a role before making calls to the\ndesired AWS service." + type: "string" + scope: + description: "Scope specifies the ECR service scope.\nValid options are private and public." + type: "string" + required: + - "region" + type: "object" + type: "object" + served: true + storage: true + subresources: + status: {} diff --git a/crd-catalog/external-secrets/external-secrets/generators.external-secrets.io/v1alpha1/fakes.yaml b/crd-catalog/external-secrets/external-secrets/generators.external-secrets.io/v1alpha1/fakes.yaml new file mode 100644 index 000000000..84b1dce9f --- /dev/null +++ b/crd-catalog/external-secrets/external-secrets/generators.external-secrets.io/v1alpha1/fakes.yaml @@ -0,0 +1,50 @@ +apiVersion: "apiextensions.k8s.io/v1" +kind: "CustomResourceDefinition" +metadata: + annotations: + controller-gen.kubebuilder.io/version: "v0.17.3" + labels: + external-secrets.io/component: "controller" + name: "fakes.generators.external-secrets.io" +spec: + group: "generators.external-secrets.io" + names: + categories: + - "external-secrets" + - "external-secrets-generators" + kind: "Fake" + listKind: "FakeList" + plural: "fakes" + singular: "fake" + scope: "Namespaced" + versions: + - name: "v1alpha1" + schema: + openAPIV3Schema: + description: "Fake generator is used for testing. It lets you define\na static set of credentials that is always returned." + properties: + apiVersion: + description: "APIVersion defines the versioned schema of this representation of an object.\nServers should convert recognized schemas to the latest internal value, and\nmay reject unrecognized values.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources" + type: "string" + kind: + description: "Kind is a string value representing the REST resource this object represents.\nServers may infer this from the endpoint the client submits requests to.\nCannot be updated.\nIn CamelCase.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds" + type: "string" + metadata: + type: "object" + spec: + description: "FakeSpec contains the static data." + properties: + controller: + description: "Used to select the correct ESO controller (think: ingress.ingressClassName)\nThe ESO controller is instantiated with a specific controller name and filters VDS based on this property" + type: "string" + data: + additionalProperties: + type: "string" + description: "Data defines the static data returned\nby this generator." + type: "object" + type: "object" + type: "object" + served: true + storage: true + subresources: + status: {} diff --git a/crd-catalog/external-secrets/external-secrets/generators.external-secrets.io/v1alpha1/gcraccesstokens.yaml b/crd-catalog/external-secrets/external-secrets/generators.external-secrets.io/v1alpha1/gcraccesstokens.yaml new file mode 100644 index 000000000..e2d87686b --- /dev/null +++ b/crd-catalog/external-secrets/external-secrets/generators.external-secrets.io/v1alpha1/gcraccesstokens.yaml @@ -0,0 +1,112 @@ +apiVersion: "apiextensions.k8s.io/v1" +kind: "CustomResourceDefinition" +metadata: + annotations: + controller-gen.kubebuilder.io/version: "v0.17.3" + labels: + external-secrets.io/component: "controller" + name: "gcraccesstokens.generators.external-secrets.io" +spec: + group: "generators.external-secrets.io" + names: + categories: + - "external-secrets" + - "external-secrets-generators" + kind: "GCRAccessToken" + listKind: "GCRAccessTokenList" + plural: "gcraccesstokens" + singular: "gcraccesstoken" + scope: "Namespaced" + versions: + - name: "v1alpha1" + schema: + openAPIV3Schema: + description: "GCRAccessToken generates an GCP access token\nthat can be used to authenticate with GCR." + properties: + apiVersion: + description: "APIVersion defines the versioned schema of this representation of an object.\nServers should convert recognized schemas to the latest internal value, and\nmay reject unrecognized values.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources" + type: "string" + kind: + description: "Kind is a string value representing the REST resource this object represents.\nServers may infer this from the endpoint the client submits requests to.\nCannot be updated.\nIn CamelCase.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds" + type: "string" + metadata: + type: "object" + spec: + properties: + auth: + description: "Auth defines the means for authenticating with GCP" + properties: + secretRef: + properties: + secretAccessKeySecretRef: + description: "The SecretAccessKey is used for authentication" + properties: + key: + description: "A key in the referenced Secret.\nSome instances of this field may be defaulted, in others it may be required." + maxLength: 253 + minLength: 1 + pattern: "^[-._a-zA-Z0-9]+$" + type: "string" + name: + description: "The name of the Secret resource being referred to." + maxLength: 253 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$" + type: "string" + namespace: + description: "The namespace of the Secret resource being referred to.\nIgnored if referent is not cluster-scoped, otherwise defaults to the namespace of the referent." + maxLength: 63 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" + type: "string" + type: "object" + type: "object" + workloadIdentity: + properties: + clusterLocation: + type: "string" + clusterName: + type: "string" + clusterProjectID: + type: "string" + serviceAccountRef: + description: "A reference to a ServiceAccount resource." + properties: + audiences: + description: "Audience specifies the `aud` claim for the service account token\nIf the service account uses a well-known annotation for e.g. IRSA or GCP Workload Identity\nthen this audiences will be appended to the list" + items: + type: "string" + type: "array" + name: + description: "The name of the ServiceAccount resource being referred to." + maxLength: 253 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$" + type: "string" + namespace: + description: "Namespace of the resource being referred to.\nIgnored if referent is not cluster-scoped, otherwise defaults to the namespace of the referent." + maxLength: 63 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" + type: "string" + required: + - "name" + type: "object" + required: + - "clusterLocation" + - "clusterName" + - "serviceAccountRef" + type: "object" + type: "object" + projectID: + description: "ProjectID defines which project to use to authenticate with" + type: "string" + required: + - "auth" + - "projectID" + type: "object" + type: "object" + served: true + storage: true + subresources: + status: {} diff --git a/crd-catalog/external-secrets/external-secrets/generators.external-secrets.io/v1alpha1/generatorstates.yaml b/crd-catalog/external-secrets/external-secrets/generators.external-secrets.io/v1alpha1/generatorstates.yaml new file mode 100644 index 000000000..416887d31 --- /dev/null +++ b/crd-catalog/external-secrets/external-secrets/generators.external-secrets.io/v1alpha1/generatorstates.yaml @@ -0,0 +1,83 @@ +apiVersion: "apiextensions.k8s.io/v1" +kind: "CustomResourceDefinition" +metadata: + annotations: + controller-gen.kubebuilder.io/version: "v0.17.3" + labels: + external-secrets.io/component: "controller" + name: "generatorstates.generators.external-secrets.io" +spec: + group: "generators.external-secrets.io" + names: + categories: + - "external-secrets" + - "external-secrets-generators" + kind: "GeneratorState" + listKind: "GeneratorStateList" + plural: "generatorstates" + shortNames: + - "gs" + singular: "generatorstate" + scope: "Namespaced" + versions: + - additionalPrinterColumns: + - jsonPath: ".spec.garbageCollectionDeadline" + name: "GC Deadline" + type: "string" + - jsonPath: ".metadata.creationTimestamp" + name: "Age" + type: "date" + name: "v1alpha1" + schema: + openAPIV3Schema: + properties: + apiVersion: + description: "APIVersion defines the versioned schema of this representation of an object.\nServers should convert recognized schemas to the latest internal value, and\nmay reject unrecognized values.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources" + type: "string" + kind: + description: "Kind is a string value representing the REST resource this object represents.\nServers may infer this from the endpoint the client submits requests to.\nCannot be updated.\nIn CamelCase.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds" + type: "string" + metadata: + type: "object" + spec: + properties: + garbageCollectionDeadline: + description: "GarbageCollectionDeadline is the time after which the generator state\nwill be deleted.\nIt is set by the controller which creates the generator state and\ncan be set configured by the user.\nIf the garbage collection deadline is not set the generator state will not be deleted." + format: "date-time" + type: "string" + resource: + description: "Resource is the generator manifest that produced the state.\nIt is a snapshot of the generator manifest at the time the state was produced.\nThis manifest will be used to delete the resource. Any configuration that is referenced\nin the manifest should be available at the time of garbage collection. If that is not the case deletion will\nbe blocked by a finalizer." + x-kubernetes-preserve-unknown-fields: true + state: + description: "State is the state that was produced by the generator implementation." + x-kubernetes-preserve-unknown-fields: true + required: + - "resource" + - "state" + type: "object" + status: + properties: + conditions: + items: + properties: + lastTransitionTime: + format: "date-time" + type: "string" + message: + type: "string" + reason: + type: "string" + status: + type: "string" + type: + type: "string" + required: + - "status" + - "type" + type: "object" + type: "array" + type: "object" + type: "object" + served: true + storage: true + subresources: {} diff --git a/crd-catalog/external-secrets/external-secrets/generators.external-secrets.io/v1alpha1/githubaccesstokens.yaml b/crd-catalog/external-secrets/external-secrets/generators.external-secrets.io/v1alpha1/githubaccesstokens.yaml new file mode 100644 index 000000000..d987dda5a --- /dev/null +++ b/crd-catalog/external-secrets/external-secrets/generators.external-secrets.io/v1alpha1/githubaccesstokens.yaml @@ -0,0 +1,95 @@ +apiVersion: "apiextensions.k8s.io/v1" +kind: "CustomResourceDefinition" +metadata: + annotations: + controller-gen.kubebuilder.io/version: "v0.17.3" + labels: + external-secrets.io/component: "controller" + name: "githubaccesstokens.generators.external-secrets.io" +spec: + group: "generators.external-secrets.io" + names: + categories: + - "external-secrets" + - "external-secrets-generators" + kind: "GithubAccessToken" + listKind: "GithubAccessTokenList" + plural: "githubaccesstokens" + singular: "githubaccesstoken" + scope: "Namespaced" + versions: + - name: "v1alpha1" + schema: + openAPIV3Schema: + description: "GithubAccessToken generates ghs_ accessToken" + properties: + apiVersion: + description: "APIVersion defines the versioned schema of this representation of an object.\nServers should convert recognized schemas to the latest internal value, and\nmay reject unrecognized values.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources" + type: "string" + kind: + description: "Kind is a string value representing the REST resource this object represents.\nServers may infer this from the endpoint the client submits requests to.\nCannot be updated.\nIn CamelCase.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds" + type: "string" + metadata: + type: "object" + spec: + properties: + appID: + type: "string" + auth: + description: "Auth configures how ESO authenticates with a Github instance." + properties: + privateKey: + properties: + secretRef: + description: "A reference to a specific 'key' within a Secret resource.\nIn some instances, `key` is a required field." + properties: + key: + description: "A key in the referenced Secret.\nSome instances of this field may be defaulted, in others it may be required." + maxLength: 253 + minLength: 1 + pattern: "^[-._a-zA-Z0-9]+$" + type: "string" + name: + description: "The name of the Secret resource being referred to." + maxLength: 253 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$" + type: "string" + namespace: + description: "The namespace of the Secret resource being referred to.\nIgnored if referent is not cluster-scoped, otherwise defaults to the namespace of the referent." + maxLength: 63 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" + type: "string" + type: "object" + required: + - "secretRef" + type: "object" + required: + - "privateKey" + type: "object" + installID: + type: "string" + permissions: + additionalProperties: + type: "string" + description: "Map of permissions the token will have. If omitted, defaults to all permissions the GitHub App has." + type: "object" + repositories: + description: "List of repositories the token will have access to. If omitted, defaults to all repositories the GitHub App\nis installed to." + items: + type: "string" + type: "array" + url: + description: "URL configures the Github instance URL. Defaults to https://github.com/." + type: "string" + required: + - "appID" + - "auth" + - "installID" + type: "object" + type: "object" + served: true + storage: true + subresources: + status: {} diff --git a/crd-catalog/external-secrets/external-secrets/generators.external-secrets.io/v1alpha1/grafanas.yaml b/crd-catalog/external-secrets/external-secrets/generators.external-secrets.io/v1alpha1/grafanas.yaml new file mode 100644 index 000000000..80e1b4c55 --- /dev/null +++ b/crd-catalog/external-secrets/external-secrets/generators.external-secrets.io/v1alpha1/grafanas.yaml @@ -0,0 +1,107 @@ +apiVersion: "apiextensions.k8s.io/v1" +kind: "CustomResourceDefinition" +metadata: + annotations: + controller-gen.kubebuilder.io/version: "v0.17.3" + labels: + external-secrets.io/component: "controller" + name: "grafanas.generators.external-secrets.io" +spec: + group: "generators.external-secrets.io" + names: + categories: + - "external-secrets" + - "external-secrets-generators" + kind: "Grafana" + listKind: "GrafanaList" + plural: "grafanas" + singular: "grafana" + scope: "Namespaced" + versions: + - name: "v1alpha1" + schema: + openAPIV3Schema: + properties: + apiVersion: + description: "APIVersion defines the versioned schema of this representation of an object.\nServers should convert recognized schemas to the latest internal value, and\nmay reject unrecognized values.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources" + type: "string" + kind: + description: "Kind is a string value representing the REST resource this object represents.\nServers may infer this from the endpoint the client submits requests to.\nCannot be updated.\nIn CamelCase.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds" + type: "string" + metadata: + type: "object" + spec: + description: "GrafanaSpec controls the behavior of the grafana generator." + properties: + auth: + description: "Auth is the authentication configuration to authenticate\nagainst the Grafana instance." + properties: + basic: + description: "Basic auth credentials used to authenticate against the Grafana instance.\nNote: you need a token which has elevated permissions to create service accounts.\nSee here for the documentation on basic roles offered by Grafana:\nhttps://grafana.com/docs/grafana/latest/administration/roles-and-permissions/access-control/rbac-fixed-basic-role-definitions/" + properties: + password: + description: "A basic auth password used to authenticate against the Grafana instance." + properties: + key: + description: "The key where the token is found." + maxLength: 253 + minLength: 1 + pattern: "^[-._a-zA-Z0-9]+$" + type: "string" + name: + description: "The name of the Secret resource being referred to." + maxLength: 253 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$" + type: "string" + type: "object" + username: + description: "A basic auth username used to authenticate against the Grafana instance." + type: "string" + required: + - "password" + - "username" + type: "object" + token: + description: "A service account token used to authenticate against the Grafana instance.\nNote: you need a token which has elevated permissions to create service accounts.\nSee here for the documentation on basic roles offered by Grafana:\nhttps://grafana.com/docs/grafana/latest/administration/roles-and-permissions/access-control/rbac-fixed-basic-role-definitions/" + properties: + key: + description: "The key where the token is found." + maxLength: 253 + minLength: 1 + pattern: "^[-._a-zA-Z0-9]+$" + type: "string" + name: + description: "The name of the Secret resource being referred to." + maxLength: 253 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$" + type: "string" + type: "object" + type: "object" + serviceAccount: + description: "ServiceAccount is the configuration for the service account that\nis supposed to be generated by the generator." + properties: + name: + description: "Name is the name of the service account that will be created by ESO." + type: "string" + role: + description: "Role is the role of the service account.\nSee here for the documentation on basic roles offered by Grafana:\nhttps://grafana.com/docs/grafana/latest/administration/roles-and-permissions/access-control/rbac-fixed-basic-role-definitions/" + type: "string" + required: + - "name" + - "role" + type: "object" + url: + description: "URL is the URL of the Grafana instance." + type: "string" + required: + - "auth" + - "serviceAccount" + - "url" + type: "object" + type: "object" + served: true + storage: true + subresources: + status: {} diff --git a/crd-catalog/external-secrets/external-secrets/generators.external-secrets.io/v1alpha1/passwords.yaml b/crd-catalog/external-secrets/external-secrets/generators.external-secrets.io/v1alpha1/passwords.yaml new file mode 100644 index 000000000..00bc1d897 --- /dev/null +++ b/crd-catalog/external-secrets/external-secrets/generators.external-secrets.io/v1alpha1/passwords.yaml @@ -0,0 +1,67 @@ +apiVersion: "apiextensions.k8s.io/v1" +kind: "CustomResourceDefinition" +metadata: + annotations: + controller-gen.kubebuilder.io/version: "v0.17.3" + labels: + external-secrets.io/component: "controller" + name: "passwords.generators.external-secrets.io" +spec: + group: "generators.external-secrets.io" + names: + categories: + - "external-secrets" + - "external-secrets-generators" + kind: "Password" + listKind: "PasswordList" + plural: "passwords" + singular: "password" + scope: "Namespaced" + versions: + - name: "v1alpha1" + schema: + openAPIV3Schema: + description: "Password generates a random password based on the\nconfiguration parameters in spec.\nYou can specify the length, characterset and other attributes." + properties: + apiVersion: + description: "APIVersion defines the versioned schema of this representation of an object.\nServers should convert recognized schemas to the latest internal value, and\nmay reject unrecognized values.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources" + type: "string" + kind: + description: "Kind is a string value representing the REST resource this object represents.\nServers may infer this from the endpoint the client submits requests to.\nCannot be updated.\nIn CamelCase.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds" + type: "string" + metadata: + type: "object" + spec: + description: "PasswordSpec controls the behavior of the password generator." + properties: + allowRepeat: + default: false + description: "set AllowRepeat to true to allow repeating characters." + type: "boolean" + digits: + description: "Digits specifies the number of digits in the generated\npassword. If omitted it defaults to 25% of the length of the password" + type: "integer" + length: + default: 24 + description: "Length of the password to be generated.\nDefaults to 24" + type: "integer" + noUpper: + default: false + description: "Set NoUpper to disable uppercase characters" + type: "boolean" + symbolCharacters: + description: "SymbolCharacters specifies the special characters that should be used\nin the generated password." + type: "string" + symbols: + description: "Symbols specifies the number of symbol characters in the generated\npassword. If omitted it defaults to 25% of the length of the password" + type: "integer" + required: + - "allowRepeat" + - "length" + - "noUpper" + type: "object" + type: "object" + served: true + storage: true + subresources: + status: {} diff --git a/crd-catalog/external-secrets/external-secrets/generators.external-secrets.io/v1alpha1/quayaccesstokens.yaml b/crd-catalog/external-secrets/external-secrets/generators.external-secrets.io/v1alpha1/quayaccesstokens.yaml new file mode 100644 index 000000000..aa36e5df8 --- /dev/null +++ b/crd-catalog/external-secrets/external-secrets/generators.external-secrets.io/v1alpha1/quayaccesstokens.yaml @@ -0,0 +1,73 @@ +apiVersion: "apiextensions.k8s.io/v1" +kind: "CustomResourceDefinition" +metadata: + annotations: + controller-gen.kubebuilder.io/version: "v0.17.3" + labels: + external-secrets.io/component: "controller" + name: "quayaccesstokens.generators.external-secrets.io" +spec: + group: "generators.external-secrets.io" + names: + categories: + - "external-secrets" + - "external-secrets-generators" + kind: "QuayAccessToken" + listKind: "QuayAccessTokenList" + plural: "quayaccesstokens" + singular: "quayaccesstoken" + scope: "Namespaced" + versions: + - name: "v1alpha1" + schema: + openAPIV3Schema: + description: "QuayAccessToken generates Quay oauth token for pulling/pushing images" + properties: + apiVersion: + description: "APIVersion defines the versioned schema of this representation of an object.\nServers should convert recognized schemas to the latest internal value, and\nmay reject unrecognized values.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources" + type: "string" + kind: + description: "Kind is a string value representing the REST resource this object represents.\nServers may infer this from the endpoint the client submits requests to.\nCannot be updated.\nIn CamelCase.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds" + type: "string" + metadata: + type: "object" + spec: + properties: + robotAccount: + description: "Name of the robot account you are federating with" + type: "string" + serviceAccountRef: + description: "Name of the service account you are federating with" + properties: + audiences: + description: "Audience specifies the `aud` claim for the service account token\nIf the service account uses a well-known annotation for e.g. IRSA or GCP Workload Identity\nthen this audiences will be appended to the list" + items: + type: "string" + type: "array" + name: + description: "The name of the ServiceAccount resource being referred to." + maxLength: 253 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$" + type: "string" + namespace: + description: "Namespace of the resource being referred to.\nIgnored if referent is not cluster-scoped, otherwise defaults to the namespace of the referent." + maxLength: 63 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" + type: "string" + required: + - "name" + type: "object" + url: + description: "URL configures the Quay instance URL. Defaults to quay.io." + type: "string" + required: + - "robotAccount" + - "serviceAccountRef" + type: "object" + type: "object" + served: true + storage: true + subresources: + status: {} diff --git a/crd-catalog/external-secrets/external-secrets/generators.external-secrets.io/v1alpha1/stssessiontokens.yaml b/crd-catalog/external-secrets/external-secrets/generators.external-secrets.io/v1alpha1/stssessiontokens.yaml new file mode 100644 index 000000000..b0a6ee1a9 --- /dev/null +++ b/crd-catalog/external-secrets/external-secrets/generators.external-secrets.io/v1alpha1/stssessiontokens.yaml @@ -0,0 +1,164 @@ +apiVersion: "apiextensions.k8s.io/v1" +kind: "CustomResourceDefinition" +metadata: + annotations: + controller-gen.kubebuilder.io/version: "v0.17.3" + labels: + external-secrets.io/component: "controller" + name: "stssessiontokens.generators.external-secrets.io" +spec: + group: "generators.external-secrets.io" + names: + categories: + - "external-secrets" + - "external-secrets-generators" + kind: "STSSessionToken" + listKind: "STSSessionTokenList" + plural: "stssessiontokens" + singular: "stssessiontoken" + scope: "Namespaced" + versions: + - name: "v1alpha1" + schema: + openAPIV3Schema: + description: "STSSessionToken uses the GetSessionToken API to retrieve an authorization token.\nThe authorization token is valid for 12 hours.\nThe authorizationToken returned is a base64 encoded string that can be decoded.\nFor more information, see GetSessionToken (https://docs.aws.amazon.com/STS/latest/APIReference/API_GetSessionToken.html)." + properties: + apiVersion: + description: "APIVersion defines the versioned schema of this representation of an object.\nServers should convert recognized schemas to the latest internal value, and\nmay reject unrecognized values.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources" + type: "string" + kind: + description: "Kind is a string value representing the REST resource this object represents.\nServers may infer this from the endpoint the client submits requests to.\nCannot be updated.\nIn CamelCase.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds" + type: "string" + metadata: + type: "object" + spec: + properties: + auth: + description: "Auth defines how to authenticate with AWS" + properties: + jwt: + description: "Authenticate against AWS using service account tokens." + properties: + serviceAccountRef: + description: "A reference to a ServiceAccount resource." + properties: + audiences: + description: "Audience specifies the `aud` claim for the service account token\nIf the service account uses a well-known annotation for e.g. IRSA or GCP Workload Identity\nthen this audiences will be appended to the list" + items: + type: "string" + type: "array" + name: + description: "The name of the ServiceAccount resource being referred to." + maxLength: 253 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$" + type: "string" + namespace: + description: "Namespace of the resource being referred to.\nIgnored if referent is not cluster-scoped, otherwise defaults to the namespace of the referent." + maxLength: 63 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" + type: "string" + required: + - "name" + type: "object" + type: "object" + secretRef: + description: "AWSAuthSecretRef holds secret references for AWS credentials\nboth AccessKeyID and SecretAccessKey must be defined in order to properly authenticate." + properties: + accessKeyIDSecretRef: + description: "The AccessKeyID is used for authentication" + properties: + key: + description: "A key in the referenced Secret.\nSome instances of this field may be defaulted, in others it may be required." + maxLength: 253 + minLength: 1 + pattern: "^[-._a-zA-Z0-9]+$" + type: "string" + name: + description: "The name of the Secret resource being referred to." + maxLength: 253 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$" + type: "string" + namespace: + description: "The namespace of the Secret resource being referred to.\nIgnored if referent is not cluster-scoped, otherwise defaults to the namespace of the referent." + maxLength: 63 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" + type: "string" + type: "object" + secretAccessKeySecretRef: + description: "The SecretAccessKey is used for authentication" + properties: + key: + description: "A key in the referenced Secret.\nSome instances of this field may be defaulted, in others it may be required." + maxLength: 253 + minLength: 1 + pattern: "^[-._a-zA-Z0-9]+$" + type: "string" + name: + description: "The name of the Secret resource being referred to." + maxLength: 253 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$" + type: "string" + namespace: + description: "The namespace of the Secret resource being referred to.\nIgnored if referent is not cluster-scoped, otherwise defaults to the namespace of the referent." + maxLength: 63 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" + type: "string" + type: "object" + sessionTokenSecretRef: + description: "The SessionToken used for authentication\nThis must be defined if AccessKeyID and SecretAccessKey are temporary credentials\nsee: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_use-resources.html" + properties: + key: + description: "A key in the referenced Secret.\nSome instances of this field may be defaulted, in others it may be required." + maxLength: 253 + minLength: 1 + pattern: "^[-._a-zA-Z0-9]+$" + type: "string" + name: + description: "The name of the Secret resource being referred to." + maxLength: 253 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$" + type: "string" + namespace: + description: "The namespace of the Secret resource being referred to.\nIgnored if referent is not cluster-scoped, otherwise defaults to the namespace of the referent." + maxLength: 63 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" + type: "string" + type: "object" + type: "object" + type: "object" + region: + description: "Region specifies the region to operate in." + type: "string" + requestParameters: + description: "RequestParameters contains parameters that can be passed to the STS service." + properties: + serialNumber: + description: "SerialNumber is the identification number of the MFA device that is associated with the IAM user who is making\nthe GetSessionToken call.\nPossible values: hardware device (such as GAHT12345678) or an Amazon Resource Name (ARN) for a virtual device\n(such as arn:aws:iam::123456789012:mfa/user)" + type: "string" + sessionDuration: + description: "SessionDuration The duration, in seconds, that the credentials should remain valid. Acceptable durations for\nIAM user sessions range from 900 seconds (15 minutes) to 129,600 seconds (36 hours), with 43,200 seconds\n(12 hours) as the default." + format: "int64" + type: "integer" + tokenCode: + description: "TokenCode is the value provided by the MFA device, if MFA is required." + type: "string" + type: "object" + role: + description: "You can assume a role before making calls to the\ndesired AWS service." + type: "string" + required: + - "region" + type: "object" + type: "object" + served: true + storage: true + subresources: + status: {} diff --git a/crd-catalog/external-secrets/external-secrets/generators.external-secrets.io/v1alpha1/uuids.yaml b/crd-catalog/external-secrets/external-secrets/generators.external-secrets.io/v1alpha1/uuids.yaml new file mode 100644 index 000000000..f27759fda --- /dev/null +++ b/crd-catalog/external-secrets/external-secrets/generators.external-secrets.io/v1alpha1/uuids.yaml @@ -0,0 +1,41 @@ +apiVersion: "apiextensions.k8s.io/v1" +kind: "CustomResourceDefinition" +metadata: + annotations: + controller-gen.kubebuilder.io/version: "v0.17.3" + labels: + external-secrets.io/component: "controller" + name: "uuids.generators.external-secrets.io" +spec: + group: "generators.external-secrets.io" + names: + categories: + - "external-secrets" + - "external-secrets-generators" + kind: "UUID" + listKind: "UUIDList" + plural: "uuids" + singular: "uuid" + scope: "Namespaced" + versions: + - name: "v1alpha1" + schema: + openAPIV3Schema: + description: "UUID generates a version 1 UUID (e56657e3-764f-11ef-a397-65231a88c216)." + properties: + apiVersion: + description: "APIVersion defines the versioned schema of this representation of an object.\nServers should convert recognized schemas to the latest internal value, and\nmay reject unrecognized values.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources" + type: "string" + kind: + description: "Kind is a string value representing the REST resource this object represents.\nServers may infer this from the endpoint the client submits requests to.\nCannot be updated.\nIn CamelCase.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds" + type: "string" + metadata: + type: "object" + spec: + description: "UUIDSpec controls the behavior of the uuid generator." + type: "object" + type: "object" + served: true + storage: true + subresources: + status: {} diff --git a/crd-catalog/external-secrets/external-secrets/generators.external-secrets.io/v1alpha1/vaultdynamicsecrets.yaml b/crd-catalog/external-secrets/external-secrets/generators.external-secrets.io/v1alpha1/vaultdynamicsecrets.yaml new file mode 100644 index 000000000..033806202 --- /dev/null +++ b/crd-catalog/external-secrets/external-secrets/generators.external-secrets.io/v1alpha1/vaultdynamicsecrets.yaml @@ -0,0 +1,652 @@ +apiVersion: "apiextensions.k8s.io/v1" +kind: "CustomResourceDefinition" +metadata: + annotations: + controller-gen.kubebuilder.io/version: "v0.17.3" + labels: + external-secrets.io/component: "controller" + name: "vaultdynamicsecrets.generators.external-secrets.io" +spec: + group: "generators.external-secrets.io" + names: + categories: + - "external-secrets" + - "external-secrets-generators" + kind: "VaultDynamicSecret" + listKind: "VaultDynamicSecretList" + plural: "vaultdynamicsecrets" + singular: "vaultdynamicsecret" + scope: "Namespaced" + versions: + - name: "v1alpha1" + schema: + openAPIV3Schema: + properties: + apiVersion: + description: "APIVersion defines the versioned schema of this representation of an object.\nServers should convert recognized schemas to the latest internal value, and\nmay reject unrecognized values.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources" + type: "string" + kind: + description: "Kind is a string value representing the REST resource this object represents.\nServers may infer this from the endpoint the client submits requests to.\nCannot be updated.\nIn CamelCase.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds" + type: "string" + metadata: + type: "object" + spec: + properties: + allowEmptyResponse: + default: false + description: "Do not fail if no secrets are found. Useful for requests where no data is expected." + type: "boolean" + controller: + description: "Used to select the correct ESO controller (think: ingress.ingressClassName)\nThe ESO controller is instantiated with a specific controller name and filters VDS based on this property" + type: "string" + method: + description: "Vault API method to use (GET/POST/other)" + type: "string" + parameters: + description: "Parameters to pass to Vault write (for non-GET methods)" + x-kubernetes-preserve-unknown-fields: true + path: + description: "Vault path to obtain the dynamic secret from" + type: "string" + provider: + description: "Vault provider common spec" + properties: + auth: + description: "Auth configures how secret-manager authenticates with the Vault server." + properties: + appRole: + description: "AppRole authenticates with Vault using the App Role auth mechanism,\nwith the role and secret stored in a Kubernetes Secret resource." + properties: + path: + default: "approle" + description: "Path where the App Role authentication backend is mounted\nin Vault, e.g: \"approle\"" + type: "string" + roleId: + description: "RoleID configured in the App Role authentication backend when setting\nup the authentication backend in Vault." + type: "string" + roleRef: + description: "Reference to a key in a Secret that contains the App Role ID used\nto authenticate with Vault.\nThe `key` field must be specified and denotes which entry within the Secret\nresource is used as the app role id." + properties: + key: + description: "A key in the referenced Secret.\nSome instances of this field may be defaulted, in others it may be required." + maxLength: 253 + minLength: 1 + pattern: "^[-._a-zA-Z0-9]+$" + type: "string" + name: + description: "The name of the Secret resource being referred to." + maxLength: 253 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$" + type: "string" + namespace: + description: "The namespace of the Secret resource being referred to.\nIgnored if referent is not cluster-scoped, otherwise defaults to the namespace of the referent." + maxLength: 63 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" + type: "string" + type: "object" + secretRef: + description: "Reference to a key in a Secret that contains the App Role secret used\nto authenticate with Vault.\nThe `key` field must be specified and denotes which entry within the Secret\nresource is used as the app role secret." + properties: + key: + description: "A key in the referenced Secret.\nSome instances of this field may be defaulted, in others it may be required." + maxLength: 253 + minLength: 1 + pattern: "^[-._a-zA-Z0-9]+$" + type: "string" + name: + description: "The name of the Secret resource being referred to." + maxLength: 253 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$" + type: "string" + namespace: + description: "The namespace of the Secret resource being referred to.\nIgnored if referent is not cluster-scoped, otherwise defaults to the namespace of the referent." + maxLength: 63 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" + type: "string" + type: "object" + required: + - "path" + - "secretRef" + type: "object" + cert: + description: "Cert authenticates with TLS Certificates by passing client certificate, private key and ca certificate\nCert authentication method" + properties: + clientCert: + description: "ClientCert is a certificate to authenticate using the Cert Vault\nauthentication method" + properties: + key: + description: "A key in the referenced Secret.\nSome instances of this field may be defaulted, in others it may be required." + maxLength: 253 + minLength: 1 + pattern: "^[-._a-zA-Z0-9]+$" + type: "string" + name: + description: "The name of the Secret resource being referred to." + maxLength: 253 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$" + type: "string" + namespace: + description: "The namespace of the Secret resource being referred to.\nIgnored if referent is not cluster-scoped, otherwise defaults to the namespace of the referent." + maxLength: 63 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" + type: "string" + type: "object" + secretRef: + description: "SecretRef to a key in a Secret resource containing client private key to\nauthenticate with Vault using the Cert authentication method" + properties: + key: + description: "A key in the referenced Secret.\nSome instances of this field may be defaulted, in others it may be required." + maxLength: 253 + minLength: 1 + pattern: "^[-._a-zA-Z0-9]+$" + type: "string" + name: + description: "The name of the Secret resource being referred to." + maxLength: 253 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$" + type: "string" + namespace: + description: "The namespace of the Secret resource being referred to.\nIgnored if referent is not cluster-scoped, otherwise defaults to the namespace of the referent." + maxLength: 63 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" + type: "string" + type: "object" + type: "object" + iam: + description: "Iam authenticates with vault by passing a special AWS request signed with AWS IAM credentials\nAWS IAM authentication method" + properties: + externalID: + description: "AWS External ID set on assumed IAM roles" + type: "string" + jwt: + description: "Specify a service account with IRSA enabled" + properties: + serviceAccountRef: + description: "A reference to a ServiceAccount resource." + properties: + audiences: + description: "Audience specifies the `aud` claim for the service account token\nIf the service account uses a well-known annotation for e.g. IRSA or GCP Workload Identity\nthen this audiences will be appended to the list" + items: + type: "string" + type: "array" + name: + description: "The name of the ServiceAccount resource being referred to." + maxLength: 253 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$" + type: "string" + namespace: + description: "Namespace of the resource being referred to.\nIgnored if referent is not cluster-scoped, otherwise defaults to the namespace of the referent." + maxLength: 63 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" + type: "string" + required: + - "name" + type: "object" + type: "object" + path: + description: "Path where the AWS auth method is enabled in Vault, e.g: \"aws\"" + type: "string" + region: + description: "AWS region" + type: "string" + role: + description: "This is the AWS role to be assumed before talking to vault" + type: "string" + secretRef: + description: "Specify credentials in a Secret object" + properties: + accessKeyIDSecretRef: + description: "The AccessKeyID is used for authentication" + properties: + key: + description: "A key in the referenced Secret.\nSome instances of this field may be defaulted, in others it may be required." + maxLength: 253 + minLength: 1 + pattern: "^[-._a-zA-Z0-9]+$" + type: "string" + name: + description: "The name of the Secret resource being referred to." + maxLength: 253 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$" + type: "string" + namespace: + description: "The namespace of the Secret resource being referred to.\nIgnored if referent is not cluster-scoped, otherwise defaults to the namespace of the referent." + maxLength: 63 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" + type: "string" + type: "object" + secretAccessKeySecretRef: + description: "The SecretAccessKey is used for authentication" + properties: + key: + description: "A key in the referenced Secret.\nSome instances of this field may be defaulted, in others it may be required." + maxLength: 253 + minLength: 1 + pattern: "^[-._a-zA-Z0-9]+$" + type: "string" + name: + description: "The name of the Secret resource being referred to." + maxLength: 253 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$" + type: "string" + namespace: + description: "The namespace of the Secret resource being referred to.\nIgnored if referent is not cluster-scoped, otherwise defaults to the namespace of the referent." + maxLength: 63 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" + type: "string" + type: "object" + sessionTokenSecretRef: + description: "The SessionToken used for authentication\nThis must be defined if AccessKeyID and SecretAccessKey are temporary credentials\nsee: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_use-resources.html" + properties: + key: + description: "A key in the referenced Secret.\nSome instances of this field may be defaulted, in others it may be required." + maxLength: 253 + minLength: 1 + pattern: "^[-._a-zA-Z0-9]+$" + type: "string" + name: + description: "The name of the Secret resource being referred to." + maxLength: 253 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$" + type: "string" + namespace: + description: "The namespace of the Secret resource being referred to.\nIgnored if referent is not cluster-scoped, otherwise defaults to the namespace of the referent." + maxLength: 63 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" + type: "string" + type: "object" + type: "object" + vaultAwsIamServerID: + description: "X-Vault-AWS-IAM-Server-ID is an additional header used by Vault IAM auth method to mitigate against different types of replay attacks. More details here: https://developer.hashicorp.com/vault/docs/auth/aws" + type: "string" + vaultRole: + description: "Vault Role. In vault, a role describes an identity with a set of permissions, groups, or policies you want to attach a user of the secrets engine" + type: "string" + required: + - "vaultRole" + type: "object" + jwt: + description: "Jwt authenticates with Vault by passing role and JWT token using the\nJWT/OIDC authentication method" + properties: + kubernetesServiceAccountToken: + description: "Optional ServiceAccountToken specifies the Kubernetes service account for which to request\na token for with the `TokenRequest` API." + properties: + audiences: + description: "Optional audiences field that will be used to request a temporary Kubernetes service\naccount token for the service account referenced by `serviceAccountRef`.\nDefaults to a single audience `vault` it not specified.\nDeprecated: use serviceAccountRef.Audiences instead" + items: + type: "string" + type: "array" + expirationSeconds: + description: "Optional expiration time in seconds that will be used to request a temporary\nKubernetes service account token for the service account referenced by\n`serviceAccountRef`.\nDeprecated: this will be removed in the future.\nDefaults to 10 minutes." + format: "int64" + type: "integer" + serviceAccountRef: + description: "Service account field containing the name of a kubernetes ServiceAccount." + properties: + audiences: + description: "Audience specifies the `aud` claim for the service account token\nIf the service account uses a well-known annotation for e.g. IRSA or GCP Workload Identity\nthen this audiences will be appended to the list" + items: + type: "string" + type: "array" + name: + description: "The name of the ServiceAccount resource being referred to." + maxLength: 253 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$" + type: "string" + namespace: + description: "Namespace of the resource being referred to.\nIgnored if referent is not cluster-scoped, otherwise defaults to the namespace of the referent." + maxLength: 63 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" + type: "string" + required: + - "name" + type: "object" + required: + - "serviceAccountRef" + type: "object" + path: + default: "jwt" + description: "Path where the JWT authentication backend is mounted\nin Vault, e.g: \"jwt\"" + type: "string" + role: + description: "Role is a JWT role to authenticate using the JWT/OIDC Vault\nauthentication method" + type: "string" + secretRef: + description: "Optional SecretRef that refers to a key in a Secret resource containing JWT token to\nauthenticate with Vault using the JWT/OIDC authentication method." + properties: + key: + description: "A key in the referenced Secret.\nSome instances of this field may be defaulted, in others it may be required." + maxLength: 253 + minLength: 1 + pattern: "^[-._a-zA-Z0-9]+$" + type: "string" + name: + description: "The name of the Secret resource being referred to." + maxLength: 253 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$" + type: "string" + namespace: + description: "The namespace of the Secret resource being referred to.\nIgnored if referent is not cluster-scoped, otherwise defaults to the namespace of the referent." + maxLength: 63 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" + type: "string" + type: "object" + required: + - "path" + type: "object" + kubernetes: + description: "Kubernetes authenticates with Vault by passing the ServiceAccount\ntoken stored in the named Secret resource to the Vault server." + properties: + mountPath: + default: "kubernetes" + description: "Path where the Kubernetes authentication backend is mounted in Vault, e.g:\n\"kubernetes\"" + type: "string" + role: + description: "A required field containing the Vault Role to assume. A Role binds a\nKubernetes ServiceAccount with a set of Vault policies." + type: "string" + secretRef: + description: "Optional secret field containing a Kubernetes ServiceAccount JWT used\nfor authenticating with Vault. If a name is specified without a key,\n`token` is the default. If one is not specified, the one bound to\nthe controller will be used." + properties: + key: + description: "A key in the referenced Secret.\nSome instances of this field may be defaulted, in others it may be required." + maxLength: 253 + minLength: 1 + pattern: "^[-._a-zA-Z0-9]+$" + type: "string" + name: + description: "The name of the Secret resource being referred to." + maxLength: 253 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$" + type: "string" + namespace: + description: "The namespace of the Secret resource being referred to.\nIgnored if referent is not cluster-scoped, otherwise defaults to the namespace of the referent." + maxLength: 63 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" + type: "string" + type: "object" + serviceAccountRef: + description: "Optional service account field containing the name of a kubernetes ServiceAccount.\nIf the service account is specified, the service account secret token JWT will be used\nfor authenticating with Vault. If the service account selector is not supplied,\nthe secretRef will be used instead." + properties: + audiences: + description: "Audience specifies the `aud` claim for the service account token\nIf the service account uses a well-known annotation for e.g. IRSA or GCP Workload Identity\nthen this audiences will be appended to the list" + items: + type: "string" + type: "array" + name: + description: "The name of the ServiceAccount resource being referred to." + maxLength: 253 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$" + type: "string" + namespace: + description: "Namespace of the resource being referred to.\nIgnored if referent is not cluster-scoped, otherwise defaults to the namespace of the referent." + maxLength: 63 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" + type: "string" + required: + - "name" + type: "object" + required: + - "mountPath" + - "role" + type: "object" + ldap: + description: "Ldap authenticates with Vault by passing username/password pair using\nthe LDAP authentication method" + properties: + path: + default: "ldap" + description: "Path where the LDAP authentication backend is mounted\nin Vault, e.g: \"ldap\"" + type: "string" + secretRef: + description: "SecretRef to a key in a Secret resource containing password for the LDAP\nuser used to authenticate with Vault using the LDAP authentication\nmethod" + properties: + key: + description: "A key in the referenced Secret.\nSome instances of this field may be defaulted, in others it may be required." + maxLength: 253 + minLength: 1 + pattern: "^[-._a-zA-Z0-9]+$" + type: "string" + name: + description: "The name of the Secret resource being referred to." + maxLength: 253 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$" + type: "string" + namespace: + description: "The namespace of the Secret resource being referred to.\nIgnored if referent is not cluster-scoped, otherwise defaults to the namespace of the referent." + maxLength: 63 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" + type: "string" + type: "object" + username: + description: "Username is an LDAP username used to authenticate using the LDAP Vault\nauthentication method" + type: "string" + required: + - "path" + - "username" + type: "object" + namespace: + description: "Name of the vault namespace to authenticate to. This can be different than the namespace your secret is in.\nNamespaces is a set of features within Vault Enterprise that allows\nVault environments to support Secure Multi-tenancy. e.g: \"ns1\".\nMore about namespaces can be found here https://www.vaultproject.io/docs/enterprise/namespaces\nThis will default to Vault.Namespace field if set, or empty otherwise" + type: "string" + tokenSecretRef: + description: "TokenSecretRef authenticates with Vault by presenting a token." + properties: + key: + description: "A key in the referenced Secret.\nSome instances of this field may be defaulted, in others it may be required." + maxLength: 253 + minLength: 1 + pattern: "^[-._a-zA-Z0-9]+$" + type: "string" + name: + description: "The name of the Secret resource being referred to." + maxLength: 253 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$" + type: "string" + namespace: + description: "The namespace of the Secret resource being referred to.\nIgnored if referent is not cluster-scoped, otherwise defaults to the namespace of the referent." + maxLength: 63 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" + type: "string" + type: "object" + userPass: + description: "UserPass authenticates with Vault by passing username/password pair" + properties: + path: + default: "userpass" + description: "Path where the UserPassword authentication backend is mounted\nin Vault, e.g: \"userpass\"" + type: "string" + secretRef: + description: "SecretRef to a key in a Secret resource containing password for the\nuser used to authenticate with Vault using the UserPass authentication\nmethod" + properties: + key: + description: "A key in the referenced Secret.\nSome instances of this field may be defaulted, in others it may be required." + maxLength: 253 + minLength: 1 + pattern: "^[-._a-zA-Z0-9]+$" + type: "string" + name: + description: "The name of the Secret resource being referred to." + maxLength: 253 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$" + type: "string" + namespace: + description: "The namespace of the Secret resource being referred to.\nIgnored if referent is not cluster-scoped, otherwise defaults to the namespace of the referent." + maxLength: 63 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" + type: "string" + type: "object" + username: + description: "Username is a username used to authenticate using the UserPass Vault\nauthentication method" + type: "string" + required: + - "path" + - "username" + type: "object" + type: "object" + caBundle: + description: "PEM encoded CA bundle used to validate Vault server certificate. Only used\nif the Server URL is using HTTPS protocol. This parameter is ignored for\nplain HTTP protocol connection. If not set the system root certificates\nare used to validate the TLS connection." + format: "byte" + type: "string" + caProvider: + description: "The provider for the CA bundle to use to validate Vault server certificate." + properties: + key: + description: "The key where the CA certificate can be found in the Secret or ConfigMap." + maxLength: 253 + minLength: 1 + pattern: "^[-._a-zA-Z0-9]+$" + type: "string" + name: + description: "The name of the object located at the provider type." + maxLength: 253 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$" + type: "string" + namespace: + description: "The namespace the Provider type is in.\nCan only be defined when used in a ClusterSecretStore." + maxLength: 63 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" + type: "string" + type: + description: "The type of provider to use such as \"Secret\", or \"ConfigMap\"." + enum: + - "Secret" + - "ConfigMap" + type: "string" + required: + - "name" + - "type" + type: "object" + forwardInconsistent: + description: "ForwardInconsistent tells Vault to forward read-after-write requests to the Vault\nleader instead of simply retrying within a loop. This can increase performance if\nthe option is enabled serverside.\nhttps://www.vaultproject.io/docs/configuration/replication#allow_forwarding_via_header" + type: "boolean" + headers: + additionalProperties: + type: "string" + description: "Headers to be added in Vault request" + type: "object" + namespace: + description: "Name of the vault namespace. Namespaces is a set of features within Vault Enterprise that allows\nVault environments to support Secure Multi-tenancy. e.g: \"ns1\".\nMore about namespaces can be found here https://www.vaultproject.io/docs/enterprise/namespaces" + type: "string" + path: + description: "Path is the mount path of the Vault KV backend endpoint, e.g:\n\"secret\". The v2 KV secret engine version specific \"/data\" path suffix\nfor fetching secrets from Vault is optional and will be appended\nif not present in specified path." + type: "string" + readYourWrites: + description: "ReadYourWrites ensures isolated read-after-write semantics by\nproviding discovered cluster replication states in each request.\nMore information about eventual consistency in Vault can be found here\nhttps://www.vaultproject.io/docs/enterprise/consistency" + type: "boolean" + server: + description: "Server is the connection address for the Vault server, e.g: \"https://vault.example.com:8200\"." + type: "string" + tls: + description: "The configuration used for client side related TLS communication, when the Vault server\nrequires mutual authentication. Only used if the Server URL is using HTTPS protocol.\nThis parameter is ignored for plain HTTP protocol connection.\nIt's worth noting this configuration is different from the \"TLS certificates auth method\",\nwhich is available under the `auth.cert` section." + properties: + certSecretRef: + description: "CertSecretRef is a certificate added to the transport layer\nwhen communicating with the Vault server.\nIf no key for the Secret is specified, external-secret will default to 'tls.crt'." + properties: + key: + description: "A key in the referenced Secret.\nSome instances of this field may be defaulted, in others it may be required." + maxLength: 253 + minLength: 1 + pattern: "^[-._a-zA-Z0-9]+$" + type: "string" + name: + description: "The name of the Secret resource being referred to." + maxLength: 253 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$" + type: "string" + namespace: + description: "The namespace of the Secret resource being referred to.\nIgnored if referent is not cluster-scoped, otherwise defaults to the namespace of the referent." + maxLength: 63 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" + type: "string" + type: "object" + keySecretRef: + description: "KeySecretRef to a key in a Secret resource containing client private key\nadded to the transport layer when communicating with the Vault server.\nIf no key for the Secret is specified, external-secret will default to 'tls.key'." + properties: + key: + description: "A key in the referenced Secret.\nSome instances of this field may be defaulted, in others it may be required." + maxLength: 253 + minLength: 1 + pattern: "^[-._a-zA-Z0-9]+$" + type: "string" + name: + description: "The name of the Secret resource being referred to." + maxLength: 253 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$" + type: "string" + namespace: + description: "The namespace of the Secret resource being referred to.\nIgnored if referent is not cluster-scoped, otherwise defaults to the namespace of the referent." + maxLength: 63 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" + type: "string" + type: "object" + type: "object" + version: + default: "v2" + description: "Version is the Vault KV secret engine version. This can be either \"v1\" or\n\"v2\". Version defaults to \"v2\"." + enum: + - "v1" + - "v2" + type: "string" + required: + - "server" + type: "object" + resultType: + default: "Data" + description: "Result type defines which data is returned from the generator.\nBy default it is the \"data\" section of the Vault API response.\nWhen using e.g. /auth/token/create the \"data\" section is empty but\nthe \"auth\" section contains the generated token.\nPlease refer to the vault docs regarding the result data structure.\nAdditionally, accessing the raw response is possibly by using \"Raw\" result type." + enum: + - "Data" + - "Auth" + - "Raw" + type: "string" + retrySettings: + description: "Used to configure http retries if failed" + properties: + maxRetries: + format: "int32" + type: "integer" + retryInterval: + type: "string" + type: "object" + required: + - "path" + - "provider" + type: "object" + type: "object" + served: true + storage: true + subresources: + status: {} diff --git a/crd-catalog/external-secrets/external-secrets/generators.external-secrets.io/v1alpha1/webhooks.yaml b/crd-catalog/external-secrets/external-secrets/generators.external-secrets.io/v1alpha1/webhooks.yaml new file mode 100644 index 000000000..e0a7294a1 --- /dev/null +++ b/crd-catalog/external-secrets/external-secrets/generators.external-secrets.io/v1alpha1/webhooks.yaml @@ -0,0 +1,132 @@ +apiVersion: "apiextensions.k8s.io/v1" +kind: "CustomResourceDefinition" +metadata: + annotations: + controller-gen.kubebuilder.io/version: "v0.17.3" + labels: + external-secrets.io/component: "controller" + name: "webhooks.generators.external-secrets.io" +spec: + group: "generators.external-secrets.io" + names: + categories: + - "external-secrets" + - "external-secrets-generators" + kind: "Webhook" + listKind: "WebhookList" + plural: "webhooks" + singular: "webhook" + scope: "Namespaced" + versions: + - name: "v1alpha1" + schema: + openAPIV3Schema: + description: "Webhook connects to a third party API server to handle the secrets generation\nconfiguration parameters in spec.\nYou can specify the server, the token, and additional body parameters.\nSee documentation for the full API specification for requests and responses." + properties: + apiVersion: + description: "APIVersion defines the versioned schema of this representation of an object.\nServers should convert recognized schemas to the latest internal value, and\nmay reject unrecognized values.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources" + type: "string" + kind: + description: "Kind is a string value representing the REST resource this object represents.\nServers may infer this from the endpoint the client submits requests to.\nCannot be updated.\nIn CamelCase.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds" + type: "string" + metadata: + type: "object" + spec: + description: "WebhookSpec controls the behavior of the external generator. Any body parameters should be passed to the server through the parameters field." + properties: + body: + description: "Body" + type: "string" + caBundle: + description: "PEM encoded CA bundle used to validate webhook server certificate. Only used\nif the Server URL is using HTTPS protocol. This parameter is ignored for\nplain HTTP protocol connection. If not set the system root certificates\nare used to validate the TLS connection." + format: "byte" + type: "string" + caProvider: + description: "The provider for the CA bundle to use to validate webhook server certificate." + properties: + key: + description: "The key where the CA certificate can be found in the Secret or ConfigMap." + maxLength: 253 + minLength: 1 + pattern: "^[-._a-zA-Z0-9]+$" + type: "string" + name: + description: "The name of the object located at the provider type." + maxLength: 253 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$" + type: "string" + namespace: + description: "The namespace the Provider type is in." + maxLength: 63 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" + type: "string" + type: + description: "The type of provider to use such as \"Secret\", or \"ConfigMap\"." + enum: + - "Secret" + - "ConfigMap" + type: "string" + required: + - "name" + - "type" + type: "object" + headers: + additionalProperties: + type: "string" + description: "Headers" + type: "object" + method: + description: "Webhook Method" + type: "string" + result: + description: "Result formatting" + properties: + jsonPath: + description: "Json path of return value" + type: "string" + type: "object" + secrets: + description: "Secrets to fill in templates\nThese secrets will be passed to the templating function as key value pairs under the given name" + items: + properties: + name: + description: "Name of this secret in templates" + type: "string" + secretRef: + description: "Secret ref to fill in credentials" + properties: + key: + description: "The key where the token is found." + maxLength: 253 + minLength: 1 + pattern: "^[-._a-zA-Z0-9]+$" + type: "string" + name: + description: "The name of the Secret resource being referred to." + maxLength: 253 + minLength: 1 + pattern: "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$" + type: "string" + type: "object" + required: + - "name" + - "secretRef" + type: "object" + type: "array" + timeout: + description: "Timeout" + type: "string" + url: + description: "Webhook url to call" + type: "string" + required: + - "result" + - "url" + type: "object" + type: "object" + served: true + storage: true + subresources: + status: {} diff --git a/custom-resources/external_secrets_io/README.md b/custom-resources/external_secrets_io/README.md index df1a8d898..eab334521 100644 --- a/custom-resources/external_secrets_io/README.md +++ b/custom-resources/external_secrets_io/README.md @@ -17,6 +17,7 @@ This crate is part of [kube-custom-resources-rs](https://github.com/metio/kube-c - `ExternalSecret` - `SecretStore` ### external-secrets.io/v1alpha1 +- `ClusterPushSecret` - `ClusterSecretStore` - `ExternalSecret` - `SecretStore` diff --git a/custom-resources/external_secrets_io/src/lib.rs b/custom-resources/external_secrets_io/src/lib.rs index f63540907..d406b7ecf 100644 --- a/custom-resources/external_secrets_io/src/lib.rs +++ b/custom-resources/external_secrets_io/src/lib.rs @@ -9,6 +9,7 @@ This crate contains [kube-rs](https://kube.rs/) compatible bindings for Kubernet - `ExternalSecret` - `SecretStore` ## external-secrets.io/v1alpha1 +- `ClusterPushSecret` - `ClusterSecretStore` - `ExternalSecret` - `SecretStore` diff --git a/custom-resources/external_secrets_io/src/v1/clusterexternalsecrets.rs b/custom-resources/external_secrets_io/src/v1/clusterexternalsecrets.rs index 90b145d58..acd42b675 100644 --- a/custom-resources/external_secrets_io/src/v1/clusterexternalsecrets.rs +++ b/custom-resources/external_secrets_io/src/v1/clusterexternalsecrets.rs @@ -1,6 +1,6 @@ // WARNING: generated by kopium - manual changes will be overwritten // kopium command: kopium --docs --derive=Default --derive=PartialEq --smart-derive-elision --filename crd-catalog/external-secrets/external-secrets/external-secrets.io/v1/clusterexternalsecrets.yaml -// kopium version: 0.21.2 +// kopium version: 0.21.1 #[allow(unused_imports)] mod prelude { diff --git a/custom-resources/external_secrets_io/src/v1/clustersecretstores.rs b/custom-resources/external_secrets_io/src/v1/clustersecretstores.rs index e3e27a6d5..7fe89c9bd 100644 --- a/custom-resources/external_secrets_io/src/v1/clustersecretstores.rs +++ b/custom-resources/external_secrets_io/src/v1/clustersecretstores.rs @@ -1,6 +1,6 @@ // WARNING: generated by kopium - manual changes will be overwritten // kopium command: kopium --docs --derive=Default --derive=PartialEq --smart-derive-elision --filename crd-catalog/external-secrets/external-secrets/external-secrets.io/v1/clustersecretstores.yaml -// kopium version: 0.21.2 +// kopium version: 0.21.1 #[allow(unused_imports)] mod prelude { diff --git a/custom-resources/external_secrets_io/src/v1/externalsecrets.rs b/custom-resources/external_secrets_io/src/v1/externalsecrets.rs index f7e694846..28a69611e 100644 --- a/custom-resources/external_secrets_io/src/v1/externalsecrets.rs +++ b/custom-resources/external_secrets_io/src/v1/externalsecrets.rs @@ -1,6 +1,6 @@ // WARNING: generated by kopium - manual changes will be overwritten // kopium command: kopium --docs --derive=Default --derive=PartialEq --smart-derive-elision --filename crd-catalog/external-secrets/external-secrets/external-secrets.io/v1/externalsecrets.yaml -// kopium version: 0.21.2 +// kopium version: 0.21.1 #[allow(unused_imports)] mod prelude { diff --git a/custom-resources/external_secrets_io/src/v1/secretstores.rs b/custom-resources/external_secrets_io/src/v1/secretstores.rs index 97d44a7b3..77d124d02 100644 --- a/custom-resources/external_secrets_io/src/v1/secretstores.rs +++ b/custom-resources/external_secrets_io/src/v1/secretstores.rs @@ -1,6 +1,6 @@ // WARNING: generated by kopium - manual changes will be overwritten // kopium command: kopium --docs --derive=Default --derive=PartialEq --smart-derive-elision --filename crd-catalog/external-secrets/external-secrets/external-secrets.io/v1/secretstores.yaml -// kopium version: 0.21.2 +// kopium version: 0.21.1 #[allow(unused_imports)] mod prelude { diff --git a/custom-resources/external_secrets_io/src/v1alpha1/clusterpushsecrets.rs b/custom-resources/external_secrets_io/src/v1alpha1/clusterpushsecrets.rs new file mode 100644 index 000000000..407e6d93b --- /dev/null +++ b/custom-resources/external_secrets_io/src/v1alpha1/clusterpushsecrets.rs @@ -0,0 +1,427 @@ +// WARNING: generated by kopium - manual changes will be overwritten +// kopium command: kopium --docs --derive=Default --derive=PartialEq --smart-derive-elision --filename crd-catalog/external-secrets/external-secrets/external-secrets.io/v1alpha1/clusterpushsecrets.yaml +// kopium version: 0.21.1 + +#[allow(unused_imports)] +mod prelude { + pub use kube::CustomResource; + pub use serde::{Serialize, Deserialize}; + pub use std::collections::BTreeMap; + pub use k8s_openapi::apimachinery::pkg::apis::meta::v1::Condition; +} +use self::prelude::*; + +#[derive(CustomResource, Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +#[kube(group = "external-secrets.io", version = "v1alpha1", kind = "ClusterPushSecret", plural = "clusterpushsecrets")] +#[kube(status = "ClusterPushSecretStatus")] +#[kube(schema = "disabled")] +#[kube(derive="Default")] +#[kube(derive="PartialEq")] +pub struct ClusterPushSecretSpec { + /// A list of labels to select by to find the Namespaces to create the ExternalSecrets in. The selectors are ORed. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "namespaceSelectors")] + pub namespace_selectors: Option>, + /// The metadata of the external secrets to be created + #[serde(default, skip_serializing_if = "Option::is_none", rename = "pushSecretMetadata")] + pub push_secret_metadata: Option, + /// The name of the push secrets to be created. + /// Defaults to the name of the ClusterPushSecret + #[serde(default, skip_serializing_if = "Option::is_none", rename = "pushSecretName")] + pub push_secret_name: Option, + /// PushSecretSpec defines what to do with the secrets. + #[serde(rename = "pushSecretSpec")] + pub push_secret_spec: ClusterPushSecretPushSecretSpec, + /// The time in which the controller should reconcile its objects and recheck namespaces for labels. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "refreshTime")] + pub refresh_time: Option, +} + +/// A label selector is a label query over a set of resources. The result of matchLabels and +/// matchExpressions are ANDed. An empty label selector matches all objects. A null +/// label selector matches no objects. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct ClusterPushSecretNamespaceSelectors { + /// matchExpressions is a list of label selector requirements. The requirements are ANDed. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "matchExpressions")] + pub match_expressions: Option>, + /// matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels + /// map is equivalent to an element of matchExpressions, whose key field is "key", the + /// operator is "In", and the values array contains only "value". The requirements are ANDed. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "matchLabels")] + pub match_labels: Option>, +} + +/// A label selector requirement is a selector that contains values, a key, and an operator that +/// relates the key and values. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct ClusterPushSecretNamespaceSelectorsMatchExpressions { + /// key is the label key that the selector applies to. + pub key: String, + /// operator represents a key's relationship to a set of values. + /// Valid operators are In, NotIn, Exists and DoesNotExist. + pub operator: String, + /// values is an array of string values. If the operator is In or NotIn, + /// the values array must be non-empty. If the operator is Exists or DoesNotExist, + /// the values array must be empty. This array is replaced during a strategic + /// merge patch. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub values: Option>, +} + +/// The metadata of the external secrets to be created +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct ClusterPushSecretPushSecretMetadata { + #[serde(default, skip_serializing_if = "Option::is_none")] + pub annotations: Option>, + #[serde(default, skip_serializing_if = "Option::is_none")] + pub labels: Option>, +} + +/// PushSecretSpec defines what to do with the secrets. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct ClusterPushSecretPushSecretSpec { + /// Secret Data that should be pushed to providers + #[serde(default, skip_serializing_if = "Option::is_none")] + pub data: Option>, + /// Deletion Policy to handle Secrets in the provider. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "deletionPolicy")] + pub deletion_policy: Option, + /// The Interval to which External Secrets will try to push a secret definition + #[serde(default, skip_serializing_if = "Option::is_none", rename = "refreshInterval")] + pub refresh_interval: Option, + #[serde(rename = "secretStoreRefs")] + pub secret_store_refs: Vec, + /// The Secret Selector (k8s source) for the Push Secret + pub selector: ClusterPushSecretPushSecretSpecSelector, + /// Template defines a blueprint for the created Secret resource. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub template: Option, + /// UpdatePolicy to handle Secrets in the provider. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "updatePolicy")] + pub update_policy: Option, +} + +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct ClusterPushSecretPushSecretSpecData { + /// Used to define a conversion Strategy for the secret keys + #[serde(default, skip_serializing_if = "Option::is_none", rename = "conversionStrategy")] + pub conversion_strategy: Option, + /// Match a given Secret Key to be pushed to the provider. + #[serde(rename = "match")] + pub r#match: ClusterPushSecretPushSecretSpecDataMatch, + /// Metadata is metadata attached to the secret. + /// The structure of metadata is provider specific, please look it up in the provider documentation. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub metadata: Option, +} + +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)] +pub enum ClusterPushSecretPushSecretSpecDataConversionStrategy { + None, + ReverseUnicode, +} + +/// Match a given Secret Key to be pushed to the provider. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct ClusterPushSecretPushSecretSpecDataMatch { + /// Remote Refs to push to providers. + #[serde(rename = "remoteRef")] + pub remote_ref: ClusterPushSecretPushSecretSpecDataMatchRemoteRef, + /// Secret Key to be pushed + #[serde(default, skip_serializing_if = "Option::is_none", rename = "secretKey")] + pub secret_key: Option, +} + +/// Remote Refs to push to providers. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct ClusterPushSecretPushSecretSpecDataMatchRemoteRef { + /// Name of the property in the resulting secret + #[serde(default, skip_serializing_if = "Option::is_none")] + pub property: Option, + /// Name of the resulting provider secret. + #[serde(rename = "remoteKey")] + pub remote_key: String, +} + +/// PushSecretSpec defines what to do with the secrets. +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)] +pub enum ClusterPushSecretPushSecretSpecDeletionPolicy { + Delete, + None, +} + +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct ClusterPushSecretPushSecretSpecSecretStoreRefs { + /// Kind of the SecretStore resource (SecretStore or ClusterSecretStore) + #[serde(default, skip_serializing_if = "Option::is_none")] + pub kind: Option, + /// Optionally, sync to secret stores with label selector + #[serde(default, skip_serializing_if = "Option::is_none", rename = "labelSelector")] + pub label_selector: Option, + /// Optionally, sync to the SecretStore of the given name + #[serde(default, skip_serializing_if = "Option::is_none")] + pub name: Option, +} + +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)] +pub enum ClusterPushSecretPushSecretSpecSecretStoreRefsKind { + SecretStore, + ClusterSecretStore, +} + +/// Optionally, sync to secret stores with label selector +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct ClusterPushSecretPushSecretSpecSecretStoreRefsLabelSelector { + /// matchExpressions is a list of label selector requirements. The requirements are ANDed. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "matchExpressions")] + pub match_expressions: Option>, + /// matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels + /// map is equivalent to an element of matchExpressions, whose key field is "key", the + /// operator is "In", and the values array contains only "value". The requirements are ANDed. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "matchLabels")] + pub match_labels: Option>, +} + +/// A label selector requirement is a selector that contains values, a key, and an operator that +/// relates the key and values. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct ClusterPushSecretPushSecretSpecSecretStoreRefsLabelSelectorMatchExpressions { + /// key is the label key that the selector applies to. + pub key: String, + /// operator represents a key's relationship to a set of values. + /// Valid operators are In, NotIn, Exists and DoesNotExist. + pub operator: String, + /// values is an array of string values. If the operator is In or NotIn, + /// the values array must be non-empty. If the operator is Exists or DoesNotExist, + /// the values array must be empty. This array is replaced during a strategic + /// merge patch. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub values: Option>, +} + +/// The Secret Selector (k8s source) for the Push Secret +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct ClusterPushSecretPushSecretSpecSelector { + /// Point to a generator to create a Secret. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "generatorRef")] + pub generator_ref: Option, + /// Select a Secret to Push. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub secret: Option, +} + +/// Point to a generator to create a Secret. +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)] +pub struct ClusterPushSecretPushSecretSpecSelectorGeneratorRef { + /// Specify the apiVersion of the generator resource + #[serde(default, skip_serializing_if = "Option::is_none", rename = "apiVersion")] + pub api_version: Option, + /// Specify the Kind of the generator resource + pub kind: ClusterPushSecretPushSecretSpecSelectorGeneratorRefKind, + /// Specify the name of the generator resource + pub name: String, +} + +/// Point to a generator to create a Secret. +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)] +pub enum ClusterPushSecretPushSecretSpecSelectorGeneratorRefKind { + #[serde(rename = "ACRAccessToken")] + AcrAccessToken, + ClusterGenerator, + #[serde(rename = "ECRAuthorizationToken")] + EcrAuthorizationToken, + Fake, + #[serde(rename = "GCRAccessToken")] + GcrAccessToken, + GithubAccessToken, + QuayAccessToken, + Password, + #[serde(rename = "STSSessionToken")] + StsSessionToken, + #[serde(rename = "UUID")] + Uuid, + VaultDynamicSecret, + Webhook, + Grafana, +} + +/// Select a Secret to Push. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct ClusterPushSecretPushSecretSpecSelectorSecret { + /// Name of the Secret. + /// The Secret must exist in the same namespace as the PushSecret manifest. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub name: Option, + /// Selector chooses secrets using a labelSelector. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub selector: Option, +} + +/// Selector chooses secrets using a labelSelector. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct ClusterPushSecretPushSecretSpecSelectorSecretSelector { + /// matchExpressions is a list of label selector requirements. The requirements are ANDed. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "matchExpressions")] + pub match_expressions: Option>, + /// matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels + /// map is equivalent to an element of matchExpressions, whose key field is "key", the + /// operator is "In", and the values array contains only "value". The requirements are ANDed. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "matchLabels")] + pub match_labels: Option>, +} + +/// A label selector requirement is a selector that contains values, a key, and an operator that +/// relates the key and values. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct ClusterPushSecretPushSecretSpecSelectorSecretSelectorMatchExpressions { + /// key is the label key that the selector applies to. + pub key: String, + /// operator represents a key's relationship to a set of values. + /// Valid operators are In, NotIn, Exists and DoesNotExist. + pub operator: String, + /// values is an array of string values. If the operator is In or NotIn, + /// the values array must be non-empty. If the operator is Exists or DoesNotExist, + /// the values array must be empty. This array is replaced during a strategic + /// merge patch. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub values: Option>, +} + +/// Template defines a blueprint for the created Secret resource. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct ClusterPushSecretPushSecretSpecTemplate { + #[serde(default, skip_serializing_if = "Option::is_none")] + pub data: Option>, + /// EngineVersion specifies the template engine version + /// that should be used to compile/execute the + /// template specified in .data and .templateFrom[]. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "engineVersion")] + pub engine_version: Option, + #[serde(default, skip_serializing_if = "Option::is_none", rename = "mergePolicy")] + pub merge_policy: Option, + /// ExternalSecretTemplateMetadata defines metadata fields for the Secret blueprint. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub metadata: Option, + #[serde(default, skip_serializing_if = "Option::is_none", rename = "templateFrom")] + pub template_from: Option>, + #[serde(default, skip_serializing_if = "Option::is_none", rename = "type")] + pub r#type: Option, +} + +/// Template defines a blueprint for the created Secret resource. +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)] +pub enum ClusterPushSecretPushSecretSpecTemplateEngineVersion { + #[serde(rename = "v2")] + V2, +} + +/// Template defines a blueprint for the created Secret resource. +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)] +pub enum ClusterPushSecretPushSecretSpecTemplateMergePolicy { + Replace, + Merge, +} + +/// ExternalSecretTemplateMetadata defines metadata fields for the Secret blueprint. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct ClusterPushSecretPushSecretSpecTemplateMetadata { + #[serde(default, skip_serializing_if = "Option::is_none")] + pub annotations: Option>, + #[serde(default, skip_serializing_if = "Option::is_none")] + pub labels: Option>, +} + +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct ClusterPushSecretPushSecretSpecTemplateTemplateFrom { + #[serde(default, skip_serializing_if = "Option::is_none", rename = "configMap")] + pub config_map: Option, + #[serde(default, skip_serializing_if = "Option::is_none")] + pub literal: Option, + #[serde(default, skip_serializing_if = "Option::is_none")] + pub secret: Option, + #[serde(default, skip_serializing_if = "Option::is_none")] + pub target: Option, +} + +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct ClusterPushSecretPushSecretSpecTemplateTemplateFromConfigMap { + /// A list of keys in the ConfigMap/Secret to use as templates for Secret data + pub items: Vec, + /// The name of the ConfigMap/Secret resource + pub name: String, +} + +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct ClusterPushSecretPushSecretSpecTemplateTemplateFromConfigMapItems { + /// A key in the ConfigMap/Secret + pub key: String, + #[serde(default, skip_serializing_if = "Option::is_none", rename = "templateAs")] + pub template_as: Option, +} + +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)] +pub enum ClusterPushSecretPushSecretSpecTemplateTemplateFromConfigMapItemsTemplateAs { + Values, + KeysAndValues, +} + +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct ClusterPushSecretPushSecretSpecTemplateTemplateFromSecret { + /// A list of keys in the ConfigMap/Secret to use as templates for Secret data + pub items: Vec, + /// The name of the ConfigMap/Secret resource + pub name: String, +} + +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct ClusterPushSecretPushSecretSpecTemplateTemplateFromSecretItems { + /// A key in the ConfigMap/Secret + pub key: String, + #[serde(default, skip_serializing_if = "Option::is_none", rename = "templateAs")] + pub template_as: Option, +} + +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)] +pub enum ClusterPushSecretPushSecretSpecTemplateTemplateFromSecretItemsTemplateAs { + Values, + KeysAndValues, +} + +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)] +pub enum ClusterPushSecretPushSecretSpecTemplateTemplateFromTarget { + Data, + Annotations, + Labels, +} + +/// PushSecretSpec defines what to do with the secrets. +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)] +pub enum ClusterPushSecretPushSecretSpecUpdatePolicy { + Replace, + IfNotExists, +} + +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct ClusterPushSecretStatus { + #[serde(default, skip_serializing_if = "Option::is_none")] + pub conditions: Option>, + /// Failed namespaces are the namespaces that failed to apply an PushSecret + #[serde(default, skip_serializing_if = "Option::is_none", rename = "failedNamespaces")] + pub failed_namespaces: Option>, + /// ProvisionedNamespaces are the namespaces where the ClusterPushSecret has secrets + #[serde(default, skip_serializing_if = "Option::is_none", rename = "provisionedNamespaces")] + pub provisioned_namespaces: Option>, + #[serde(default, skip_serializing_if = "Option::is_none", rename = "pushSecretName")] + pub push_secret_name: Option, +} + +/// ClusterPushSecretNamespaceFailure represents a failed namespace deployment and it's reason. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct ClusterPushSecretStatusFailedNamespaces { + /// Namespace is the namespace that failed when trying to apply an PushSecret + pub namespace: String, + /// Reason is why the PushSecret failed to apply to the namespace + #[serde(default, skip_serializing_if = "Option::is_none")] + pub reason: Option, +} + diff --git a/custom-resources/external_secrets_io/src/v1alpha1/clustersecretstores.rs b/custom-resources/external_secrets_io/src/v1alpha1/clustersecretstores.rs index 35f78026f..aa1ac23c1 100644 --- a/custom-resources/external_secrets_io/src/v1alpha1/clustersecretstores.rs +++ b/custom-resources/external_secrets_io/src/v1alpha1/clustersecretstores.rs @@ -1,6 +1,6 @@ // WARNING: generated by kopium - manual changes will be overwritten // kopium command: kopium --docs --derive=Default --derive=PartialEq --smart-derive-elision --filename crd-catalog/external-secrets/external-secrets/external-secrets.io/v1alpha1/clustersecretstores.yaml -// kopium version: 0.21.2 +// kopium version: 0.21.1 #[allow(unused_imports)] mod prelude { diff --git a/custom-resources/external_secrets_io/src/v1alpha1/externalsecrets.rs b/custom-resources/external_secrets_io/src/v1alpha1/externalsecrets.rs index a61112fa4..cc073881b 100644 --- a/custom-resources/external_secrets_io/src/v1alpha1/externalsecrets.rs +++ b/custom-resources/external_secrets_io/src/v1alpha1/externalsecrets.rs @@ -1,6 +1,6 @@ // WARNING: generated by kopium - manual changes will be overwritten // kopium command: kopium --docs --derive=Default --derive=PartialEq --smart-derive-elision --filename crd-catalog/external-secrets/external-secrets/external-secrets.io/v1alpha1/externalsecrets.yaml -// kopium version: 0.21.2 +// kopium version: 0.21.1 #[allow(unused_imports)] mod prelude { diff --git a/custom-resources/external_secrets_io/src/v1alpha1/mod.rs b/custom-resources/external_secrets_io/src/v1alpha1/mod.rs index c1fe6c8d7..e0473ca46 100644 --- a/custom-resources/external_secrets_io/src/v1alpha1/mod.rs +++ b/custom-resources/external_secrets_io/src/v1alpha1/mod.rs @@ -1,3 +1,4 @@ +pub mod clusterpushsecrets; pub mod clustersecretstores; pub mod externalsecrets; pub mod secretstores; diff --git a/custom-resources/external_secrets_io/src/v1alpha1/secretstores.rs b/custom-resources/external_secrets_io/src/v1alpha1/secretstores.rs index bbef525a2..578b0f7fc 100644 --- a/custom-resources/external_secrets_io/src/v1alpha1/secretstores.rs +++ b/custom-resources/external_secrets_io/src/v1alpha1/secretstores.rs @@ -1,6 +1,6 @@ // WARNING: generated by kopium - manual changes will be overwritten // kopium command: kopium --docs --derive=Default --derive=PartialEq --smart-derive-elision --filename crd-catalog/external-secrets/external-secrets/external-secrets.io/v1alpha1/secretstores.yaml -// kopium version: 0.21.2 +// kopium version: 0.21.1 #[allow(unused_imports)] mod prelude { diff --git a/custom-resources/external_secrets_io/src/v1beta1/clusterexternalsecrets.rs b/custom-resources/external_secrets_io/src/v1beta1/clusterexternalsecrets.rs index c3e3db825..0decfeafd 100644 --- a/custom-resources/external_secrets_io/src/v1beta1/clusterexternalsecrets.rs +++ b/custom-resources/external_secrets_io/src/v1beta1/clusterexternalsecrets.rs @@ -1,6 +1,6 @@ // WARNING: generated by kopium - manual changes will be overwritten // kopium command: kopium --docs --derive=Default --derive=PartialEq --smart-derive-elision --filename crd-catalog/external-secrets/external-secrets/external-secrets.io/v1beta1/clusterexternalsecrets.yaml -// kopium version: 0.21.2 +// kopium version: 0.21.1 #[allow(unused_imports)] mod prelude { diff --git a/custom-resources/external_secrets_io/src/v1beta1/clustersecretstores.rs b/custom-resources/external_secrets_io/src/v1beta1/clustersecretstores.rs index 0a8a69f9f..7a8efbf78 100644 --- a/custom-resources/external_secrets_io/src/v1beta1/clustersecretstores.rs +++ b/custom-resources/external_secrets_io/src/v1beta1/clustersecretstores.rs @@ -1,6 +1,6 @@ // WARNING: generated by kopium - manual changes will be overwritten // kopium command: kopium --docs --derive=Default --derive=PartialEq --smart-derive-elision --filename crd-catalog/external-secrets/external-secrets/external-secrets.io/v1beta1/clustersecretstores.yaml -// kopium version: 0.21.2 +// kopium version: 0.21.1 #[allow(unused_imports)] mod prelude { diff --git a/custom-resources/external_secrets_io/src/v1beta1/externalsecrets.rs b/custom-resources/external_secrets_io/src/v1beta1/externalsecrets.rs index d3f7a19cc..265ac8da1 100644 --- a/custom-resources/external_secrets_io/src/v1beta1/externalsecrets.rs +++ b/custom-resources/external_secrets_io/src/v1beta1/externalsecrets.rs @@ -1,6 +1,6 @@ // WARNING: generated by kopium - manual changes will be overwritten // kopium command: kopium --docs --derive=Default --derive=PartialEq --smart-derive-elision --filename crd-catalog/external-secrets/external-secrets/external-secrets.io/v1beta1/externalsecrets.yaml -// kopium version: 0.21.2 +// kopium version: 0.21.1 #[allow(unused_imports)] mod prelude { diff --git a/custom-resources/external_secrets_io/src/v1beta1/secretstores.rs b/custom-resources/external_secrets_io/src/v1beta1/secretstores.rs index e264d3259..6a160d32d 100644 --- a/custom-resources/external_secrets_io/src/v1beta1/secretstores.rs +++ b/custom-resources/external_secrets_io/src/v1beta1/secretstores.rs @@ -1,6 +1,6 @@ // WARNING: generated by kopium - manual changes will be overwritten // kopium command: kopium --docs --derive=Default --derive=PartialEq --smart-derive-elision --filename crd-catalog/external-secrets/external-secrets/external-secrets.io/v1beta1/secretstores.yaml -// kopium version: 0.21.2 +// kopium version: 0.21.1 #[allow(unused_imports)] mod prelude { diff --git a/custom-resources/generators_external_secrets_io/Cargo.toml b/custom-resources/generators_external_secrets_io/Cargo.toml new file mode 100644 index 000000000..08b310b90 --- /dev/null +++ b/custom-resources/generators_external_secrets_io/Cargo.toml @@ -0,0 +1,32 @@ +# SPDX-FileCopyrightText: The kube-custom-resources-rs Authors +# SPDX-License-Identifier: 0BSD + +[package] +name = "kcr_generators_external_secrets_io" +version = "0.0.0" +edition.workspace = true +authors.workspace = true +description.workspace = true +homepage.workspace = true +readme = "README.md" +keywords.workspace = true +categories.workspace = true +license.workspace = true +repository.workspace = true + +[dependencies] +schemars = { workspace = true } +serde = { workspace = true } +serde_json = { workspace = true } +k8s-openapi = { workspace = true } +kube = { workspace = true } + +[dev-dependencies] +k8s-openapi = { workspace = true, features = ["v1_31"] } + +[package.metadata.docs.rs] +features = ["k8s-openapi/v1_31"] + +[features] +default = ["v1alpha1"] +v1alpha1 = [] diff --git a/custom-resources/generators_external_secrets_io/README.md b/custom-resources/generators_external_secrets_io/README.md new file mode 100644 index 000000000..5bfd3efb0 --- /dev/null +++ b/custom-resources/generators_external_secrets_io/README.md @@ -0,0 +1,28 @@ + + +# generators.external-secrets.io + +This crate contains [kube-rs](https://kube.rs/) compatible bindings for Kubernetes [custom resources](https://kubernetes.io/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions/) of the `generators.external-secrets.io` group. Each binding is generated with [kopium](https://github.com/kube-rs/kopium), updated and released weekly. + +This crate is part of [kube-custom-resources-rs](https://github.com/metio/kube-custom-resources-rs). + +## Available Custom Resources + +### generators.external-secrets.io/v1alpha1 +- `ACRAccessToken` +- `ClusterGenerator` +- `ECRAuthorizationToken` +- `Fake` +- `GCRAccessToken` +- `GeneratorState` +- `GithubAccessToken` +- `Grafana` +- `Password` +- `QuayAccessToken` +- `STSSessionToken` +- `UUID` +- `VaultDynamicSecret` +- `Webhook` diff --git a/custom-resources/generators_external_secrets_io/src/lib.rs b/custom-resources/generators_external_secrets_io/src/lib.rs new file mode 100644 index 000000000..506b35ee6 --- /dev/null +++ b/custom-resources/generators_external_secrets_io/src/lib.rs @@ -0,0 +1,23 @@ +/*! +This crate contains [kube-rs](https://kube.rs/) compatible bindings for Kubernetes [custom resources](https://kubernetes.io/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions/) for the `generators.external-secrets.io` group. Each binding is generated with [kopium](https://github.com/kube-rs/kopium), updated and released weekly. + +# Available Custom Resources + +## generators.external-secrets.io/v1alpha1 +- `ACRAccessToken` +- `ClusterGenerator` +- `ECRAuthorizationToken` +- `Fake` +- `GCRAccessToken` +- `GeneratorState` +- `GithubAccessToken` +- `Grafana` +- `Password` +- `QuayAccessToken` +- `STSSessionToken` +- `UUID` +- `VaultDynamicSecret` +- `Webhook` +*/ +#[cfg(feature = "v1alpha1")] +pub mod v1alpha1; diff --git a/custom-resources/generators_external_secrets_io/src/v1alpha1/acraccesstokens.rs b/custom-resources/generators_external_secrets_io/src/v1alpha1/acraccesstokens.rs new file mode 100644 index 000000000..79ba3c414 --- /dev/null +++ b/custom-resources/generators_external_secrets_io/src/v1alpha1/acraccesstokens.rs @@ -0,0 +1,159 @@ +// WARNING: generated by kopium - manual changes will be overwritten +// kopium command: kopium --docs --derive=Default --derive=PartialEq --smart-derive-elision --filename crd-catalog/external-secrets/external-secrets/generators.external-secrets.io/v1alpha1/acraccesstokens.yaml +// kopium version: 0.21.1 + +#[allow(unused_imports)] +mod prelude { + pub use kube::CustomResource; + pub use serde::{Serialize, Deserialize}; +} +use self::prelude::*; + +/// ACRAccessTokenSpec defines how to generate the access token +/// e.g. how to authenticate and which registry to use. +/// see: https://github.com/Azure/acr/blob/main/docs/AAD-OAuth.md#overview +#[derive(CustomResource, Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +#[kube(group = "generators.external-secrets.io", version = "v1alpha1", kind = "ACRAccessToken", plural = "acraccesstokens")] +#[kube(namespaced)] +#[kube(schema = "disabled")] +#[kube(derive="Default")] +#[kube(derive="PartialEq")] +pub struct ACRAccessTokenSpec { + pub auth: ACRAccessTokenAuth, + /// EnvironmentType specifies the Azure cloud environment endpoints to use for + /// connecting and authenticating with Azure. By default it points to the public cloud AAD endpoint. + /// The following endpoints are available, also see here: https://github.com/Azure/go-autorest/blob/main/autorest/azure/environments.go#L152 + /// PublicCloud, USGovernmentCloud, ChinaCloud, GermanCloud + #[serde(default, skip_serializing_if = "Option::is_none", rename = "environmentType")] + pub environment_type: Option, + /// the domain name of the ACR registry + /// e.g. foobarexample.azurecr.io + pub registry: String, + /// Define the scope for the access token, e.g. pull/push access for a repository. + /// if not provided it will return a refresh token that has full scope. + /// Note: you need to pin it down to the repository level, there is no wildcard available. + /// + /// examples: + /// repository:my-repository:pull,push + /// repository:my-repository:pull + /// + /// see docs for details: https://docs.docker.com/registry/spec/auth/scope/ + #[serde(default, skip_serializing_if = "Option::is_none")] + pub scope: Option, + /// TenantID configures the Azure Tenant to send requests to. Required for ServicePrincipal auth type. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "tenantId")] + pub tenant_id: Option, +} + +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct ACRAccessTokenAuth { + /// ManagedIdentity uses Azure Managed Identity to authenticate with Azure. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "managedIdentity")] + pub managed_identity: Option, + /// ServicePrincipal uses Azure Service Principal credentials to authenticate with Azure. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "servicePrincipal")] + pub service_principal: Option, + /// WorkloadIdentity uses Azure Workload Identity to authenticate with Azure. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "workloadIdentity")] + pub workload_identity: Option, +} + +/// ManagedIdentity uses Azure Managed Identity to authenticate with Azure. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct ACRAccessTokenAuthManagedIdentity { + /// If multiple Managed Identity is assigned to the pod, you can select the one to be used + #[serde(default, skip_serializing_if = "Option::is_none", rename = "identityId")] + pub identity_id: Option, +} + +/// ServicePrincipal uses Azure Service Principal credentials to authenticate with Azure. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct ACRAccessTokenAuthServicePrincipal { + /// Configuration used to authenticate with Azure using static + /// credentials stored in a Kind=Secret. + #[serde(rename = "secretRef")] + pub secret_ref: ACRAccessTokenAuthServicePrincipalSecretRef, +} + +/// Configuration used to authenticate with Azure using static +/// credentials stored in a Kind=Secret. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct ACRAccessTokenAuthServicePrincipalSecretRef { + /// The Azure clientId of the service principle used for authentication. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "clientId")] + pub client_id: Option, + /// The Azure ClientSecret of the service principle used for authentication. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "clientSecret")] + pub client_secret: Option, +} + +/// The Azure clientId of the service principle used for authentication. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct ACRAccessTokenAuthServicePrincipalSecretRefClientId { + /// A key in the referenced Secret. + /// Some instances of this field may be defaulted, in others it may be required. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub key: Option, + /// The name of the Secret resource being referred to. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub name: Option, + /// The namespace of the Secret resource being referred to. + /// Ignored if referent is not cluster-scoped, otherwise defaults to the namespace of the referent. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub namespace: Option, +} + +/// The Azure ClientSecret of the service principle used for authentication. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct ACRAccessTokenAuthServicePrincipalSecretRefClientSecret { + /// A key in the referenced Secret. + /// Some instances of this field may be defaulted, in others it may be required. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub key: Option, + /// The name of the Secret resource being referred to. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub name: Option, + /// The namespace of the Secret resource being referred to. + /// Ignored if referent is not cluster-scoped, otherwise defaults to the namespace of the referent. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub namespace: Option, +} + +/// WorkloadIdentity uses Azure Workload Identity to authenticate with Azure. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct ACRAccessTokenAuthWorkloadIdentity { + /// ServiceAccountRef specified the service account + /// that should be used when authenticating with WorkloadIdentity. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "serviceAccountRef")] + pub service_account_ref: Option, +} + +/// ServiceAccountRef specified the service account +/// that should be used when authenticating with WorkloadIdentity. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct ACRAccessTokenAuthWorkloadIdentityServiceAccountRef { + /// Audience specifies the `aud` claim for the service account token + /// If the service account uses a well-known annotation for e.g. IRSA or GCP Workload Identity + /// then this audiences will be appended to the list + #[serde(default, skip_serializing_if = "Option::is_none")] + pub audiences: Option>, + /// The name of the ServiceAccount resource being referred to. + pub name: String, + /// Namespace of the resource being referred to. + /// Ignored if referent is not cluster-scoped, otherwise defaults to the namespace of the referent. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub namespace: Option, +} + +/// ACRAccessTokenSpec defines how to generate the access token +/// e.g. how to authenticate and which registry to use. +/// see: https://github.com/Azure/acr/blob/main/docs/AAD-OAuth.md#overview +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)] +pub enum ACRAccessTokenEnvironmentType { + PublicCloud, + #[serde(rename = "USGovernmentCloud")] + UsGovernmentCloud, + ChinaCloud, + GermanCloud, +} + diff --git a/custom-resources/generators_external_secrets_io/src/v1alpha1/clustergenerators.rs b/custom-resources/generators_external_secrets_io/src/v1alpha1/clustergenerators.rs new file mode 100644 index 000000000..5d20599a0 --- /dev/null +++ b/custom-resources/generators_external_secrets_io/src/v1alpha1/clustergenerators.rs @@ -0,0 +1,1532 @@ +// WARNING: generated by kopium - manual changes will be overwritten +// kopium command: kopium --docs --derive=Default --derive=PartialEq --smart-derive-elision --filename crd-catalog/external-secrets/external-secrets/generators.external-secrets.io/v1alpha1/clustergenerators.yaml +// kopium version: 0.21.1 + +#[allow(unused_imports)] +mod prelude { + pub use kube::CustomResource; + pub use serde::{Serialize, Deserialize}; + pub use std::collections::BTreeMap; +} +use self::prelude::*; + +#[derive(CustomResource, Serialize, Deserialize, Clone, Debug, PartialEq)] +#[kube(group = "generators.external-secrets.io", version = "v1alpha1", kind = "ClusterGenerator", plural = "clustergenerators")] +#[kube(schema = "disabled")] +#[kube(derive="PartialEq")] +pub struct ClusterGeneratorSpec { + /// Generator the spec for this generator, must match the kind. + pub generator: ClusterGeneratorGenerator, + /// Kind the kind of this generator. + pub kind: ClusterGeneratorKind, +} + +/// Generator the spec for this generator, must match the kind. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct ClusterGeneratorGenerator { + /// ACRAccessTokenSpec defines how to generate the access token + /// e.g. how to authenticate and which registry to use. + /// see: https://github.com/Azure/acr/blob/main/docs/AAD-OAuth.md#overview + #[serde(default, skip_serializing_if = "Option::is_none", rename = "acrAccessTokenSpec")] + pub acr_access_token_spec: Option, + #[serde(default, skip_serializing_if = "Option::is_none", rename = "ecrAuthorizationTokenSpec")] + pub ecr_authorization_token_spec: Option, + /// FakeSpec contains the static data. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "fakeSpec")] + pub fake_spec: Option, + #[serde(default, skip_serializing_if = "Option::is_none", rename = "gcrAccessTokenSpec")] + pub gcr_access_token_spec: Option, + #[serde(default, skip_serializing_if = "Option::is_none", rename = "githubAccessTokenSpec")] + pub github_access_token_spec: Option, + /// GrafanaSpec controls the behavior of the grafana generator. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "grafanaSpec")] + pub grafana_spec: Option, + /// PasswordSpec controls the behavior of the password generator. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "passwordSpec")] + pub password_spec: Option, + #[serde(default, skip_serializing_if = "Option::is_none", rename = "quayAccessTokenSpec")] + pub quay_access_token_spec: Option, + #[serde(default, skip_serializing_if = "Option::is_none", rename = "stsSessionTokenSpec")] + pub sts_session_token_spec: Option, + /// UUIDSpec controls the behavior of the uuid generator. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "uuidSpec")] + pub uuid_spec: Option, + #[serde(default, skip_serializing_if = "Option::is_none", rename = "vaultDynamicSecretSpec")] + pub vault_dynamic_secret_spec: Option, + /// WebhookSpec controls the behavior of the external generator. Any body parameters should be passed to the server through the parameters field. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "webhookSpec")] + pub webhook_spec: Option, +} + +/// ACRAccessTokenSpec defines how to generate the access token +/// e.g. how to authenticate and which registry to use. +/// see: https://github.com/Azure/acr/blob/main/docs/AAD-OAuth.md#overview +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct ClusterGeneratorGeneratorAcrAccessTokenSpec { + pub auth: ClusterGeneratorGeneratorAcrAccessTokenSpecAuth, + /// EnvironmentType specifies the Azure cloud environment endpoints to use for + /// connecting and authenticating with Azure. By default it points to the public cloud AAD endpoint. + /// The following endpoints are available, also see here: https://github.com/Azure/go-autorest/blob/main/autorest/azure/environments.go#L152 + /// PublicCloud, USGovernmentCloud, ChinaCloud, GermanCloud + #[serde(default, skip_serializing_if = "Option::is_none", rename = "environmentType")] + pub environment_type: Option, + /// the domain name of the ACR registry + /// e.g. foobarexample.azurecr.io + pub registry: String, + /// Define the scope for the access token, e.g. pull/push access for a repository. + /// if not provided it will return a refresh token that has full scope. + /// Note: you need to pin it down to the repository level, there is no wildcard available. + /// + /// examples: + /// repository:my-repository:pull,push + /// repository:my-repository:pull + /// + /// see docs for details: https://docs.docker.com/registry/spec/auth/scope/ + #[serde(default, skip_serializing_if = "Option::is_none")] + pub scope: Option, + /// TenantID configures the Azure Tenant to send requests to. Required for ServicePrincipal auth type. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "tenantId")] + pub tenant_id: Option, +} + +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct ClusterGeneratorGeneratorAcrAccessTokenSpecAuth { + /// ManagedIdentity uses Azure Managed Identity to authenticate with Azure. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "managedIdentity")] + pub managed_identity: Option, + /// ServicePrincipal uses Azure Service Principal credentials to authenticate with Azure. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "servicePrincipal")] + pub service_principal: Option, + /// WorkloadIdentity uses Azure Workload Identity to authenticate with Azure. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "workloadIdentity")] + pub workload_identity: Option, +} + +/// ManagedIdentity uses Azure Managed Identity to authenticate with Azure. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct ClusterGeneratorGeneratorAcrAccessTokenSpecAuthManagedIdentity { + /// If multiple Managed Identity is assigned to the pod, you can select the one to be used + #[serde(default, skip_serializing_if = "Option::is_none", rename = "identityId")] + pub identity_id: Option, +} + +/// ServicePrincipal uses Azure Service Principal credentials to authenticate with Azure. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct ClusterGeneratorGeneratorAcrAccessTokenSpecAuthServicePrincipal { + /// Configuration used to authenticate with Azure using static + /// credentials stored in a Kind=Secret. + #[serde(rename = "secretRef")] + pub secret_ref: ClusterGeneratorGeneratorAcrAccessTokenSpecAuthServicePrincipalSecretRef, +} + +/// Configuration used to authenticate with Azure using static +/// credentials stored in a Kind=Secret. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct ClusterGeneratorGeneratorAcrAccessTokenSpecAuthServicePrincipalSecretRef { + /// The Azure clientId of the service principle used for authentication. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "clientId")] + pub client_id: Option, + /// The Azure ClientSecret of the service principle used for authentication. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "clientSecret")] + pub client_secret: Option, +} + +/// The Azure clientId of the service principle used for authentication. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct ClusterGeneratorGeneratorAcrAccessTokenSpecAuthServicePrincipalSecretRefClientId { + /// A key in the referenced Secret. + /// Some instances of this field may be defaulted, in others it may be required. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub key: Option, + /// The name of the Secret resource being referred to. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub name: Option, + /// The namespace of the Secret resource being referred to. + /// Ignored if referent is not cluster-scoped, otherwise defaults to the namespace of the referent. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub namespace: Option, +} + +/// The Azure ClientSecret of the service principle used for authentication. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct ClusterGeneratorGeneratorAcrAccessTokenSpecAuthServicePrincipalSecretRefClientSecret { + /// A key in the referenced Secret. + /// Some instances of this field may be defaulted, in others it may be required. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub key: Option, + /// The name of the Secret resource being referred to. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub name: Option, + /// The namespace of the Secret resource being referred to. + /// Ignored if referent is not cluster-scoped, otherwise defaults to the namespace of the referent. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub namespace: Option, +} + +/// WorkloadIdentity uses Azure Workload Identity to authenticate with Azure. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct ClusterGeneratorGeneratorAcrAccessTokenSpecAuthWorkloadIdentity { + /// ServiceAccountRef specified the service account + /// that should be used when authenticating with WorkloadIdentity. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "serviceAccountRef")] + pub service_account_ref: Option, +} + +/// ServiceAccountRef specified the service account +/// that should be used when authenticating with WorkloadIdentity. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct ClusterGeneratorGeneratorAcrAccessTokenSpecAuthWorkloadIdentityServiceAccountRef { + /// Audience specifies the `aud` claim for the service account token + /// If the service account uses a well-known annotation for e.g. IRSA or GCP Workload Identity + /// then this audiences will be appended to the list + #[serde(default, skip_serializing_if = "Option::is_none")] + pub audiences: Option>, + /// The name of the ServiceAccount resource being referred to. + pub name: String, + /// Namespace of the resource being referred to. + /// Ignored if referent is not cluster-scoped, otherwise defaults to the namespace of the referent. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub namespace: Option, +} + +/// ACRAccessTokenSpec defines how to generate the access token +/// e.g. how to authenticate and which registry to use. +/// see: https://github.com/Azure/acr/blob/main/docs/AAD-OAuth.md#overview +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)] +pub enum ClusterGeneratorGeneratorAcrAccessTokenSpecEnvironmentType { + PublicCloud, + #[serde(rename = "USGovernmentCloud")] + UsGovernmentCloud, + ChinaCloud, + GermanCloud, +} + +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct ClusterGeneratorGeneratorEcrAuthorizationTokenSpec { + /// Auth defines how to authenticate with AWS + #[serde(default, skip_serializing_if = "Option::is_none")] + pub auth: Option, + /// Region specifies the region to operate in. + pub region: String, + /// You can assume a role before making calls to the + /// desired AWS service. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub role: Option, + /// Scope specifies the ECR service scope. + /// Valid options are private and public. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub scope: Option, +} + +/// Auth defines how to authenticate with AWS +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct ClusterGeneratorGeneratorEcrAuthorizationTokenSpecAuth { + /// Authenticate against AWS using service account tokens. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub jwt: Option, + /// AWSAuthSecretRef holds secret references for AWS credentials + /// both AccessKeyID and SecretAccessKey must be defined in order to properly authenticate. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "secretRef")] + pub secret_ref: Option, +} + +/// Authenticate against AWS using service account tokens. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct ClusterGeneratorGeneratorEcrAuthorizationTokenSpecAuthJwt { + /// A reference to a ServiceAccount resource. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "serviceAccountRef")] + pub service_account_ref: Option, +} + +/// A reference to a ServiceAccount resource. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct ClusterGeneratorGeneratorEcrAuthorizationTokenSpecAuthJwtServiceAccountRef { + /// Audience specifies the `aud` claim for the service account token + /// If the service account uses a well-known annotation for e.g. IRSA or GCP Workload Identity + /// then this audiences will be appended to the list + #[serde(default, skip_serializing_if = "Option::is_none")] + pub audiences: Option>, + /// The name of the ServiceAccount resource being referred to. + pub name: String, + /// Namespace of the resource being referred to. + /// Ignored if referent is not cluster-scoped, otherwise defaults to the namespace of the referent. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub namespace: Option, +} + +/// AWSAuthSecretRef holds secret references for AWS credentials +/// both AccessKeyID and SecretAccessKey must be defined in order to properly authenticate. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct ClusterGeneratorGeneratorEcrAuthorizationTokenSpecAuthSecretRef { + /// The AccessKeyID is used for authentication + #[serde(default, skip_serializing_if = "Option::is_none", rename = "accessKeyIDSecretRef")] + pub access_key_id_secret_ref: Option, + /// The SecretAccessKey is used for authentication + #[serde(default, skip_serializing_if = "Option::is_none", rename = "secretAccessKeySecretRef")] + pub secret_access_key_secret_ref: Option, + /// The SessionToken used for authentication + /// This must be defined if AccessKeyID and SecretAccessKey are temporary credentials + /// see: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_use-resources.html + #[serde(default, skip_serializing_if = "Option::is_none", rename = "sessionTokenSecretRef")] + pub session_token_secret_ref: Option, +} + +/// The AccessKeyID is used for authentication +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct ClusterGeneratorGeneratorEcrAuthorizationTokenSpecAuthSecretRefAccessKeyIdSecretRef { + /// A key in the referenced Secret. + /// Some instances of this field may be defaulted, in others it may be required. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub key: Option, + /// The name of the Secret resource being referred to. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub name: Option, + /// The namespace of the Secret resource being referred to. + /// Ignored if referent is not cluster-scoped, otherwise defaults to the namespace of the referent. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub namespace: Option, +} + +/// The SecretAccessKey is used for authentication +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct ClusterGeneratorGeneratorEcrAuthorizationTokenSpecAuthSecretRefSecretAccessKeySecretRef { + /// A key in the referenced Secret. + /// Some instances of this field may be defaulted, in others it may be required. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub key: Option, + /// The name of the Secret resource being referred to. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub name: Option, + /// The namespace of the Secret resource being referred to. + /// Ignored if referent is not cluster-scoped, otherwise defaults to the namespace of the referent. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub namespace: Option, +} + +/// The SessionToken used for authentication +/// This must be defined if AccessKeyID and SecretAccessKey are temporary credentials +/// see: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_use-resources.html +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct ClusterGeneratorGeneratorEcrAuthorizationTokenSpecAuthSecretRefSessionTokenSecretRef { + /// A key in the referenced Secret. + /// Some instances of this field may be defaulted, in others it may be required. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub key: Option, + /// The name of the Secret resource being referred to. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub name: Option, + /// The namespace of the Secret resource being referred to. + /// Ignored if referent is not cluster-scoped, otherwise defaults to the namespace of the referent. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub namespace: Option, +} + +/// FakeSpec contains the static data. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct ClusterGeneratorGeneratorFakeSpec { + /// Used to select the correct ESO controller (think: ingress.ingressClassName) + /// The ESO controller is instantiated with a specific controller name and filters VDS based on this property + #[serde(default, skip_serializing_if = "Option::is_none")] + pub controller: Option, + /// Data defines the static data returned + /// by this generator. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub data: Option>, +} + +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct ClusterGeneratorGeneratorGcrAccessTokenSpec { + /// Auth defines the means for authenticating with GCP + pub auth: ClusterGeneratorGeneratorGcrAccessTokenSpecAuth, + /// ProjectID defines which project to use to authenticate with + #[serde(rename = "projectID")] + pub project_id: String, +} + +/// Auth defines the means for authenticating with GCP +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct ClusterGeneratorGeneratorGcrAccessTokenSpecAuth { + #[serde(default, skip_serializing_if = "Option::is_none", rename = "secretRef")] + pub secret_ref: Option, + #[serde(default, skip_serializing_if = "Option::is_none", rename = "workloadIdentity")] + pub workload_identity: Option, +} + +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct ClusterGeneratorGeneratorGcrAccessTokenSpecAuthSecretRef { + /// The SecretAccessKey is used for authentication + #[serde(default, skip_serializing_if = "Option::is_none", rename = "secretAccessKeySecretRef")] + pub secret_access_key_secret_ref: Option, +} + +/// The SecretAccessKey is used for authentication +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct ClusterGeneratorGeneratorGcrAccessTokenSpecAuthSecretRefSecretAccessKeySecretRef { + /// A key in the referenced Secret. + /// Some instances of this field may be defaulted, in others it may be required. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub key: Option, + /// The name of the Secret resource being referred to. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub name: Option, + /// The namespace of the Secret resource being referred to. + /// Ignored if referent is not cluster-scoped, otherwise defaults to the namespace of the referent. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub namespace: Option, +} + +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct ClusterGeneratorGeneratorGcrAccessTokenSpecAuthWorkloadIdentity { + #[serde(rename = "clusterLocation")] + pub cluster_location: String, + #[serde(rename = "clusterName")] + pub cluster_name: String, + #[serde(default, skip_serializing_if = "Option::is_none", rename = "clusterProjectID")] + pub cluster_project_id: Option, + /// A reference to a ServiceAccount resource. + #[serde(rename = "serviceAccountRef")] + pub service_account_ref: ClusterGeneratorGeneratorGcrAccessTokenSpecAuthWorkloadIdentityServiceAccountRef, +} + +/// A reference to a ServiceAccount resource. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct ClusterGeneratorGeneratorGcrAccessTokenSpecAuthWorkloadIdentityServiceAccountRef { + /// Audience specifies the `aud` claim for the service account token + /// If the service account uses a well-known annotation for e.g. IRSA or GCP Workload Identity + /// then this audiences will be appended to the list + #[serde(default, skip_serializing_if = "Option::is_none")] + pub audiences: Option>, + /// The name of the ServiceAccount resource being referred to. + pub name: String, + /// Namespace of the resource being referred to. + /// Ignored if referent is not cluster-scoped, otherwise defaults to the namespace of the referent. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub namespace: Option, +} + +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct ClusterGeneratorGeneratorGithubAccessTokenSpec { + #[serde(rename = "appID")] + pub app_id: String, + /// Auth configures how ESO authenticates with a Github instance. + pub auth: ClusterGeneratorGeneratorGithubAccessTokenSpecAuth, + #[serde(rename = "installID")] + pub install_id: String, + /// Map of permissions the token will have. If omitted, defaults to all permissions the GitHub App has. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub permissions: Option>, + /// List of repositories the token will have access to. If omitted, defaults to all repositories the GitHub App + /// is installed to. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub repositories: Option>, + /// URL configures the Github instance URL. Defaults to https://github.com/. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub url: Option, +} + +/// Auth configures how ESO authenticates with a Github instance. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct ClusterGeneratorGeneratorGithubAccessTokenSpecAuth { + #[serde(rename = "privateKey")] + pub private_key: ClusterGeneratorGeneratorGithubAccessTokenSpecAuthPrivateKey, +} + +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct ClusterGeneratorGeneratorGithubAccessTokenSpecAuthPrivateKey { + /// A reference to a specific 'key' within a Secret resource. + /// In some instances, `key` is a required field. + #[serde(rename = "secretRef")] + pub secret_ref: ClusterGeneratorGeneratorGithubAccessTokenSpecAuthPrivateKeySecretRef, +} + +/// A reference to a specific 'key' within a Secret resource. +/// In some instances, `key` is a required field. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct ClusterGeneratorGeneratorGithubAccessTokenSpecAuthPrivateKeySecretRef { + /// A key in the referenced Secret. + /// Some instances of this field may be defaulted, in others it may be required. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub key: Option, + /// The name of the Secret resource being referred to. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub name: Option, + /// The namespace of the Secret resource being referred to. + /// Ignored if referent is not cluster-scoped, otherwise defaults to the namespace of the referent. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub namespace: Option, +} + +/// GrafanaSpec controls the behavior of the grafana generator. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct ClusterGeneratorGeneratorGrafanaSpec { + /// Auth is the authentication configuration to authenticate + /// against the Grafana instance. + pub auth: ClusterGeneratorGeneratorGrafanaSpecAuth, + /// ServiceAccount is the configuration for the service account that + /// is supposed to be generated by the generator. + #[serde(rename = "serviceAccount")] + pub service_account: ClusterGeneratorGeneratorGrafanaSpecServiceAccount, + /// URL is the URL of the Grafana instance. + pub url: String, +} + +/// Auth is the authentication configuration to authenticate +/// against the Grafana instance. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct ClusterGeneratorGeneratorGrafanaSpecAuth { + /// Basic auth credentials used to authenticate against the Grafana instance. + /// Note: you need a token which has elevated permissions to create service accounts. + /// See here for the documentation on basic roles offered by Grafana: + /// https://grafana.com/docs/grafana/latest/administration/roles-and-permissions/access-control/rbac-fixed-basic-role-definitions/ + #[serde(default, skip_serializing_if = "Option::is_none")] + pub basic: Option, + /// A service account token used to authenticate against the Grafana instance. + /// Note: you need a token which has elevated permissions to create service accounts. + /// See here for the documentation on basic roles offered by Grafana: + /// https://grafana.com/docs/grafana/latest/administration/roles-and-permissions/access-control/rbac-fixed-basic-role-definitions/ + #[serde(default, skip_serializing_if = "Option::is_none")] + pub token: Option, +} + +/// Basic auth credentials used to authenticate against the Grafana instance. +/// Note: you need a token which has elevated permissions to create service accounts. +/// See here for the documentation on basic roles offered by Grafana: +/// https://grafana.com/docs/grafana/latest/administration/roles-and-permissions/access-control/rbac-fixed-basic-role-definitions/ +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct ClusterGeneratorGeneratorGrafanaSpecAuthBasic { + /// A basic auth password used to authenticate against the Grafana instance. + pub password: ClusterGeneratorGeneratorGrafanaSpecAuthBasicPassword, + /// A basic auth username used to authenticate against the Grafana instance. + pub username: String, +} + +/// A basic auth password used to authenticate against the Grafana instance. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct ClusterGeneratorGeneratorGrafanaSpecAuthBasicPassword { + /// The key where the token is found. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub key: Option, + /// The name of the Secret resource being referred to. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub name: Option, +} + +/// A service account token used to authenticate against the Grafana instance. +/// Note: you need a token which has elevated permissions to create service accounts. +/// See here for the documentation on basic roles offered by Grafana: +/// https://grafana.com/docs/grafana/latest/administration/roles-and-permissions/access-control/rbac-fixed-basic-role-definitions/ +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct ClusterGeneratorGeneratorGrafanaSpecAuthToken { + /// The key where the token is found. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub key: Option, + /// The name of the Secret resource being referred to. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub name: Option, +} + +/// ServiceAccount is the configuration for the service account that +/// is supposed to be generated by the generator. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct ClusterGeneratorGeneratorGrafanaSpecServiceAccount { + /// Name is the name of the service account that will be created by ESO. + pub name: String, + /// Role is the role of the service account. + /// See here for the documentation on basic roles offered by Grafana: + /// https://grafana.com/docs/grafana/latest/administration/roles-and-permissions/access-control/rbac-fixed-basic-role-definitions/ + pub role: String, +} + +/// PasswordSpec controls the behavior of the password generator. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct ClusterGeneratorGeneratorPasswordSpec { + /// set AllowRepeat to true to allow repeating characters. + #[serde(rename = "allowRepeat")] + pub allow_repeat: bool, + /// Digits specifies the number of digits in the generated + /// password. If omitted it defaults to 25% of the length of the password + #[serde(default, skip_serializing_if = "Option::is_none")] + pub digits: Option, + /// Length of the password to be generated. + /// Defaults to 24 + pub length: i64, + /// Set NoUpper to disable uppercase characters + #[serde(rename = "noUpper")] + pub no_upper: bool, + /// SymbolCharacters specifies the special characters that should be used + /// in the generated password. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "symbolCharacters")] + pub symbol_characters: Option, + /// Symbols specifies the number of symbol characters in the generated + /// password. If omitted it defaults to 25% of the length of the password + #[serde(default, skip_serializing_if = "Option::is_none")] + pub symbols: Option, +} + +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct ClusterGeneratorGeneratorQuayAccessTokenSpec { + /// Name of the robot account you are federating with + #[serde(rename = "robotAccount")] + pub robot_account: String, + /// Name of the service account you are federating with + #[serde(rename = "serviceAccountRef")] + pub service_account_ref: ClusterGeneratorGeneratorQuayAccessTokenSpecServiceAccountRef, + /// URL configures the Quay instance URL. Defaults to quay.io. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub url: Option, +} + +/// Name of the service account you are federating with +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct ClusterGeneratorGeneratorQuayAccessTokenSpecServiceAccountRef { + /// Audience specifies the `aud` claim for the service account token + /// If the service account uses a well-known annotation for e.g. IRSA or GCP Workload Identity + /// then this audiences will be appended to the list + #[serde(default, skip_serializing_if = "Option::is_none")] + pub audiences: Option>, + /// The name of the ServiceAccount resource being referred to. + pub name: String, + /// Namespace of the resource being referred to. + /// Ignored if referent is not cluster-scoped, otherwise defaults to the namespace of the referent. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub namespace: Option, +} + +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct ClusterGeneratorGeneratorStsSessionTokenSpec { + /// Auth defines how to authenticate with AWS + #[serde(default, skip_serializing_if = "Option::is_none")] + pub auth: Option, + /// Region specifies the region to operate in. + pub region: String, + /// RequestParameters contains parameters that can be passed to the STS service. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "requestParameters")] + pub request_parameters: Option, + /// You can assume a role before making calls to the + /// desired AWS service. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub role: Option, +} + +/// Auth defines how to authenticate with AWS +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct ClusterGeneratorGeneratorStsSessionTokenSpecAuth { + /// Authenticate against AWS using service account tokens. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub jwt: Option, + /// AWSAuthSecretRef holds secret references for AWS credentials + /// both AccessKeyID and SecretAccessKey must be defined in order to properly authenticate. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "secretRef")] + pub secret_ref: Option, +} + +/// Authenticate against AWS using service account tokens. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct ClusterGeneratorGeneratorStsSessionTokenSpecAuthJwt { + /// A reference to a ServiceAccount resource. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "serviceAccountRef")] + pub service_account_ref: Option, +} + +/// A reference to a ServiceAccount resource. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct ClusterGeneratorGeneratorStsSessionTokenSpecAuthJwtServiceAccountRef { + /// Audience specifies the `aud` claim for the service account token + /// If the service account uses a well-known annotation for e.g. IRSA or GCP Workload Identity + /// then this audiences will be appended to the list + #[serde(default, skip_serializing_if = "Option::is_none")] + pub audiences: Option>, + /// The name of the ServiceAccount resource being referred to. + pub name: String, + /// Namespace of the resource being referred to. + /// Ignored if referent is not cluster-scoped, otherwise defaults to the namespace of the referent. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub namespace: Option, +} + +/// AWSAuthSecretRef holds secret references for AWS credentials +/// both AccessKeyID and SecretAccessKey must be defined in order to properly authenticate. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct ClusterGeneratorGeneratorStsSessionTokenSpecAuthSecretRef { + /// The AccessKeyID is used for authentication + #[serde(default, skip_serializing_if = "Option::is_none", rename = "accessKeyIDSecretRef")] + pub access_key_id_secret_ref: Option, + /// The SecretAccessKey is used for authentication + #[serde(default, skip_serializing_if = "Option::is_none", rename = "secretAccessKeySecretRef")] + pub secret_access_key_secret_ref: Option, + /// The SessionToken used for authentication + /// This must be defined if AccessKeyID and SecretAccessKey are temporary credentials + /// see: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_use-resources.html + #[serde(default, skip_serializing_if = "Option::is_none", rename = "sessionTokenSecretRef")] + pub session_token_secret_ref: Option, +} + +/// The AccessKeyID is used for authentication +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct ClusterGeneratorGeneratorStsSessionTokenSpecAuthSecretRefAccessKeyIdSecretRef { + /// A key in the referenced Secret. + /// Some instances of this field may be defaulted, in others it may be required. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub key: Option, + /// The name of the Secret resource being referred to. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub name: Option, + /// The namespace of the Secret resource being referred to. + /// Ignored if referent is not cluster-scoped, otherwise defaults to the namespace of the referent. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub namespace: Option, +} + +/// The SecretAccessKey is used for authentication +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct ClusterGeneratorGeneratorStsSessionTokenSpecAuthSecretRefSecretAccessKeySecretRef { + /// A key in the referenced Secret. + /// Some instances of this field may be defaulted, in others it may be required. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub key: Option, + /// The name of the Secret resource being referred to. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub name: Option, + /// The namespace of the Secret resource being referred to. + /// Ignored if referent is not cluster-scoped, otherwise defaults to the namespace of the referent. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub namespace: Option, +} + +/// The SessionToken used for authentication +/// This must be defined if AccessKeyID and SecretAccessKey are temporary credentials +/// see: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_use-resources.html +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct ClusterGeneratorGeneratorStsSessionTokenSpecAuthSecretRefSessionTokenSecretRef { + /// A key in the referenced Secret. + /// Some instances of this field may be defaulted, in others it may be required. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub key: Option, + /// The name of the Secret resource being referred to. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub name: Option, + /// The namespace of the Secret resource being referred to. + /// Ignored if referent is not cluster-scoped, otherwise defaults to the namespace of the referent. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub namespace: Option, +} + +/// RequestParameters contains parameters that can be passed to the STS service. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct ClusterGeneratorGeneratorStsSessionTokenSpecRequestParameters { + /// SerialNumber is the identification number of the MFA device that is associated with the IAM user who is making + /// the GetSessionToken call. + /// Possible values: hardware device (such as GAHT12345678) or an Amazon Resource Name (ARN) for a virtual device + /// (such as arn:aws:iam::123456789012:mfa/user) + #[serde(default, skip_serializing_if = "Option::is_none", rename = "serialNumber")] + pub serial_number: Option, + /// SessionDuration The duration, in seconds, that the credentials should remain valid. Acceptable durations for + /// IAM user sessions range from 900 seconds (15 minutes) to 129,600 seconds (36 hours), with 43,200 seconds + /// (12 hours) as the default. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "sessionDuration")] + pub session_duration: Option, + /// TokenCode is the value provided by the MFA device, if MFA is required. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "tokenCode")] + pub token_code: Option, +} + +/// UUIDSpec controls the behavior of the uuid generator. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct ClusterGeneratorGeneratorUuidSpec { +} + +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct ClusterGeneratorGeneratorVaultDynamicSecretSpec { + /// Do not fail if no secrets are found. Useful for requests where no data is expected. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "allowEmptyResponse")] + pub allow_empty_response: Option, + /// Used to select the correct ESO controller (think: ingress.ingressClassName) + /// The ESO controller is instantiated with a specific controller name and filters VDS based on this property + #[serde(default, skip_serializing_if = "Option::is_none")] + pub controller: Option, + /// Vault API method to use (GET/POST/other) + #[serde(default, skip_serializing_if = "Option::is_none")] + pub method: Option, + /// Parameters to pass to Vault write (for non-GET methods) + #[serde(default, skip_serializing_if = "Option::is_none")] + pub parameters: Option, + /// Vault path to obtain the dynamic secret from + pub path: String, + /// Vault provider common spec + pub provider: ClusterGeneratorGeneratorVaultDynamicSecretSpecProvider, + /// Result type defines which data is returned from the generator. + /// By default it is the "data" section of the Vault API response. + /// When using e.g. /auth/token/create the "data" section is empty but + /// the "auth" section contains the generated token. + /// Please refer to the vault docs regarding the result data structure. + /// Additionally, accessing the raw response is possibly by using "Raw" result type. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "resultType")] + pub result_type: Option, + /// Used to configure http retries if failed + #[serde(default, skip_serializing_if = "Option::is_none", rename = "retrySettings")] + pub retry_settings: Option, +} + +/// Vault provider common spec +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct ClusterGeneratorGeneratorVaultDynamicSecretSpecProvider { + /// Auth configures how secret-manager authenticates with the Vault server. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub auth: Option, + /// PEM encoded CA bundle used to validate Vault server certificate. Only used + /// if the Server URL is using HTTPS protocol. This parameter is ignored for + /// plain HTTP protocol connection. If not set the system root certificates + /// are used to validate the TLS connection. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "caBundle")] + pub ca_bundle: Option, + /// The provider for the CA bundle to use to validate Vault server certificate. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "caProvider")] + pub ca_provider: Option, + /// ForwardInconsistent tells Vault to forward read-after-write requests to the Vault + /// leader instead of simply retrying within a loop. This can increase performance if + /// the option is enabled serverside. + /// https://www.vaultproject.io/docs/configuration/replication#allow_forwarding_via_header + #[serde(default, skip_serializing_if = "Option::is_none", rename = "forwardInconsistent")] + pub forward_inconsistent: Option, + /// Headers to be added in Vault request + #[serde(default, skip_serializing_if = "Option::is_none")] + pub headers: Option>, + /// Name of the vault namespace. Namespaces is a set of features within Vault Enterprise that allows + /// Vault environments to support Secure Multi-tenancy. e.g: "ns1". + /// More about namespaces can be found here https://www.vaultproject.io/docs/enterprise/namespaces + #[serde(default, skip_serializing_if = "Option::is_none")] + pub namespace: Option, + /// Path is the mount path of the Vault KV backend endpoint, e.g: + /// "secret". The v2 KV secret engine version specific "/data" path suffix + /// for fetching secrets from Vault is optional and will be appended + /// if not present in specified path. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub path: Option, + /// ReadYourWrites ensures isolated read-after-write semantics by + /// providing discovered cluster replication states in each request. + /// More information about eventual consistency in Vault can be found here + /// https://www.vaultproject.io/docs/enterprise/consistency + #[serde(default, skip_serializing_if = "Option::is_none", rename = "readYourWrites")] + pub read_your_writes: Option, + /// Server is the connection address for the Vault server, e.g: "https://vault.example.com:8200". + pub server: String, + /// The configuration used for client side related TLS communication, when the Vault server + /// requires mutual authentication. Only used if the Server URL is using HTTPS protocol. + /// This parameter is ignored for plain HTTP protocol connection. + /// It's worth noting this configuration is different from the "TLS certificates auth method", + /// which is available under the `auth.cert` section. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub tls: Option, + /// Version is the Vault KV secret engine version. This can be either "v1" or + /// "v2". Version defaults to "v2". + #[serde(default, skip_serializing_if = "Option::is_none")] + pub version: Option, +} + +/// Auth configures how secret-manager authenticates with the Vault server. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct ClusterGeneratorGeneratorVaultDynamicSecretSpecProviderAuth { + /// AppRole authenticates with Vault using the App Role auth mechanism, + /// with the role and secret stored in a Kubernetes Secret resource. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "appRole")] + pub app_role: Option, + /// Cert authenticates with TLS Certificates by passing client certificate, private key and ca certificate + /// Cert authentication method + #[serde(default, skip_serializing_if = "Option::is_none")] + pub cert: Option, + /// Iam authenticates with vault by passing a special AWS request signed with AWS IAM credentials + /// AWS IAM authentication method + #[serde(default, skip_serializing_if = "Option::is_none")] + pub iam: Option, + /// Jwt authenticates with Vault by passing role and JWT token using the + /// JWT/OIDC authentication method + #[serde(default, skip_serializing_if = "Option::is_none")] + pub jwt: Option, + /// Kubernetes authenticates with Vault by passing the ServiceAccount + /// token stored in the named Secret resource to the Vault server. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub kubernetes: Option, + /// Ldap authenticates with Vault by passing username/password pair using + /// the LDAP authentication method + #[serde(default, skip_serializing_if = "Option::is_none")] + pub ldap: Option, + /// Name of the vault namespace to authenticate to. This can be different than the namespace your secret is in. + /// Namespaces is a set of features within Vault Enterprise that allows + /// Vault environments to support Secure Multi-tenancy. e.g: "ns1". + /// More about namespaces can be found here https://www.vaultproject.io/docs/enterprise/namespaces + /// This will default to Vault.Namespace field if set, or empty otherwise + #[serde(default, skip_serializing_if = "Option::is_none")] + pub namespace: Option, + /// TokenSecretRef authenticates with Vault by presenting a token. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "tokenSecretRef")] + pub token_secret_ref: Option, + /// UserPass authenticates with Vault by passing username/password pair + #[serde(default, skip_serializing_if = "Option::is_none", rename = "userPass")] + pub user_pass: Option, +} + +/// AppRole authenticates with Vault using the App Role auth mechanism, +/// with the role and secret stored in a Kubernetes Secret resource. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct ClusterGeneratorGeneratorVaultDynamicSecretSpecProviderAuthAppRole { + /// Path where the App Role authentication backend is mounted + /// in Vault, e.g: "approle" + pub path: String, + /// RoleID configured in the App Role authentication backend when setting + /// up the authentication backend in Vault. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "roleId")] + pub role_id: Option, + /// Reference to a key in a Secret that contains the App Role ID used + /// to authenticate with Vault. + /// The `key` field must be specified and denotes which entry within the Secret + /// resource is used as the app role id. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "roleRef")] + pub role_ref: Option, + /// Reference to a key in a Secret that contains the App Role secret used + /// to authenticate with Vault. + /// The `key` field must be specified and denotes which entry within the Secret + /// resource is used as the app role secret. + #[serde(rename = "secretRef")] + pub secret_ref: ClusterGeneratorGeneratorVaultDynamicSecretSpecProviderAuthAppRoleSecretRef, +} + +/// Reference to a key in a Secret that contains the App Role ID used +/// to authenticate with Vault. +/// The `key` field must be specified and denotes which entry within the Secret +/// resource is used as the app role id. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct ClusterGeneratorGeneratorVaultDynamicSecretSpecProviderAuthAppRoleRoleRef { + /// A key in the referenced Secret. + /// Some instances of this field may be defaulted, in others it may be required. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub key: Option, + /// The name of the Secret resource being referred to. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub name: Option, + /// The namespace of the Secret resource being referred to. + /// Ignored if referent is not cluster-scoped, otherwise defaults to the namespace of the referent. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub namespace: Option, +} + +/// Reference to a key in a Secret that contains the App Role secret used +/// to authenticate with Vault. +/// The `key` field must be specified and denotes which entry within the Secret +/// resource is used as the app role secret. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct ClusterGeneratorGeneratorVaultDynamicSecretSpecProviderAuthAppRoleSecretRef { + /// A key in the referenced Secret. + /// Some instances of this field may be defaulted, in others it may be required. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub key: Option, + /// The name of the Secret resource being referred to. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub name: Option, + /// The namespace of the Secret resource being referred to. + /// Ignored if referent is not cluster-scoped, otherwise defaults to the namespace of the referent. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub namespace: Option, +} + +/// Cert authenticates with TLS Certificates by passing client certificate, private key and ca certificate +/// Cert authentication method +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct ClusterGeneratorGeneratorVaultDynamicSecretSpecProviderAuthCert { + /// ClientCert is a certificate to authenticate using the Cert Vault + /// authentication method + #[serde(default, skip_serializing_if = "Option::is_none", rename = "clientCert")] + pub client_cert: Option, + /// SecretRef to a key in a Secret resource containing client private key to + /// authenticate with Vault using the Cert authentication method + #[serde(default, skip_serializing_if = "Option::is_none", rename = "secretRef")] + pub secret_ref: Option, +} + +/// ClientCert is a certificate to authenticate using the Cert Vault +/// authentication method +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct ClusterGeneratorGeneratorVaultDynamicSecretSpecProviderAuthCertClientCert { + /// A key in the referenced Secret. + /// Some instances of this field may be defaulted, in others it may be required. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub key: Option, + /// The name of the Secret resource being referred to. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub name: Option, + /// The namespace of the Secret resource being referred to. + /// Ignored if referent is not cluster-scoped, otherwise defaults to the namespace of the referent. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub namespace: Option, +} + +/// SecretRef to a key in a Secret resource containing client private key to +/// authenticate with Vault using the Cert authentication method +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct ClusterGeneratorGeneratorVaultDynamicSecretSpecProviderAuthCertSecretRef { + /// A key in the referenced Secret. + /// Some instances of this field may be defaulted, in others it may be required. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub key: Option, + /// The name of the Secret resource being referred to. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub name: Option, + /// The namespace of the Secret resource being referred to. + /// Ignored if referent is not cluster-scoped, otherwise defaults to the namespace of the referent. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub namespace: Option, +} + +/// Iam authenticates with vault by passing a special AWS request signed with AWS IAM credentials +/// AWS IAM authentication method +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct ClusterGeneratorGeneratorVaultDynamicSecretSpecProviderAuthIam { + /// AWS External ID set on assumed IAM roles + #[serde(default, skip_serializing_if = "Option::is_none", rename = "externalID")] + pub external_id: Option, + /// Specify a service account with IRSA enabled + #[serde(default, skip_serializing_if = "Option::is_none")] + pub jwt: Option, + /// Path where the AWS auth method is enabled in Vault, e.g: "aws" + #[serde(default, skip_serializing_if = "Option::is_none")] + pub path: Option, + /// AWS region + #[serde(default, skip_serializing_if = "Option::is_none")] + pub region: Option, + /// This is the AWS role to be assumed before talking to vault + #[serde(default, skip_serializing_if = "Option::is_none")] + pub role: Option, + /// Specify credentials in a Secret object + #[serde(default, skip_serializing_if = "Option::is_none", rename = "secretRef")] + pub secret_ref: Option, + /// X-Vault-AWS-IAM-Server-ID is an additional header used by Vault IAM auth method to mitigate against different types of replay attacks. More details here: https://developer.hashicorp.com/vault/docs/auth/aws + #[serde(default, skip_serializing_if = "Option::is_none", rename = "vaultAwsIamServerID")] + pub vault_aws_iam_server_id: Option, + /// Vault Role. In vault, a role describes an identity with a set of permissions, groups, or policies you want to attach a user of the secrets engine + #[serde(rename = "vaultRole")] + pub vault_role: String, +} + +/// Specify a service account with IRSA enabled +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct ClusterGeneratorGeneratorVaultDynamicSecretSpecProviderAuthIamJwt { + /// A reference to a ServiceAccount resource. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "serviceAccountRef")] + pub service_account_ref: Option, +} + +/// A reference to a ServiceAccount resource. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct ClusterGeneratorGeneratorVaultDynamicSecretSpecProviderAuthIamJwtServiceAccountRef { + /// Audience specifies the `aud` claim for the service account token + /// If the service account uses a well-known annotation for e.g. IRSA or GCP Workload Identity + /// then this audiences will be appended to the list + #[serde(default, skip_serializing_if = "Option::is_none")] + pub audiences: Option>, + /// The name of the ServiceAccount resource being referred to. + pub name: String, + /// Namespace of the resource being referred to. + /// Ignored if referent is not cluster-scoped, otherwise defaults to the namespace of the referent. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub namespace: Option, +} + +/// Specify credentials in a Secret object +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct ClusterGeneratorGeneratorVaultDynamicSecretSpecProviderAuthIamSecretRef { + /// The AccessKeyID is used for authentication + #[serde(default, skip_serializing_if = "Option::is_none", rename = "accessKeyIDSecretRef")] + pub access_key_id_secret_ref: Option, + /// The SecretAccessKey is used for authentication + #[serde(default, skip_serializing_if = "Option::is_none", rename = "secretAccessKeySecretRef")] + pub secret_access_key_secret_ref: Option, + /// The SessionToken used for authentication + /// This must be defined if AccessKeyID and SecretAccessKey are temporary credentials + /// see: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_use-resources.html + #[serde(default, skip_serializing_if = "Option::is_none", rename = "sessionTokenSecretRef")] + pub session_token_secret_ref: Option, +} + +/// The AccessKeyID is used for authentication +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct ClusterGeneratorGeneratorVaultDynamicSecretSpecProviderAuthIamSecretRefAccessKeyIdSecretRef { + /// A key in the referenced Secret. + /// Some instances of this field may be defaulted, in others it may be required. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub key: Option, + /// The name of the Secret resource being referred to. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub name: Option, + /// The namespace of the Secret resource being referred to. + /// Ignored if referent is not cluster-scoped, otherwise defaults to the namespace of the referent. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub namespace: Option, +} + +/// The SecretAccessKey is used for authentication +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct ClusterGeneratorGeneratorVaultDynamicSecretSpecProviderAuthIamSecretRefSecretAccessKeySecretRef { + /// A key in the referenced Secret. + /// Some instances of this field may be defaulted, in others it may be required. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub key: Option, + /// The name of the Secret resource being referred to. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub name: Option, + /// The namespace of the Secret resource being referred to. + /// Ignored if referent is not cluster-scoped, otherwise defaults to the namespace of the referent. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub namespace: Option, +} + +/// The SessionToken used for authentication +/// This must be defined if AccessKeyID and SecretAccessKey are temporary credentials +/// see: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_use-resources.html +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct ClusterGeneratorGeneratorVaultDynamicSecretSpecProviderAuthIamSecretRefSessionTokenSecretRef { + /// A key in the referenced Secret. + /// Some instances of this field may be defaulted, in others it may be required. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub key: Option, + /// The name of the Secret resource being referred to. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub name: Option, + /// The namespace of the Secret resource being referred to. + /// Ignored if referent is not cluster-scoped, otherwise defaults to the namespace of the referent. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub namespace: Option, +} + +/// Jwt authenticates with Vault by passing role and JWT token using the +/// JWT/OIDC authentication method +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct ClusterGeneratorGeneratorVaultDynamicSecretSpecProviderAuthJwt { + /// Optional ServiceAccountToken specifies the Kubernetes service account for which to request + /// a token for with the `TokenRequest` API. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "kubernetesServiceAccountToken")] + pub kubernetes_service_account_token: Option, + /// Path where the JWT authentication backend is mounted + /// in Vault, e.g: "jwt" + pub path: String, + /// Role is a JWT role to authenticate using the JWT/OIDC Vault + /// authentication method + #[serde(default, skip_serializing_if = "Option::is_none")] + pub role: Option, + /// Optional SecretRef that refers to a key in a Secret resource containing JWT token to + /// authenticate with Vault using the JWT/OIDC authentication method. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "secretRef")] + pub secret_ref: Option, +} + +/// Optional ServiceAccountToken specifies the Kubernetes service account for which to request +/// a token for with the `TokenRequest` API. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct ClusterGeneratorGeneratorVaultDynamicSecretSpecProviderAuthJwtKubernetesServiceAccountToken { + /// Optional audiences field that will be used to request a temporary Kubernetes service + /// account token for the service account referenced by `serviceAccountRef`. + /// Defaults to a single audience `vault` it not specified. + /// Deprecated: use serviceAccountRef.Audiences instead + #[serde(default, skip_serializing_if = "Option::is_none")] + pub audiences: Option>, + /// Optional expiration time in seconds that will be used to request a temporary + /// Kubernetes service account token for the service account referenced by + /// `serviceAccountRef`. + /// Deprecated: this will be removed in the future. + /// Defaults to 10 minutes. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "expirationSeconds")] + pub expiration_seconds: Option, + /// Service account field containing the name of a kubernetes ServiceAccount. + #[serde(rename = "serviceAccountRef")] + pub service_account_ref: ClusterGeneratorGeneratorVaultDynamicSecretSpecProviderAuthJwtKubernetesServiceAccountTokenServiceAccountRef, +} + +/// Service account field containing the name of a kubernetes ServiceAccount. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct ClusterGeneratorGeneratorVaultDynamicSecretSpecProviderAuthJwtKubernetesServiceAccountTokenServiceAccountRef { + /// Audience specifies the `aud` claim for the service account token + /// If the service account uses a well-known annotation for e.g. IRSA or GCP Workload Identity + /// then this audiences will be appended to the list + #[serde(default, skip_serializing_if = "Option::is_none")] + pub audiences: Option>, + /// The name of the ServiceAccount resource being referred to. + pub name: String, + /// Namespace of the resource being referred to. + /// Ignored if referent is not cluster-scoped, otherwise defaults to the namespace of the referent. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub namespace: Option, +} + +/// Optional SecretRef that refers to a key in a Secret resource containing JWT token to +/// authenticate with Vault using the JWT/OIDC authentication method. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct ClusterGeneratorGeneratorVaultDynamicSecretSpecProviderAuthJwtSecretRef { + /// A key in the referenced Secret. + /// Some instances of this field may be defaulted, in others it may be required. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub key: Option, + /// The name of the Secret resource being referred to. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub name: Option, + /// The namespace of the Secret resource being referred to. + /// Ignored if referent is not cluster-scoped, otherwise defaults to the namespace of the referent. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub namespace: Option, +} + +/// Kubernetes authenticates with Vault by passing the ServiceAccount +/// token stored in the named Secret resource to the Vault server. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct ClusterGeneratorGeneratorVaultDynamicSecretSpecProviderAuthKubernetes { + /// Path where the Kubernetes authentication backend is mounted in Vault, e.g: + /// "kubernetes" + #[serde(rename = "mountPath")] + pub mount_path: String, + /// A required field containing the Vault Role to assume. A Role binds a + /// Kubernetes ServiceAccount with a set of Vault policies. + pub role: String, + /// Optional secret field containing a Kubernetes ServiceAccount JWT used + /// for authenticating with Vault. If a name is specified without a key, + /// `token` is the default. If one is not specified, the one bound to + /// the controller will be used. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "secretRef")] + pub secret_ref: Option, + /// Optional service account field containing the name of a kubernetes ServiceAccount. + /// If the service account is specified, the service account secret token JWT will be used + /// for authenticating with Vault. If the service account selector is not supplied, + /// the secretRef will be used instead. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "serviceAccountRef")] + pub service_account_ref: Option, +} + +/// Optional secret field containing a Kubernetes ServiceAccount JWT used +/// for authenticating with Vault. If a name is specified without a key, +/// `token` is the default. If one is not specified, the one bound to +/// the controller will be used. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct ClusterGeneratorGeneratorVaultDynamicSecretSpecProviderAuthKubernetesSecretRef { + /// A key in the referenced Secret. + /// Some instances of this field may be defaulted, in others it may be required. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub key: Option, + /// The name of the Secret resource being referred to. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub name: Option, + /// The namespace of the Secret resource being referred to. + /// Ignored if referent is not cluster-scoped, otherwise defaults to the namespace of the referent. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub namespace: Option, +} + +/// Optional service account field containing the name of a kubernetes ServiceAccount. +/// If the service account is specified, the service account secret token JWT will be used +/// for authenticating with Vault. If the service account selector is not supplied, +/// the secretRef will be used instead. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct ClusterGeneratorGeneratorVaultDynamicSecretSpecProviderAuthKubernetesServiceAccountRef { + /// Audience specifies the `aud` claim for the service account token + /// If the service account uses a well-known annotation for e.g. IRSA or GCP Workload Identity + /// then this audiences will be appended to the list + #[serde(default, skip_serializing_if = "Option::is_none")] + pub audiences: Option>, + /// The name of the ServiceAccount resource being referred to. + pub name: String, + /// Namespace of the resource being referred to. + /// Ignored if referent is not cluster-scoped, otherwise defaults to the namespace of the referent. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub namespace: Option, +} + +/// Ldap authenticates with Vault by passing username/password pair using +/// the LDAP authentication method +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct ClusterGeneratorGeneratorVaultDynamicSecretSpecProviderAuthLdap { + /// Path where the LDAP authentication backend is mounted + /// in Vault, e.g: "ldap" + pub path: String, + /// SecretRef to a key in a Secret resource containing password for the LDAP + /// user used to authenticate with Vault using the LDAP authentication + /// method + #[serde(default, skip_serializing_if = "Option::is_none", rename = "secretRef")] + pub secret_ref: Option, + /// Username is an LDAP username used to authenticate using the LDAP Vault + /// authentication method + pub username: String, +} + +/// SecretRef to a key in a Secret resource containing password for the LDAP +/// user used to authenticate with Vault using the LDAP authentication +/// method +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct ClusterGeneratorGeneratorVaultDynamicSecretSpecProviderAuthLdapSecretRef { + /// A key in the referenced Secret. + /// Some instances of this field may be defaulted, in others it may be required. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub key: Option, + /// The name of the Secret resource being referred to. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub name: Option, + /// The namespace of the Secret resource being referred to. + /// Ignored if referent is not cluster-scoped, otherwise defaults to the namespace of the referent. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub namespace: Option, +} + +/// TokenSecretRef authenticates with Vault by presenting a token. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct ClusterGeneratorGeneratorVaultDynamicSecretSpecProviderAuthTokenSecretRef { + /// A key in the referenced Secret. + /// Some instances of this field may be defaulted, in others it may be required. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub key: Option, + /// The name of the Secret resource being referred to. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub name: Option, + /// The namespace of the Secret resource being referred to. + /// Ignored if referent is not cluster-scoped, otherwise defaults to the namespace of the referent. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub namespace: Option, +} + +/// UserPass authenticates with Vault by passing username/password pair +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct ClusterGeneratorGeneratorVaultDynamicSecretSpecProviderAuthUserPass { + /// Path where the UserPassword authentication backend is mounted + /// in Vault, e.g: "userpass" + pub path: String, + /// SecretRef to a key in a Secret resource containing password for the + /// user used to authenticate with Vault using the UserPass authentication + /// method + #[serde(default, skip_serializing_if = "Option::is_none", rename = "secretRef")] + pub secret_ref: Option, + /// Username is a username used to authenticate using the UserPass Vault + /// authentication method + pub username: String, +} + +/// SecretRef to a key in a Secret resource containing password for the +/// user used to authenticate with Vault using the UserPass authentication +/// method +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct ClusterGeneratorGeneratorVaultDynamicSecretSpecProviderAuthUserPassSecretRef { + /// A key in the referenced Secret. + /// Some instances of this field may be defaulted, in others it may be required. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub key: Option, + /// The name of the Secret resource being referred to. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub name: Option, + /// The namespace of the Secret resource being referred to. + /// Ignored if referent is not cluster-scoped, otherwise defaults to the namespace of the referent. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub namespace: Option, +} + +/// The provider for the CA bundle to use to validate Vault server certificate. +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)] +pub struct ClusterGeneratorGeneratorVaultDynamicSecretSpecProviderCaProvider { + /// The key where the CA certificate can be found in the Secret or ConfigMap. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub key: Option, + /// The name of the object located at the provider type. + pub name: String, + /// The namespace the Provider type is in. + /// Can only be defined when used in a ClusterSecretStore. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub namespace: Option, + /// The type of provider to use such as "Secret", or "ConfigMap". + #[serde(rename = "type")] + pub r#type: ClusterGeneratorGeneratorVaultDynamicSecretSpecProviderCaProviderType, +} + +/// The provider for the CA bundle to use to validate Vault server certificate. +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)] +pub enum ClusterGeneratorGeneratorVaultDynamicSecretSpecProviderCaProviderType { + Secret, + ConfigMap, +} + +/// The configuration used for client side related TLS communication, when the Vault server +/// requires mutual authentication. Only used if the Server URL is using HTTPS protocol. +/// This parameter is ignored for plain HTTP protocol connection. +/// It's worth noting this configuration is different from the "TLS certificates auth method", +/// which is available under the `auth.cert` section. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct ClusterGeneratorGeneratorVaultDynamicSecretSpecProviderTls { + /// CertSecretRef is a certificate added to the transport layer + /// when communicating with the Vault server. + /// If no key for the Secret is specified, external-secret will default to 'tls.crt'. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "certSecretRef")] + pub cert_secret_ref: Option, + /// KeySecretRef to a key in a Secret resource containing client private key + /// added to the transport layer when communicating with the Vault server. + /// If no key for the Secret is specified, external-secret will default to 'tls.key'. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "keySecretRef")] + pub key_secret_ref: Option, +} + +/// CertSecretRef is a certificate added to the transport layer +/// when communicating with the Vault server. +/// If no key for the Secret is specified, external-secret will default to 'tls.crt'. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct ClusterGeneratorGeneratorVaultDynamicSecretSpecProviderTlsCertSecretRef { + /// A key in the referenced Secret. + /// Some instances of this field may be defaulted, in others it may be required. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub key: Option, + /// The name of the Secret resource being referred to. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub name: Option, + /// The namespace of the Secret resource being referred to. + /// Ignored if referent is not cluster-scoped, otherwise defaults to the namespace of the referent. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub namespace: Option, +} + +/// KeySecretRef to a key in a Secret resource containing client private key +/// added to the transport layer when communicating with the Vault server. +/// If no key for the Secret is specified, external-secret will default to 'tls.key'. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct ClusterGeneratorGeneratorVaultDynamicSecretSpecProviderTlsKeySecretRef { + /// A key in the referenced Secret. + /// Some instances of this field may be defaulted, in others it may be required. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub key: Option, + /// The name of the Secret resource being referred to. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub name: Option, + /// The namespace of the Secret resource being referred to. + /// Ignored if referent is not cluster-scoped, otherwise defaults to the namespace of the referent. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub namespace: Option, +} + +/// Vault provider common spec +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)] +pub enum ClusterGeneratorGeneratorVaultDynamicSecretSpecProviderVersion { + #[serde(rename = "v1")] + V1, + #[serde(rename = "v2")] + V2, +} + +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)] +pub enum ClusterGeneratorGeneratorVaultDynamicSecretSpecResultType { + Data, + Auth, + Raw, +} + +/// Used to configure http retries if failed +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct ClusterGeneratorGeneratorVaultDynamicSecretSpecRetrySettings { + #[serde(default, skip_serializing_if = "Option::is_none", rename = "maxRetries")] + pub max_retries: Option, + #[serde(default, skip_serializing_if = "Option::is_none", rename = "retryInterval")] + pub retry_interval: Option, +} + +/// WebhookSpec controls the behavior of the external generator. Any body parameters should be passed to the server through the parameters field. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct ClusterGeneratorGeneratorWebhookSpec { + /// Body + #[serde(default, skip_serializing_if = "Option::is_none")] + pub body: Option, + /// PEM encoded CA bundle used to validate webhook server certificate. Only used + /// if the Server URL is using HTTPS protocol. This parameter is ignored for + /// plain HTTP protocol connection. If not set the system root certificates + /// are used to validate the TLS connection. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "caBundle")] + pub ca_bundle: Option, + /// The provider for the CA bundle to use to validate webhook server certificate. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "caProvider")] + pub ca_provider: Option, + /// Headers + #[serde(default, skip_serializing_if = "Option::is_none")] + pub headers: Option>, + /// Webhook Method + #[serde(default, skip_serializing_if = "Option::is_none")] + pub method: Option, + /// Result formatting + pub result: ClusterGeneratorGeneratorWebhookSpecResult, + /// Secrets to fill in templates + /// These secrets will be passed to the templating function as key value pairs under the given name + #[serde(default, skip_serializing_if = "Option::is_none")] + pub secrets: Option>, + /// Timeout + #[serde(default, skip_serializing_if = "Option::is_none")] + pub timeout: Option, + /// Webhook url to call + pub url: String, +} + +/// The provider for the CA bundle to use to validate webhook server certificate. +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)] +pub struct ClusterGeneratorGeneratorWebhookSpecCaProvider { + /// The key where the CA certificate can be found in the Secret or ConfigMap. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub key: Option, + /// The name of the object located at the provider type. + pub name: String, + /// The namespace the Provider type is in. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub namespace: Option, + /// The type of provider to use such as "Secret", or "ConfigMap". + #[serde(rename = "type")] + pub r#type: ClusterGeneratorGeneratorWebhookSpecCaProviderType, +} + +/// The provider for the CA bundle to use to validate webhook server certificate. +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)] +pub enum ClusterGeneratorGeneratorWebhookSpecCaProviderType { + Secret, + ConfigMap, +} + +/// Result formatting +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct ClusterGeneratorGeneratorWebhookSpecResult { + /// Json path of return value + #[serde(default, skip_serializing_if = "Option::is_none", rename = "jsonPath")] + pub json_path: Option, +} + +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct ClusterGeneratorGeneratorWebhookSpecSecrets { + /// Name of this secret in templates + pub name: String, + /// Secret ref to fill in credentials + #[serde(rename = "secretRef")] + pub secret_ref: ClusterGeneratorGeneratorWebhookSpecSecretsSecretRef, +} + +/// Secret ref to fill in credentials +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct ClusterGeneratorGeneratorWebhookSpecSecretsSecretRef { + /// The key where the token is found. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub key: Option, + /// The name of the Secret resource being referred to. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub name: Option, +} + +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)] +pub enum ClusterGeneratorKind { + #[serde(rename = "ACRAccessToken")] + AcrAccessToken, + #[serde(rename = "ECRAuthorizationToken")] + EcrAuthorizationToken, + Fake, + #[serde(rename = "GCRAccessToken")] + GcrAccessToken, + GithubAccessToken, + QuayAccessToken, + Password, + #[serde(rename = "STSSessionToken")] + StsSessionToken, + #[serde(rename = "UUID")] + Uuid, + VaultDynamicSecret, + Webhook, + Grafana, +} + diff --git a/custom-resources/generators_external_secrets_io/src/v1alpha1/ecrauthorizationtokens.rs b/custom-resources/generators_external_secrets_io/src/v1alpha1/ecrauthorizationtokens.rs new file mode 100644 index 000000000..7f41d98b6 --- /dev/null +++ b/custom-resources/generators_external_secrets_io/src/v1alpha1/ecrauthorizationtokens.rs @@ -0,0 +1,136 @@ +// WARNING: generated by kopium - manual changes will be overwritten +// kopium command: kopium --docs --derive=Default --derive=PartialEq --smart-derive-elision --filename crd-catalog/external-secrets/external-secrets/generators.external-secrets.io/v1alpha1/ecrauthorizationtokens.yaml +// kopium version: 0.21.1 + +#[allow(unused_imports)] +mod prelude { + pub use kube::CustomResource; + pub use serde::{Serialize, Deserialize}; +} +use self::prelude::*; + +#[derive(CustomResource, Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +#[kube(group = "generators.external-secrets.io", version = "v1alpha1", kind = "ECRAuthorizationToken", plural = "ecrauthorizationtokens")] +#[kube(namespaced)] +#[kube(schema = "disabled")] +#[kube(derive="Default")] +#[kube(derive="PartialEq")] +pub struct ECRAuthorizationTokenSpec { + /// Auth defines how to authenticate with AWS + #[serde(default, skip_serializing_if = "Option::is_none")] + pub auth: Option, + /// Region specifies the region to operate in. + pub region: String, + /// You can assume a role before making calls to the + /// desired AWS service. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub role: Option, + /// Scope specifies the ECR service scope. + /// Valid options are private and public. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub scope: Option, +} + +/// Auth defines how to authenticate with AWS +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct ECRAuthorizationTokenAuth { + /// Authenticate against AWS using service account tokens. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub jwt: Option, + /// AWSAuthSecretRef holds secret references for AWS credentials + /// both AccessKeyID and SecretAccessKey must be defined in order to properly authenticate. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "secretRef")] + pub secret_ref: Option, +} + +/// Authenticate against AWS using service account tokens. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct ECRAuthorizationTokenAuthJwt { + /// A reference to a ServiceAccount resource. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "serviceAccountRef")] + pub service_account_ref: Option, +} + +/// A reference to a ServiceAccount resource. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct ECRAuthorizationTokenAuthJwtServiceAccountRef { + /// Audience specifies the `aud` claim for the service account token + /// If the service account uses a well-known annotation for e.g. IRSA or GCP Workload Identity + /// then this audiences will be appended to the list + #[serde(default, skip_serializing_if = "Option::is_none")] + pub audiences: Option>, + /// The name of the ServiceAccount resource being referred to. + pub name: String, + /// Namespace of the resource being referred to. + /// Ignored if referent is not cluster-scoped, otherwise defaults to the namespace of the referent. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub namespace: Option, +} + +/// AWSAuthSecretRef holds secret references for AWS credentials +/// both AccessKeyID and SecretAccessKey must be defined in order to properly authenticate. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct ECRAuthorizationTokenAuthSecretRef { + /// The AccessKeyID is used for authentication + #[serde(default, skip_serializing_if = "Option::is_none", rename = "accessKeyIDSecretRef")] + pub access_key_id_secret_ref: Option, + /// The SecretAccessKey is used for authentication + #[serde(default, skip_serializing_if = "Option::is_none", rename = "secretAccessKeySecretRef")] + pub secret_access_key_secret_ref: Option, + /// The SessionToken used for authentication + /// This must be defined if AccessKeyID and SecretAccessKey are temporary credentials + /// see: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_use-resources.html + #[serde(default, skip_serializing_if = "Option::is_none", rename = "sessionTokenSecretRef")] + pub session_token_secret_ref: Option, +} + +/// The AccessKeyID is used for authentication +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct ECRAuthorizationTokenAuthSecretRefAccessKeyIdSecretRef { + /// A key in the referenced Secret. + /// Some instances of this field may be defaulted, in others it may be required. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub key: Option, + /// The name of the Secret resource being referred to. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub name: Option, + /// The namespace of the Secret resource being referred to. + /// Ignored if referent is not cluster-scoped, otherwise defaults to the namespace of the referent. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub namespace: Option, +} + +/// The SecretAccessKey is used for authentication +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct ECRAuthorizationTokenAuthSecretRefSecretAccessKeySecretRef { + /// A key in the referenced Secret. + /// Some instances of this field may be defaulted, in others it may be required. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub key: Option, + /// The name of the Secret resource being referred to. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub name: Option, + /// The namespace of the Secret resource being referred to. + /// Ignored if referent is not cluster-scoped, otherwise defaults to the namespace of the referent. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub namespace: Option, +} + +/// The SessionToken used for authentication +/// This must be defined if AccessKeyID and SecretAccessKey are temporary credentials +/// see: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_use-resources.html +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct ECRAuthorizationTokenAuthSecretRefSessionTokenSecretRef { + /// A key in the referenced Secret. + /// Some instances of this field may be defaulted, in others it may be required. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub key: Option, + /// The name of the Secret resource being referred to. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub name: Option, + /// The namespace of the Secret resource being referred to. + /// Ignored if referent is not cluster-scoped, otherwise defaults to the namespace of the referent. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub namespace: Option, +} + diff --git a/custom-resources/generators_external_secrets_io/src/v1alpha1/fakes.rs b/custom-resources/generators_external_secrets_io/src/v1alpha1/fakes.rs new file mode 100644 index 000000000..7619a6159 --- /dev/null +++ b/custom-resources/generators_external_secrets_io/src/v1alpha1/fakes.rs @@ -0,0 +1,30 @@ +// WARNING: generated by kopium - manual changes will be overwritten +// kopium command: kopium --docs --derive=Default --derive=PartialEq --smart-derive-elision --filename crd-catalog/external-secrets/external-secrets/generators.external-secrets.io/v1alpha1/fakes.yaml +// kopium version: 0.21.1 + +#[allow(unused_imports)] +mod prelude { + pub use kube::CustomResource; + pub use serde::{Serialize, Deserialize}; + pub use std::collections::BTreeMap; +} +use self::prelude::*; + +/// FakeSpec contains the static data. +#[derive(CustomResource, Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +#[kube(group = "generators.external-secrets.io", version = "v1alpha1", kind = "Fake", plural = "fakes")] +#[kube(namespaced)] +#[kube(schema = "disabled")] +#[kube(derive="Default")] +#[kube(derive="PartialEq")] +pub struct FakeSpec { + /// Used to select the correct ESO controller (think: ingress.ingressClassName) + /// The ESO controller is instantiated with a specific controller name and filters VDS based on this property + #[serde(default, skip_serializing_if = "Option::is_none")] + pub controller: Option, + /// Data defines the static data returned + /// by this generator. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub data: Option>, +} + diff --git a/custom-resources/generators_external_secrets_io/src/v1alpha1/gcraccesstokens.rs b/custom-resources/generators_external_secrets_io/src/v1alpha1/gcraccesstokens.rs new file mode 100644 index 000000000..34fbb06ee --- /dev/null +++ b/custom-resources/generators_external_secrets_io/src/v1alpha1/gcraccesstokens.rs @@ -0,0 +1,86 @@ +// WARNING: generated by kopium - manual changes will be overwritten +// kopium command: kopium --docs --derive=Default --derive=PartialEq --smart-derive-elision --filename crd-catalog/external-secrets/external-secrets/generators.external-secrets.io/v1alpha1/gcraccesstokens.yaml +// kopium version: 0.21.1 + +#[allow(unused_imports)] +mod prelude { + pub use kube::CustomResource; + pub use serde::{Serialize, Deserialize}; +} +use self::prelude::*; + +#[derive(CustomResource, Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +#[kube(group = "generators.external-secrets.io", version = "v1alpha1", kind = "GCRAccessToken", plural = "gcraccesstokens")] +#[kube(namespaced)] +#[kube(schema = "disabled")] +#[kube(derive="Default")] +#[kube(derive="PartialEq")] +pub struct GCRAccessTokenSpec { + /// Auth defines the means for authenticating with GCP + pub auth: GCRAccessTokenAuth, + /// ProjectID defines which project to use to authenticate with + #[serde(rename = "projectID")] + pub project_id: String, +} + +/// Auth defines the means for authenticating with GCP +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct GCRAccessTokenAuth { + #[serde(default, skip_serializing_if = "Option::is_none", rename = "secretRef")] + pub secret_ref: Option, + #[serde(default, skip_serializing_if = "Option::is_none", rename = "workloadIdentity")] + pub workload_identity: Option, +} + +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct GCRAccessTokenAuthSecretRef { + /// The SecretAccessKey is used for authentication + #[serde(default, skip_serializing_if = "Option::is_none", rename = "secretAccessKeySecretRef")] + pub secret_access_key_secret_ref: Option, +} + +/// The SecretAccessKey is used for authentication +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct GCRAccessTokenAuthSecretRefSecretAccessKeySecretRef { + /// A key in the referenced Secret. + /// Some instances of this field may be defaulted, in others it may be required. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub key: Option, + /// The name of the Secret resource being referred to. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub name: Option, + /// The namespace of the Secret resource being referred to. + /// Ignored if referent is not cluster-scoped, otherwise defaults to the namespace of the referent. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub namespace: Option, +} + +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct GCRAccessTokenAuthWorkloadIdentity { + #[serde(rename = "clusterLocation")] + pub cluster_location: String, + #[serde(rename = "clusterName")] + pub cluster_name: String, + #[serde(default, skip_serializing_if = "Option::is_none", rename = "clusterProjectID")] + pub cluster_project_id: Option, + /// A reference to a ServiceAccount resource. + #[serde(rename = "serviceAccountRef")] + pub service_account_ref: GCRAccessTokenAuthWorkloadIdentityServiceAccountRef, +} + +/// A reference to a ServiceAccount resource. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct GCRAccessTokenAuthWorkloadIdentityServiceAccountRef { + /// Audience specifies the `aud` claim for the service account token + /// If the service account uses a well-known annotation for e.g. IRSA or GCP Workload Identity + /// then this audiences will be appended to the list + #[serde(default, skip_serializing_if = "Option::is_none")] + pub audiences: Option>, + /// The name of the ServiceAccount resource being referred to. + pub name: String, + /// Namespace of the resource being referred to. + /// Ignored if referent is not cluster-scoped, otherwise defaults to the namespace of the referent. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub namespace: Option, +} + diff --git a/custom-resources/generators_external_secrets_io/src/v1alpha1/generatorstates.rs b/custom-resources/generators_external_secrets_io/src/v1alpha1/generatorstates.rs new file mode 100644 index 000000000..3dcddbe90 --- /dev/null +++ b/custom-resources/generators_external_secrets_io/src/v1alpha1/generatorstates.rs @@ -0,0 +1,42 @@ +// WARNING: generated by kopium - manual changes will be overwritten +// kopium command: kopium --docs --derive=Default --derive=PartialEq --smart-derive-elision --filename crd-catalog/external-secrets/external-secrets/generators.external-secrets.io/v1alpha1/generatorstates.yaml +// kopium version: 0.21.1 + +#[allow(unused_imports)] +mod prelude { + pub use kube::CustomResource; + pub use serde::{Serialize, Deserialize}; + pub use k8s_openapi::apimachinery::pkg::apis::meta::v1::Condition; +} +use self::prelude::*; + +#[derive(CustomResource, Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +#[kube(group = "generators.external-secrets.io", version = "v1alpha1", kind = "GeneratorState", plural = "generatorstates")] +#[kube(namespaced)] +#[kube(schema = "disabled")] +#[kube(derive="Default")] +#[kube(derive="PartialEq")] +pub struct GeneratorStateSpec { + /// GarbageCollectionDeadline is the time after which the generator state + /// will be deleted. + /// It is set by the controller which creates the generator state and + /// can be set configured by the user. + /// If the garbage collection deadline is not set the generator state will not be deleted. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "garbageCollectionDeadline")] + pub garbage_collection_deadline: Option, + /// Resource is the generator manifest that produced the state. + /// It is a snapshot of the generator manifest at the time the state was produced. + /// This manifest will be used to delete the resource. Any configuration that is referenced + /// in the manifest should be available at the time of garbage collection. If that is not the case deletion will + /// be blocked by a finalizer. + pub resource: serde_json::Value, + /// State is the state that was produced by the generator implementation. + pub state: serde_json::Value, +} + +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct GeneratorStateStatus { + #[serde(default, skip_serializing_if = "Option::is_none")] + pub conditions: Option>, +} + diff --git a/custom-resources/generators_external_secrets_io/src/v1alpha1/githubaccesstokens.rs b/custom-resources/generators_external_secrets_io/src/v1alpha1/githubaccesstokens.rs new file mode 100644 index 000000000..f67075e49 --- /dev/null +++ b/custom-resources/generators_external_secrets_io/src/v1alpha1/githubaccesstokens.rs @@ -0,0 +1,69 @@ +// WARNING: generated by kopium - manual changes will be overwritten +// kopium command: kopium --docs --derive=Default --derive=PartialEq --smart-derive-elision --filename crd-catalog/external-secrets/external-secrets/generators.external-secrets.io/v1alpha1/githubaccesstokens.yaml +// kopium version: 0.21.1 + +#[allow(unused_imports)] +mod prelude { + pub use kube::CustomResource; + pub use serde::{Serialize, Deserialize}; + pub use std::collections::BTreeMap; +} +use self::prelude::*; + +#[derive(CustomResource, Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +#[kube(group = "generators.external-secrets.io", version = "v1alpha1", kind = "GithubAccessToken", plural = "githubaccesstokens")] +#[kube(namespaced)] +#[kube(schema = "disabled")] +#[kube(derive="Default")] +#[kube(derive="PartialEq")] +pub struct GithubAccessTokenSpec { + #[serde(rename = "appID")] + pub app_id: String, + /// Auth configures how ESO authenticates with a Github instance. + pub auth: GithubAccessTokenAuth, + #[serde(rename = "installID")] + pub install_id: String, + /// Map of permissions the token will have. If omitted, defaults to all permissions the GitHub App has. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub permissions: Option>, + /// List of repositories the token will have access to. If omitted, defaults to all repositories the GitHub App + /// is installed to. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub repositories: Option>, + /// URL configures the Github instance URL. Defaults to https://github.com/. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub url: Option, +} + +/// Auth configures how ESO authenticates with a Github instance. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct GithubAccessTokenAuth { + #[serde(rename = "privateKey")] + pub private_key: GithubAccessTokenAuthPrivateKey, +} + +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct GithubAccessTokenAuthPrivateKey { + /// A reference to a specific 'key' within a Secret resource. + /// In some instances, `key` is a required field. + #[serde(rename = "secretRef")] + pub secret_ref: GithubAccessTokenAuthPrivateKeySecretRef, +} + +/// A reference to a specific 'key' within a Secret resource. +/// In some instances, `key` is a required field. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct GithubAccessTokenAuthPrivateKeySecretRef { + /// A key in the referenced Secret. + /// Some instances of this field may be defaulted, in others it may be required. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub key: Option, + /// The name of the Secret resource being referred to. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub name: Option, + /// The namespace of the Secret resource being referred to. + /// Ignored if referent is not cluster-scoped, otherwise defaults to the namespace of the referent. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub namespace: Option, +} + diff --git a/custom-resources/generators_external_secrets_io/src/v1alpha1/grafanas.rs b/custom-resources/generators_external_secrets_io/src/v1alpha1/grafanas.rs new file mode 100644 index 000000000..77895c25b --- /dev/null +++ b/custom-resources/generators_external_secrets_io/src/v1alpha1/grafanas.rs @@ -0,0 +1,97 @@ +// WARNING: generated by kopium - manual changes will be overwritten +// kopium command: kopium --docs --derive=Default --derive=PartialEq --smart-derive-elision --filename crd-catalog/external-secrets/external-secrets/generators.external-secrets.io/v1alpha1/grafanas.yaml +// kopium version: 0.21.1 + +#[allow(unused_imports)] +mod prelude { + pub use kube::CustomResource; + pub use serde::{Serialize, Deserialize}; +} +use self::prelude::*; + +/// GrafanaSpec controls the behavior of the grafana generator. +#[derive(CustomResource, Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +#[kube(group = "generators.external-secrets.io", version = "v1alpha1", kind = "Grafana", plural = "grafanas")] +#[kube(namespaced)] +#[kube(schema = "disabled")] +#[kube(derive="Default")] +#[kube(derive="PartialEq")] +pub struct GrafanaSpec { + /// Auth is the authentication configuration to authenticate + /// against the Grafana instance. + pub auth: GrafanaAuth, + /// ServiceAccount is the configuration for the service account that + /// is supposed to be generated by the generator. + #[serde(rename = "serviceAccount")] + pub service_account: GrafanaServiceAccount, + /// URL is the URL of the Grafana instance. + pub url: String, +} + +/// Auth is the authentication configuration to authenticate +/// against the Grafana instance. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct GrafanaAuth { + /// Basic auth credentials used to authenticate against the Grafana instance. + /// Note: you need a token which has elevated permissions to create service accounts. + /// See here for the documentation on basic roles offered by Grafana: + /// https://grafana.com/docs/grafana/latest/administration/roles-and-permissions/access-control/rbac-fixed-basic-role-definitions/ + #[serde(default, skip_serializing_if = "Option::is_none")] + pub basic: Option, + /// A service account token used to authenticate against the Grafana instance. + /// Note: you need a token which has elevated permissions to create service accounts. + /// See here for the documentation on basic roles offered by Grafana: + /// https://grafana.com/docs/grafana/latest/administration/roles-and-permissions/access-control/rbac-fixed-basic-role-definitions/ + #[serde(default, skip_serializing_if = "Option::is_none")] + pub token: Option, +} + +/// Basic auth credentials used to authenticate against the Grafana instance. +/// Note: you need a token which has elevated permissions to create service accounts. +/// See here for the documentation on basic roles offered by Grafana: +/// https://grafana.com/docs/grafana/latest/administration/roles-and-permissions/access-control/rbac-fixed-basic-role-definitions/ +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct GrafanaAuthBasic { + /// A basic auth password used to authenticate against the Grafana instance. + pub password: GrafanaAuthBasicPassword, + /// A basic auth username used to authenticate against the Grafana instance. + pub username: String, +} + +/// A basic auth password used to authenticate against the Grafana instance. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct GrafanaAuthBasicPassword { + /// The key where the token is found. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub key: Option, + /// The name of the Secret resource being referred to. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub name: Option, +} + +/// A service account token used to authenticate against the Grafana instance. +/// Note: you need a token which has elevated permissions to create service accounts. +/// See here for the documentation on basic roles offered by Grafana: +/// https://grafana.com/docs/grafana/latest/administration/roles-and-permissions/access-control/rbac-fixed-basic-role-definitions/ +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct GrafanaAuthToken { + /// The key where the token is found. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub key: Option, + /// The name of the Secret resource being referred to. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub name: Option, +} + +/// ServiceAccount is the configuration for the service account that +/// is supposed to be generated by the generator. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct GrafanaServiceAccount { + /// Name is the name of the service account that will be created by ESO. + pub name: String, + /// Role is the role of the service account. + /// See here for the documentation on basic roles offered by Grafana: + /// https://grafana.com/docs/grafana/latest/administration/roles-and-permissions/access-control/rbac-fixed-basic-role-definitions/ + pub role: String, +} + diff --git a/custom-resources/generators_external_secrets_io/src/v1alpha1/mod.rs b/custom-resources/generators_external_secrets_io/src/v1alpha1/mod.rs new file mode 100644 index 000000000..b04cbffeb --- /dev/null +++ b/custom-resources/generators_external_secrets_io/src/v1alpha1/mod.rs @@ -0,0 +1,14 @@ +pub mod acraccesstokens; +pub mod clustergenerators; +pub mod ecrauthorizationtokens; +pub mod fakes; +pub mod gcraccesstokens; +pub mod generatorstates; +pub mod githubaccesstokens; +pub mod grafanas; +pub mod passwords; +pub mod quayaccesstokens; +pub mod stssessiontokens; +pub mod uuids; +pub mod vaultdynamicsecrets; +pub mod webhooks; diff --git a/custom-resources/generators_external_secrets_io/src/v1alpha1/passwords.rs b/custom-resources/generators_external_secrets_io/src/v1alpha1/passwords.rs new file mode 100644 index 000000000..fb79b08ce --- /dev/null +++ b/custom-resources/generators_external_secrets_io/src/v1alpha1/passwords.rs @@ -0,0 +1,42 @@ +// WARNING: generated by kopium - manual changes will be overwritten +// kopium command: kopium --docs --derive=Default --derive=PartialEq --smart-derive-elision --filename crd-catalog/external-secrets/external-secrets/generators.external-secrets.io/v1alpha1/passwords.yaml +// kopium version: 0.21.1 + +#[allow(unused_imports)] +mod prelude { + pub use kube::CustomResource; + pub use serde::{Serialize, Deserialize}; +} +use self::prelude::*; + +/// PasswordSpec controls the behavior of the password generator. +#[derive(CustomResource, Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +#[kube(group = "generators.external-secrets.io", version = "v1alpha1", kind = "Password", plural = "passwords")] +#[kube(namespaced)] +#[kube(schema = "disabled")] +#[kube(derive="Default")] +#[kube(derive="PartialEq")] +pub struct PasswordSpec { + /// set AllowRepeat to true to allow repeating characters. + #[serde(rename = "allowRepeat")] + pub allow_repeat: bool, + /// Digits specifies the number of digits in the generated + /// password. If omitted it defaults to 25% of the length of the password + #[serde(default, skip_serializing_if = "Option::is_none")] + pub digits: Option, + /// Length of the password to be generated. + /// Defaults to 24 + pub length: i64, + /// Set NoUpper to disable uppercase characters + #[serde(rename = "noUpper")] + pub no_upper: bool, + /// SymbolCharacters specifies the special characters that should be used + /// in the generated password. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "symbolCharacters")] + pub symbol_characters: Option, + /// Symbols specifies the number of symbol characters in the generated + /// password. If omitted it defaults to 25% of the length of the password + #[serde(default, skip_serializing_if = "Option::is_none")] + pub symbols: Option, +} + diff --git a/custom-resources/generators_external_secrets_io/src/v1alpha1/quayaccesstokens.rs b/custom-resources/generators_external_secrets_io/src/v1alpha1/quayaccesstokens.rs new file mode 100644 index 000000000..fa8bf8236 --- /dev/null +++ b/custom-resources/generators_external_secrets_io/src/v1alpha1/quayaccesstokens.rs @@ -0,0 +1,45 @@ +// WARNING: generated by kopium - manual changes will be overwritten +// kopium command: kopium --docs --derive=Default --derive=PartialEq --smart-derive-elision --filename crd-catalog/external-secrets/external-secrets/generators.external-secrets.io/v1alpha1/quayaccesstokens.yaml +// kopium version: 0.21.1 + +#[allow(unused_imports)] +mod prelude { + pub use kube::CustomResource; + pub use serde::{Serialize, Deserialize}; +} +use self::prelude::*; + +#[derive(CustomResource, Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +#[kube(group = "generators.external-secrets.io", version = "v1alpha1", kind = "QuayAccessToken", plural = "quayaccesstokens")] +#[kube(namespaced)] +#[kube(schema = "disabled")] +#[kube(derive="Default")] +#[kube(derive="PartialEq")] +pub struct QuayAccessTokenSpec { + /// Name of the robot account you are federating with + #[serde(rename = "robotAccount")] + pub robot_account: String, + /// Name of the service account you are federating with + #[serde(rename = "serviceAccountRef")] + pub service_account_ref: QuayAccessTokenServiceAccountRef, + /// URL configures the Quay instance URL. Defaults to quay.io. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub url: Option, +} + +/// Name of the service account you are federating with +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct QuayAccessTokenServiceAccountRef { + /// Audience specifies the `aud` claim for the service account token + /// If the service account uses a well-known annotation for e.g. IRSA or GCP Workload Identity + /// then this audiences will be appended to the list + #[serde(default, skip_serializing_if = "Option::is_none")] + pub audiences: Option>, + /// The name of the ServiceAccount resource being referred to. + pub name: String, + /// Namespace of the resource being referred to. + /// Ignored if referent is not cluster-scoped, otherwise defaults to the namespace of the referent. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub namespace: Option, +} + diff --git a/custom-resources/generators_external_secrets_io/src/v1alpha1/stssessiontokens.rs b/custom-resources/generators_external_secrets_io/src/v1alpha1/stssessiontokens.rs new file mode 100644 index 000000000..b5916a4f8 --- /dev/null +++ b/custom-resources/generators_external_secrets_io/src/v1alpha1/stssessiontokens.rs @@ -0,0 +1,154 @@ +// WARNING: generated by kopium - manual changes will be overwritten +// kopium command: kopium --docs --derive=Default --derive=PartialEq --smart-derive-elision --filename crd-catalog/external-secrets/external-secrets/generators.external-secrets.io/v1alpha1/stssessiontokens.yaml +// kopium version: 0.21.1 + +#[allow(unused_imports)] +mod prelude { + pub use kube::CustomResource; + pub use serde::{Serialize, Deserialize}; +} +use self::prelude::*; + +#[derive(CustomResource, Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +#[kube(group = "generators.external-secrets.io", version = "v1alpha1", kind = "STSSessionToken", plural = "stssessiontokens")] +#[kube(namespaced)] +#[kube(schema = "disabled")] +#[kube(derive="Default")] +#[kube(derive="PartialEq")] +pub struct STSSessionTokenSpec { + /// Auth defines how to authenticate with AWS + #[serde(default, skip_serializing_if = "Option::is_none")] + pub auth: Option, + /// Region specifies the region to operate in. + pub region: String, + /// RequestParameters contains parameters that can be passed to the STS service. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "requestParameters")] + pub request_parameters: Option, + /// You can assume a role before making calls to the + /// desired AWS service. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub role: Option, +} + +/// Auth defines how to authenticate with AWS +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct STSSessionTokenAuth { + /// Authenticate against AWS using service account tokens. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub jwt: Option, + /// AWSAuthSecretRef holds secret references for AWS credentials + /// both AccessKeyID and SecretAccessKey must be defined in order to properly authenticate. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "secretRef")] + pub secret_ref: Option, +} + +/// Authenticate against AWS using service account tokens. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct STSSessionTokenAuthJwt { + /// A reference to a ServiceAccount resource. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "serviceAccountRef")] + pub service_account_ref: Option, +} + +/// A reference to a ServiceAccount resource. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct STSSessionTokenAuthJwtServiceAccountRef { + /// Audience specifies the `aud` claim for the service account token + /// If the service account uses a well-known annotation for e.g. IRSA or GCP Workload Identity + /// then this audiences will be appended to the list + #[serde(default, skip_serializing_if = "Option::is_none")] + pub audiences: Option>, + /// The name of the ServiceAccount resource being referred to. + pub name: String, + /// Namespace of the resource being referred to. + /// Ignored if referent is not cluster-scoped, otherwise defaults to the namespace of the referent. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub namespace: Option, +} + +/// AWSAuthSecretRef holds secret references for AWS credentials +/// both AccessKeyID and SecretAccessKey must be defined in order to properly authenticate. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct STSSessionTokenAuthSecretRef { + /// The AccessKeyID is used for authentication + #[serde(default, skip_serializing_if = "Option::is_none", rename = "accessKeyIDSecretRef")] + pub access_key_id_secret_ref: Option, + /// The SecretAccessKey is used for authentication + #[serde(default, skip_serializing_if = "Option::is_none", rename = "secretAccessKeySecretRef")] + pub secret_access_key_secret_ref: Option, + /// The SessionToken used for authentication + /// This must be defined if AccessKeyID and SecretAccessKey are temporary credentials + /// see: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_use-resources.html + #[serde(default, skip_serializing_if = "Option::is_none", rename = "sessionTokenSecretRef")] + pub session_token_secret_ref: Option, +} + +/// The AccessKeyID is used for authentication +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct STSSessionTokenAuthSecretRefAccessKeyIdSecretRef { + /// A key in the referenced Secret. + /// Some instances of this field may be defaulted, in others it may be required. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub key: Option, + /// The name of the Secret resource being referred to. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub name: Option, + /// The namespace of the Secret resource being referred to. + /// Ignored if referent is not cluster-scoped, otherwise defaults to the namespace of the referent. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub namespace: Option, +} + +/// The SecretAccessKey is used for authentication +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct STSSessionTokenAuthSecretRefSecretAccessKeySecretRef { + /// A key in the referenced Secret. + /// Some instances of this field may be defaulted, in others it may be required. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub key: Option, + /// The name of the Secret resource being referred to. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub name: Option, + /// The namespace of the Secret resource being referred to. + /// Ignored if referent is not cluster-scoped, otherwise defaults to the namespace of the referent. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub namespace: Option, +} + +/// The SessionToken used for authentication +/// This must be defined if AccessKeyID and SecretAccessKey are temporary credentials +/// see: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_use-resources.html +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct STSSessionTokenAuthSecretRefSessionTokenSecretRef { + /// A key in the referenced Secret. + /// Some instances of this field may be defaulted, in others it may be required. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub key: Option, + /// The name of the Secret resource being referred to. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub name: Option, + /// The namespace of the Secret resource being referred to. + /// Ignored if referent is not cluster-scoped, otherwise defaults to the namespace of the referent. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub namespace: Option, +} + +/// RequestParameters contains parameters that can be passed to the STS service. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct STSSessionTokenRequestParameters { + /// SerialNumber is the identification number of the MFA device that is associated with the IAM user who is making + /// the GetSessionToken call. + /// Possible values: hardware device (such as GAHT12345678) or an Amazon Resource Name (ARN) for a virtual device + /// (such as arn:aws:iam::123456789012:mfa/user) + #[serde(default, skip_serializing_if = "Option::is_none", rename = "serialNumber")] + pub serial_number: Option, + /// SessionDuration The duration, in seconds, that the credentials should remain valid. Acceptable durations for + /// IAM user sessions range from 900 seconds (15 minutes) to 129,600 seconds (36 hours), with 43,200 seconds + /// (12 hours) as the default. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "sessionDuration")] + pub session_duration: Option, + /// TokenCode is the value provided by the MFA device, if MFA is required. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "tokenCode")] + pub token_code: Option, +} + diff --git a/custom-resources/generators_external_secrets_io/src/v1alpha1/uuids.rs b/custom-resources/generators_external_secrets_io/src/v1alpha1/uuids.rs new file mode 100644 index 000000000..c30da6dbb --- /dev/null +++ b/custom-resources/generators_external_secrets_io/src/v1alpha1/uuids.rs @@ -0,0 +1,21 @@ +// WARNING: generated by kopium - manual changes will be overwritten +// kopium command: kopium --docs --derive=Default --derive=PartialEq --smart-derive-elision --filename crd-catalog/external-secrets/external-secrets/generators.external-secrets.io/v1alpha1/uuids.yaml +// kopium version: 0.21.1 + +#[allow(unused_imports)] +mod prelude { + pub use kube::CustomResource; + pub use serde::{Serialize, Deserialize}; +} +use self::prelude::*; + +/// UUIDSpec controls the behavior of the uuid generator. +#[derive(CustomResource, Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +#[kube(group = "generators.external-secrets.io", version = "v1alpha1", kind = "UUID", plural = "uuids")] +#[kube(namespaced)] +#[kube(schema = "disabled")] +#[kube(derive="Default")] +#[kube(derive="PartialEq")] +pub struct UUIDSpec { +} + diff --git a/custom-resources/generators_external_secrets_io/src/v1alpha1/vaultdynamicsecrets.rs b/custom-resources/generators_external_secrets_io/src/v1alpha1/vaultdynamicsecrets.rs new file mode 100644 index 000000000..4700a5fce --- /dev/null +++ b/custom-resources/generators_external_secrets_io/src/v1alpha1/vaultdynamicsecrets.rs @@ -0,0 +1,706 @@ +// WARNING: generated by kopium - manual changes will be overwritten +// kopium command: kopium --docs --derive=Default --derive=PartialEq --smart-derive-elision --filename crd-catalog/external-secrets/external-secrets/generators.external-secrets.io/v1alpha1/vaultdynamicsecrets.yaml +// kopium version: 0.21.1 + +#[allow(unused_imports)] +mod prelude { + pub use kube::CustomResource; + pub use serde::{Serialize, Deserialize}; + pub use std::collections::BTreeMap; +} +use self::prelude::*; + +#[derive(CustomResource, Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +#[kube(group = "generators.external-secrets.io", version = "v1alpha1", kind = "VaultDynamicSecret", plural = "vaultdynamicsecrets")] +#[kube(namespaced)] +#[kube(schema = "disabled")] +#[kube(derive="Default")] +#[kube(derive="PartialEq")] +pub struct VaultDynamicSecretSpec { + /// Do not fail if no secrets are found. Useful for requests where no data is expected. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "allowEmptyResponse")] + pub allow_empty_response: Option, + /// Used to select the correct ESO controller (think: ingress.ingressClassName) + /// The ESO controller is instantiated with a specific controller name and filters VDS based on this property + #[serde(default, skip_serializing_if = "Option::is_none")] + pub controller: Option, + /// Vault API method to use (GET/POST/other) + #[serde(default, skip_serializing_if = "Option::is_none")] + pub method: Option, + /// Parameters to pass to Vault write (for non-GET methods) + #[serde(default, skip_serializing_if = "Option::is_none")] + pub parameters: Option, + /// Vault path to obtain the dynamic secret from + pub path: String, + /// Vault provider common spec + pub provider: VaultDynamicSecretProvider, + /// Result type defines which data is returned from the generator. + /// By default it is the "data" section of the Vault API response. + /// When using e.g. /auth/token/create the "data" section is empty but + /// the "auth" section contains the generated token. + /// Please refer to the vault docs regarding the result data structure. + /// Additionally, accessing the raw response is possibly by using "Raw" result type. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "resultType")] + pub result_type: Option, + /// Used to configure http retries if failed + #[serde(default, skip_serializing_if = "Option::is_none", rename = "retrySettings")] + pub retry_settings: Option, +} + +/// Vault provider common spec +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct VaultDynamicSecretProvider { + /// Auth configures how secret-manager authenticates with the Vault server. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub auth: Option, + /// PEM encoded CA bundle used to validate Vault server certificate. Only used + /// if the Server URL is using HTTPS protocol. This parameter is ignored for + /// plain HTTP protocol connection. If not set the system root certificates + /// are used to validate the TLS connection. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "caBundle")] + pub ca_bundle: Option, + /// The provider for the CA bundle to use to validate Vault server certificate. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "caProvider")] + pub ca_provider: Option, + /// ForwardInconsistent tells Vault to forward read-after-write requests to the Vault + /// leader instead of simply retrying within a loop. This can increase performance if + /// the option is enabled serverside. + /// https://www.vaultproject.io/docs/configuration/replication#allow_forwarding_via_header + #[serde(default, skip_serializing_if = "Option::is_none", rename = "forwardInconsistent")] + pub forward_inconsistent: Option, + /// Headers to be added in Vault request + #[serde(default, skip_serializing_if = "Option::is_none")] + pub headers: Option>, + /// Name of the vault namespace. Namespaces is a set of features within Vault Enterprise that allows + /// Vault environments to support Secure Multi-tenancy. e.g: "ns1". + /// More about namespaces can be found here https://www.vaultproject.io/docs/enterprise/namespaces + #[serde(default, skip_serializing_if = "Option::is_none")] + pub namespace: Option, + /// Path is the mount path of the Vault KV backend endpoint, e.g: + /// "secret". The v2 KV secret engine version specific "/data" path suffix + /// for fetching secrets from Vault is optional and will be appended + /// if not present in specified path. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub path: Option, + /// ReadYourWrites ensures isolated read-after-write semantics by + /// providing discovered cluster replication states in each request. + /// More information about eventual consistency in Vault can be found here + /// https://www.vaultproject.io/docs/enterprise/consistency + #[serde(default, skip_serializing_if = "Option::is_none", rename = "readYourWrites")] + pub read_your_writes: Option, + /// Server is the connection address for the Vault server, e.g: "https://vault.example.com:8200". + pub server: String, + /// The configuration used for client side related TLS communication, when the Vault server + /// requires mutual authentication. Only used if the Server URL is using HTTPS protocol. + /// This parameter is ignored for plain HTTP protocol connection. + /// It's worth noting this configuration is different from the "TLS certificates auth method", + /// which is available under the `auth.cert` section. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub tls: Option, + /// Version is the Vault KV secret engine version. This can be either "v1" or + /// "v2". Version defaults to "v2". + #[serde(default, skip_serializing_if = "Option::is_none")] + pub version: Option, +} + +/// Auth configures how secret-manager authenticates with the Vault server. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct VaultDynamicSecretProviderAuth { + /// AppRole authenticates with Vault using the App Role auth mechanism, + /// with the role and secret stored in a Kubernetes Secret resource. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "appRole")] + pub app_role: Option, + /// Cert authenticates with TLS Certificates by passing client certificate, private key and ca certificate + /// Cert authentication method + #[serde(default, skip_serializing_if = "Option::is_none")] + pub cert: Option, + /// Iam authenticates with vault by passing a special AWS request signed with AWS IAM credentials + /// AWS IAM authentication method + #[serde(default, skip_serializing_if = "Option::is_none")] + pub iam: Option, + /// Jwt authenticates with Vault by passing role and JWT token using the + /// JWT/OIDC authentication method + #[serde(default, skip_serializing_if = "Option::is_none")] + pub jwt: Option, + /// Kubernetes authenticates with Vault by passing the ServiceAccount + /// token stored in the named Secret resource to the Vault server. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub kubernetes: Option, + /// Ldap authenticates with Vault by passing username/password pair using + /// the LDAP authentication method + #[serde(default, skip_serializing_if = "Option::is_none")] + pub ldap: Option, + /// Name of the vault namespace to authenticate to. This can be different than the namespace your secret is in. + /// Namespaces is a set of features within Vault Enterprise that allows + /// Vault environments to support Secure Multi-tenancy. e.g: "ns1". + /// More about namespaces can be found here https://www.vaultproject.io/docs/enterprise/namespaces + /// This will default to Vault.Namespace field if set, or empty otherwise + #[serde(default, skip_serializing_if = "Option::is_none")] + pub namespace: Option, + /// TokenSecretRef authenticates with Vault by presenting a token. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "tokenSecretRef")] + pub token_secret_ref: Option, + /// UserPass authenticates with Vault by passing username/password pair + #[serde(default, skip_serializing_if = "Option::is_none", rename = "userPass")] + pub user_pass: Option, +} + +/// AppRole authenticates with Vault using the App Role auth mechanism, +/// with the role and secret stored in a Kubernetes Secret resource. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct VaultDynamicSecretProviderAuthAppRole { + /// Path where the App Role authentication backend is mounted + /// in Vault, e.g: "approle" + pub path: String, + /// RoleID configured in the App Role authentication backend when setting + /// up the authentication backend in Vault. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "roleId")] + pub role_id: Option, + /// Reference to a key in a Secret that contains the App Role ID used + /// to authenticate with Vault. + /// The `key` field must be specified and denotes which entry within the Secret + /// resource is used as the app role id. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "roleRef")] + pub role_ref: Option, + /// Reference to a key in a Secret that contains the App Role secret used + /// to authenticate with Vault. + /// The `key` field must be specified and denotes which entry within the Secret + /// resource is used as the app role secret. + #[serde(rename = "secretRef")] + pub secret_ref: VaultDynamicSecretProviderAuthAppRoleSecretRef, +} + +/// Reference to a key in a Secret that contains the App Role ID used +/// to authenticate with Vault. +/// The `key` field must be specified and denotes which entry within the Secret +/// resource is used as the app role id. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct VaultDynamicSecretProviderAuthAppRoleRoleRef { + /// A key in the referenced Secret. + /// Some instances of this field may be defaulted, in others it may be required. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub key: Option, + /// The name of the Secret resource being referred to. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub name: Option, + /// The namespace of the Secret resource being referred to. + /// Ignored if referent is not cluster-scoped, otherwise defaults to the namespace of the referent. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub namespace: Option, +} + +/// Reference to a key in a Secret that contains the App Role secret used +/// to authenticate with Vault. +/// The `key` field must be specified and denotes which entry within the Secret +/// resource is used as the app role secret. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct VaultDynamicSecretProviderAuthAppRoleSecretRef { + /// A key in the referenced Secret. + /// Some instances of this field may be defaulted, in others it may be required. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub key: Option, + /// The name of the Secret resource being referred to. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub name: Option, + /// The namespace of the Secret resource being referred to. + /// Ignored if referent is not cluster-scoped, otherwise defaults to the namespace of the referent. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub namespace: Option, +} + +/// Cert authenticates with TLS Certificates by passing client certificate, private key and ca certificate +/// Cert authentication method +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct VaultDynamicSecretProviderAuthCert { + /// ClientCert is a certificate to authenticate using the Cert Vault + /// authentication method + #[serde(default, skip_serializing_if = "Option::is_none", rename = "clientCert")] + pub client_cert: Option, + /// SecretRef to a key in a Secret resource containing client private key to + /// authenticate with Vault using the Cert authentication method + #[serde(default, skip_serializing_if = "Option::is_none", rename = "secretRef")] + pub secret_ref: Option, +} + +/// ClientCert is a certificate to authenticate using the Cert Vault +/// authentication method +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct VaultDynamicSecretProviderAuthCertClientCert { + /// A key in the referenced Secret. + /// Some instances of this field may be defaulted, in others it may be required. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub key: Option, + /// The name of the Secret resource being referred to. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub name: Option, + /// The namespace of the Secret resource being referred to. + /// Ignored if referent is not cluster-scoped, otherwise defaults to the namespace of the referent. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub namespace: Option, +} + +/// SecretRef to a key in a Secret resource containing client private key to +/// authenticate with Vault using the Cert authentication method +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct VaultDynamicSecretProviderAuthCertSecretRef { + /// A key in the referenced Secret. + /// Some instances of this field may be defaulted, in others it may be required. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub key: Option, + /// The name of the Secret resource being referred to. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub name: Option, + /// The namespace of the Secret resource being referred to. + /// Ignored if referent is not cluster-scoped, otherwise defaults to the namespace of the referent. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub namespace: Option, +} + +/// Iam authenticates with vault by passing a special AWS request signed with AWS IAM credentials +/// AWS IAM authentication method +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct VaultDynamicSecretProviderAuthIam { + /// AWS External ID set on assumed IAM roles + #[serde(default, skip_serializing_if = "Option::is_none", rename = "externalID")] + pub external_id: Option, + /// Specify a service account with IRSA enabled + #[serde(default, skip_serializing_if = "Option::is_none")] + pub jwt: Option, + /// Path where the AWS auth method is enabled in Vault, e.g: "aws" + #[serde(default, skip_serializing_if = "Option::is_none")] + pub path: Option, + /// AWS region + #[serde(default, skip_serializing_if = "Option::is_none")] + pub region: Option, + /// This is the AWS role to be assumed before talking to vault + #[serde(default, skip_serializing_if = "Option::is_none")] + pub role: Option, + /// Specify credentials in a Secret object + #[serde(default, skip_serializing_if = "Option::is_none", rename = "secretRef")] + pub secret_ref: Option, + /// X-Vault-AWS-IAM-Server-ID is an additional header used by Vault IAM auth method to mitigate against different types of replay attacks. More details here: https://developer.hashicorp.com/vault/docs/auth/aws + #[serde(default, skip_serializing_if = "Option::is_none", rename = "vaultAwsIamServerID")] + pub vault_aws_iam_server_id: Option, + /// Vault Role. In vault, a role describes an identity with a set of permissions, groups, or policies you want to attach a user of the secrets engine + #[serde(rename = "vaultRole")] + pub vault_role: String, +} + +/// Specify a service account with IRSA enabled +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct VaultDynamicSecretProviderAuthIamJwt { + /// A reference to a ServiceAccount resource. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "serviceAccountRef")] + pub service_account_ref: Option, +} + +/// A reference to a ServiceAccount resource. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct VaultDynamicSecretProviderAuthIamJwtServiceAccountRef { + /// Audience specifies the `aud` claim for the service account token + /// If the service account uses a well-known annotation for e.g. IRSA or GCP Workload Identity + /// then this audiences will be appended to the list + #[serde(default, skip_serializing_if = "Option::is_none")] + pub audiences: Option>, + /// The name of the ServiceAccount resource being referred to. + pub name: String, + /// Namespace of the resource being referred to. + /// Ignored if referent is not cluster-scoped, otherwise defaults to the namespace of the referent. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub namespace: Option, +} + +/// Specify credentials in a Secret object +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct VaultDynamicSecretProviderAuthIamSecretRef { + /// The AccessKeyID is used for authentication + #[serde(default, skip_serializing_if = "Option::is_none", rename = "accessKeyIDSecretRef")] + pub access_key_id_secret_ref: Option, + /// The SecretAccessKey is used for authentication + #[serde(default, skip_serializing_if = "Option::is_none", rename = "secretAccessKeySecretRef")] + pub secret_access_key_secret_ref: Option, + /// The SessionToken used for authentication + /// This must be defined if AccessKeyID and SecretAccessKey are temporary credentials + /// see: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_use-resources.html + #[serde(default, skip_serializing_if = "Option::is_none", rename = "sessionTokenSecretRef")] + pub session_token_secret_ref: Option, +} + +/// The AccessKeyID is used for authentication +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct VaultDynamicSecretProviderAuthIamSecretRefAccessKeyIdSecretRef { + /// A key in the referenced Secret. + /// Some instances of this field may be defaulted, in others it may be required. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub key: Option, + /// The name of the Secret resource being referred to. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub name: Option, + /// The namespace of the Secret resource being referred to. + /// Ignored if referent is not cluster-scoped, otherwise defaults to the namespace of the referent. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub namespace: Option, +} + +/// The SecretAccessKey is used for authentication +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct VaultDynamicSecretProviderAuthIamSecretRefSecretAccessKeySecretRef { + /// A key in the referenced Secret. + /// Some instances of this field may be defaulted, in others it may be required. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub key: Option, + /// The name of the Secret resource being referred to. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub name: Option, + /// The namespace of the Secret resource being referred to. + /// Ignored if referent is not cluster-scoped, otherwise defaults to the namespace of the referent. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub namespace: Option, +} + +/// The SessionToken used for authentication +/// This must be defined if AccessKeyID and SecretAccessKey are temporary credentials +/// see: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_use-resources.html +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct VaultDynamicSecretProviderAuthIamSecretRefSessionTokenSecretRef { + /// A key in the referenced Secret. + /// Some instances of this field may be defaulted, in others it may be required. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub key: Option, + /// The name of the Secret resource being referred to. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub name: Option, + /// The namespace of the Secret resource being referred to. + /// Ignored if referent is not cluster-scoped, otherwise defaults to the namespace of the referent. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub namespace: Option, +} + +/// Jwt authenticates with Vault by passing role and JWT token using the +/// JWT/OIDC authentication method +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct VaultDynamicSecretProviderAuthJwt { + /// Optional ServiceAccountToken specifies the Kubernetes service account for which to request + /// a token for with the `TokenRequest` API. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "kubernetesServiceAccountToken")] + pub kubernetes_service_account_token: Option, + /// Path where the JWT authentication backend is mounted + /// in Vault, e.g: "jwt" + pub path: String, + /// Role is a JWT role to authenticate using the JWT/OIDC Vault + /// authentication method + #[serde(default, skip_serializing_if = "Option::is_none")] + pub role: Option, + /// Optional SecretRef that refers to a key in a Secret resource containing JWT token to + /// authenticate with Vault using the JWT/OIDC authentication method. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "secretRef")] + pub secret_ref: Option, +} + +/// Optional ServiceAccountToken specifies the Kubernetes service account for which to request +/// a token for with the `TokenRequest` API. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct VaultDynamicSecretProviderAuthJwtKubernetesServiceAccountToken { + /// Optional audiences field that will be used to request a temporary Kubernetes service + /// account token for the service account referenced by `serviceAccountRef`. + /// Defaults to a single audience `vault` it not specified. + /// Deprecated: use serviceAccountRef.Audiences instead + #[serde(default, skip_serializing_if = "Option::is_none")] + pub audiences: Option>, + /// Optional expiration time in seconds that will be used to request a temporary + /// Kubernetes service account token for the service account referenced by + /// `serviceAccountRef`. + /// Deprecated: this will be removed in the future. + /// Defaults to 10 minutes. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "expirationSeconds")] + pub expiration_seconds: Option, + /// Service account field containing the name of a kubernetes ServiceAccount. + #[serde(rename = "serviceAccountRef")] + pub service_account_ref: VaultDynamicSecretProviderAuthJwtKubernetesServiceAccountTokenServiceAccountRef, +} + +/// Service account field containing the name of a kubernetes ServiceAccount. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct VaultDynamicSecretProviderAuthJwtKubernetesServiceAccountTokenServiceAccountRef { + /// Audience specifies the `aud` claim for the service account token + /// If the service account uses a well-known annotation for e.g. IRSA or GCP Workload Identity + /// then this audiences will be appended to the list + #[serde(default, skip_serializing_if = "Option::is_none")] + pub audiences: Option>, + /// The name of the ServiceAccount resource being referred to. + pub name: String, + /// Namespace of the resource being referred to. + /// Ignored if referent is not cluster-scoped, otherwise defaults to the namespace of the referent. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub namespace: Option, +} + +/// Optional SecretRef that refers to a key in a Secret resource containing JWT token to +/// authenticate with Vault using the JWT/OIDC authentication method. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct VaultDynamicSecretProviderAuthJwtSecretRef { + /// A key in the referenced Secret. + /// Some instances of this field may be defaulted, in others it may be required. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub key: Option, + /// The name of the Secret resource being referred to. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub name: Option, + /// The namespace of the Secret resource being referred to. + /// Ignored if referent is not cluster-scoped, otherwise defaults to the namespace of the referent. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub namespace: Option, +} + +/// Kubernetes authenticates with Vault by passing the ServiceAccount +/// token stored in the named Secret resource to the Vault server. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct VaultDynamicSecretProviderAuthKubernetes { + /// Path where the Kubernetes authentication backend is mounted in Vault, e.g: + /// "kubernetes" + #[serde(rename = "mountPath")] + pub mount_path: String, + /// A required field containing the Vault Role to assume. A Role binds a + /// Kubernetes ServiceAccount with a set of Vault policies. + pub role: String, + /// Optional secret field containing a Kubernetes ServiceAccount JWT used + /// for authenticating with Vault. If a name is specified without a key, + /// `token` is the default. If one is not specified, the one bound to + /// the controller will be used. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "secretRef")] + pub secret_ref: Option, + /// Optional service account field containing the name of a kubernetes ServiceAccount. + /// If the service account is specified, the service account secret token JWT will be used + /// for authenticating with Vault. If the service account selector is not supplied, + /// the secretRef will be used instead. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "serviceAccountRef")] + pub service_account_ref: Option, +} + +/// Optional secret field containing a Kubernetes ServiceAccount JWT used +/// for authenticating with Vault. If a name is specified without a key, +/// `token` is the default. If one is not specified, the one bound to +/// the controller will be used. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct VaultDynamicSecretProviderAuthKubernetesSecretRef { + /// A key in the referenced Secret. + /// Some instances of this field may be defaulted, in others it may be required. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub key: Option, + /// The name of the Secret resource being referred to. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub name: Option, + /// The namespace of the Secret resource being referred to. + /// Ignored if referent is not cluster-scoped, otherwise defaults to the namespace of the referent. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub namespace: Option, +} + +/// Optional service account field containing the name of a kubernetes ServiceAccount. +/// If the service account is specified, the service account secret token JWT will be used +/// for authenticating with Vault. If the service account selector is not supplied, +/// the secretRef will be used instead. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct VaultDynamicSecretProviderAuthKubernetesServiceAccountRef { + /// Audience specifies the `aud` claim for the service account token + /// If the service account uses a well-known annotation for e.g. IRSA or GCP Workload Identity + /// then this audiences will be appended to the list + #[serde(default, skip_serializing_if = "Option::is_none")] + pub audiences: Option>, + /// The name of the ServiceAccount resource being referred to. + pub name: String, + /// Namespace of the resource being referred to. + /// Ignored if referent is not cluster-scoped, otherwise defaults to the namespace of the referent. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub namespace: Option, +} + +/// Ldap authenticates with Vault by passing username/password pair using +/// the LDAP authentication method +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct VaultDynamicSecretProviderAuthLdap { + /// Path where the LDAP authentication backend is mounted + /// in Vault, e.g: "ldap" + pub path: String, + /// SecretRef to a key in a Secret resource containing password for the LDAP + /// user used to authenticate with Vault using the LDAP authentication + /// method + #[serde(default, skip_serializing_if = "Option::is_none", rename = "secretRef")] + pub secret_ref: Option, + /// Username is an LDAP username used to authenticate using the LDAP Vault + /// authentication method + pub username: String, +} + +/// SecretRef to a key in a Secret resource containing password for the LDAP +/// user used to authenticate with Vault using the LDAP authentication +/// method +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct VaultDynamicSecretProviderAuthLdapSecretRef { + /// A key in the referenced Secret. + /// Some instances of this field may be defaulted, in others it may be required. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub key: Option, + /// The name of the Secret resource being referred to. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub name: Option, + /// The namespace of the Secret resource being referred to. + /// Ignored if referent is not cluster-scoped, otherwise defaults to the namespace of the referent. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub namespace: Option, +} + +/// TokenSecretRef authenticates with Vault by presenting a token. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct VaultDynamicSecretProviderAuthTokenSecretRef { + /// A key in the referenced Secret. + /// Some instances of this field may be defaulted, in others it may be required. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub key: Option, + /// The name of the Secret resource being referred to. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub name: Option, + /// The namespace of the Secret resource being referred to. + /// Ignored if referent is not cluster-scoped, otherwise defaults to the namespace of the referent. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub namespace: Option, +} + +/// UserPass authenticates with Vault by passing username/password pair +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct VaultDynamicSecretProviderAuthUserPass { + /// Path where the UserPassword authentication backend is mounted + /// in Vault, e.g: "userpass" + pub path: String, + /// SecretRef to a key in a Secret resource containing password for the + /// user used to authenticate with Vault using the UserPass authentication + /// method + #[serde(default, skip_serializing_if = "Option::is_none", rename = "secretRef")] + pub secret_ref: Option, + /// Username is a username used to authenticate using the UserPass Vault + /// authentication method + pub username: String, +} + +/// SecretRef to a key in a Secret resource containing password for the +/// user used to authenticate with Vault using the UserPass authentication +/// method +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct VaultDynamicSecretProviderAuthUserPassSecretRef { + /// A key in the referenced Secret. + /// Some instances of this field may be defaulted, in others it may be required. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub key: Option, + /// The name of the Secret resource being referred to. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub name: Option, + /// The namespace of the Secret resource being referred to. + /// Ignored if referent is not cluster-scoped, otherwise defaults to the namespace of the referent. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub namespace: Option, +} + +/// The provider for the CA bundle to use to validate Vault server certificate. +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)] +pub struct VaultDynamicSecretProviderCaProvider { + /// The key where the CA certificate can be found in the Secret or ConfigMap. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub key: Option, + /// The name of the object located at the provider type. + pub name: String, + /// The namespace the Provider type is in. + /// Can only be defined when used in a ClusterSecretStore. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub namespace: Option, + /// The type of provider to use such as "Secret", or "ConfigMap". + #[serde(rename = "type")] + pub r#type: VaultDynamicSecretProviderCaProviderType, +} + +/// The provider for the CA bundle to use to validate Vault server certificate. +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)] +pub enum VaultDynamicSecretProviderCaProviderType { + Secret, + ConfigMap, +} + +/// The configuration used for client side related TLS communication, when the Vault server +/// requires mutual authentication. Only used if the Server URL is using HTTPS protocol. +/// This parameter is ignored for plain HTTP protocol connection. +/// It's worth noting this configuration is different from the "TLS certificates auth method", +/// which is available under the `auth.cert` section. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct VaultDynamicSecretProviderTls { + /// CertSecretRef is a certificate added to the transport layer + /// when communicating with the Vault server. + /// If no key for the Secret is specified, external-secret will default to 'tls.crt'. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "certSecretRef")] + pub cert_secret_ref: Option, + /// KeySecretRef to a key in a Secret resource containing client private key + /// added to the transport layer when communicating with the Vault server. + /// If no key for the Secret is specified, external-secret will default to 'tls.key'. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "keySecretRef")] + pub key_secret_ref: Option, +} + +/// CertSecretRef is a certificate added to the transport layer +/// when communicating with the Vault server. +/// If no key for the Secret is specified, external-secret will default to 'tls.crt'. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct VaultDynamicSecretProviderTlsCertSecretRef { + /// A key in the referenced Secret. + /// Some instances of this field may be defaulted, in others it may be required. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub key: Option, + /// The name of the Secret resource being referred to. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub name: Option, + /// The namespace of the Secret resource being referred to. + /// Ignored if referent is not cluster-scoped, otherwise defaults to the namespace of the referent. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub namespace: Option, +} + +/// KeySecretRef to a key in a Secret resource containing client private key +/// added to the transport layer when communicating with the Vault server. +/// If no key for the Secret is specified, external-secret will default to 'tls.key'. +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct VaultDynamicSecretProviderTlsKeySecretRef { + /// A key in the referenced Secret. + /// Some instances of this field may be defaulted, in others it may be required. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub key: Option, + /// The name of the Secret resource being referred to. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub name: Option, + /// The namespace of the Secret resource being referred to. + /// Ignored if referent is not cluster-scoped, otherwise defaults to the namespace of the referent. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub namespace: Option, +} + +/// Vault provider common spec +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)] +pub enum VaultDynamicSecretProviderVersion { + #[serde(rename = "v1")] + V1, + #[serde(rename = "v2")] + V2, +} + +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)] +pub enum VaultDynamicSecretResultType { + Data, + Auth, + Raw, +} + +/// Used to configure http retries if failed +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct VaultDynamicSecretRetrySettings { + #[serde(default, skip_serializing_if = "Option::is_none", rename = "maxRetries")] + pub max_retries: Option, + #[serde(default, skip_serializing_if = "Option::is_none", rename = "retryInterval")] + pub retry_interval: Option, +} + diff --git a/custom-resources/generators_external_secrets_io/src/v1alpha1/webhooks.rs b/custom-resources/generators_external_secrets_io/src/v1alpha1/webhooks.rs new file mode 100644 index 000000000..5b0d4d26d --- /dev/null +++ b/custom-resources/generators_external_secrets_io/src/v1alpha1/webhooks.rs @@ -0,0 +1,102 @@ +// WARNING: generated by kopium - manual changes will be overwritten +// kopium command: kopium --docs --derive=Default --derive=PartialEq --smart-derive-elision --filename crd-catalog/external-secrets/external-secrets/generators.external-secrets.io/v1alpha1/webhooks.yaml +// kopium version: 0.21.1 + +#[allow(unused_imports)] +mod prelude { + pub use kube::CustomResource; + pub use serde::{Serialize, Deserialize}; + pub use std::collections::BTreeMap; +} +use self::prelude::*; + +/// WebhookSpec controls the behavior of the external generator. Any body parameters should be passed to the server through the parameters field. +#[derive(CustomResource, Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +#[kube(group = "generators.external-secrets.io", version = "v1alpha1", kind = "Webhook", plural = "webhooks")] +#[kube(namespaced)] +#[kube(schema = "disabled")] +#[kube(derive="Default")] +#[kube(derive="PartialEq")] +pub struct WebhookSpec { + /// Body + #[serde(default, skip_serializing_if = "Option::is_none")] + pub body: Option, + /// PEM encoded CA bundle used to validate webhook server certificate. Only used + /// if the Server URL is using HTTPS protocol. This parameter is ignored for + /// plain HTTP protocol connection. If not set the system root certificates + /// are used to validate the TLS connection. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "caBundle")] + pub ca_bundle: Option, + /// The provider for the CA bundle to use to validate webhook server certificate. + #[serde(default, skip_serializing_if = "Option::is_none", rename = "caProvider")] + pub ca_provider: Option, + /// Headers + #[serde(default, skip_serializing_if = "Option::is_none")] + pub headers: Option>, + /// Webhook Method + #[serde(default, skip_serializing_if = "Option::is_none")] + pub method: Option, + /// Result formatting + pub result: WebhookResult, + /// Secrets to fill in templates + /// These secrets will be passed to the templating function as key value pairs under the given name + #[serde(default, skip_serializing_if = "Option::is_none")] + pub secrets: Option>, + /// Timeout + #[serde(default, skip_serializing_if = "Option::is_none")] + pub timeout: Option, + /// Webhook url to call + pub url: String, +} + +/// The provider for the CA bundle to use to validate webhook server certificate. +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)] +pub struct WebhookCaProvider { + /// The key where the CA certificate can be found in the Secret or ConfigMap. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub key: Option, + /// The name of the object located at the provider type. + pub name: String, + /// The namespace the Provider type is in. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub namespace: Option, + /// The type of provider to use such as "Secret", or "ConfigMap". + #[serde(rename = "type")] + pub r#type: WebhookCaProviderType, +} + +/// The provider for the CA bundle to use to validate webhook server certificate. +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)] +pub enum WebhookCaProviderType { + Secret, + ConfigMap, +} + +/// Result formatting +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct WebhookResult { + /// Json path of return value + #[serde(default, skip_serializing_if = "Option::is_none", rename = "jsonPath")] + pub json_path: Option, +} + +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct WebhookSecrets { + /// Name of this secret in templates + pub name: String, + /// Secret ref to fill in credentials + #[serde(rename = "secretRef")] + pub secret_ref: WebhookSecretsSecretRef, +} + +/// Secret ref to fill in credentials +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct WebhookSecretsSecretRef { + /// The key where the token is found. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub key: Option, + /// The name of the Secret resource being referred to. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub name: Option, +} +