diff --git a/.githooks/pre-push b/.githooks/pre-push new file mode 100755 index 000000000..044ecd2ff --- /dev/null +++ b/.githooks/pre-push @@ -0,0 +1,33 @@ +printf "\n\e[37m*** Running Pre-push hooks ***\e[0m\n\n" + +printf "Executing linters...\r" + +golangci-lint run > /dev/null +linting_result=$? + +if [[ $linting_result -ne 0 ]]; +then + printf "Executing linters... \e[31mNOK!\e[0m\n" + printf "Run `golangci-lint run -v` and fix them\n" + + exit 1 +else + printf "Executing linters... \e[32mOK!\e[0m\n" +fi + +printf "Executing unit tests...\r" + +make test_unit > /dev/null 2>&1 +unit_test_result=$? + +if [[ $unit_test_result -ne 0 ]]; +then + printf "Executing unit tests... \e[31mNOK!\e[0m\n" + printf "Run `make test_unit` and fix them\n" + + exit 1 +else + printf "Executing unit tests... \e[32mOK!\e[0m\n" +fi + +printf "\n\e[37m*** All good! ***\e[0m\n\n" \ No newline at end of file diff --git a/.github/workflows/env-e2e.yaml b/.github/workflows/env-e2e.yaml new file mode 100644 index 000000000..9e454299d --- /dev/null +++ b/.github/workflows/env-e2e.yaml @@ -0,0 +1,123 @@ +name: Env deployments tests (E2E) +on: + push: + paths: + - "env/**" + +concurrency: + group: e2e-tests-chainlink-env-${{ github.ref }} + cancel-in-progress: true + +env: + INTERNAL_DOCKER_REPO: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ secrets.QA_AWS_REGION }}.amazonaws.com + ENV_JOB_IMAGE: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ secrets.QA_AWS_REGION }}.amazonaws.com/chainlink-testing-framework-tests:ci.${{ github.sha }} + BASE_IMAGE_NAME: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ secrets.QA_AWS_REGION }}.amazonaws.com/test-base-image:ci.${{ github.sha }} + CHAINLINK_IMAGE: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ secrets.QA_AWS_REGION }}.amazonaws.com/chainlink + CHAINLINK_VERSION: develop + SELECTED_NETWORKS: SIMULATED + CHAINLINK_COMMIT_SHA: ${{ github.sha }} + CHAINLINK_ENV_USER: ${{ github.actor }} + TEST_LOG_LEVEL: debug + +jobs: + build_tests: + runs-on: ubuntu-latest + environment: integration + permissions: + id-token: write + contents: read + steps: + - uses: actions/checkout@v3 + - name: Build Base Image + uses: smartcontractkit/chainlink-github-actions/docker/build-push@ce87f8986ca18336cc5015df75916c2ec0a7c4b3 # v2.1.2 + with: + tags: ${{ env.BASE_IMAGE_NAME }} + file: env/Dockerfile.base + AWS_REGION: ${{ secrets.QA_AWS_REGION }} + AWS_ROLE_TO_ASSUME: ${{ secrets.QA_AWS_ROLE_TO_ASSUME }} + - name: Base Image Built + run: | + # shellcheck disable=SC2086 + cat <>$GITHUB_STEP_SUMMARY + ### chainlink image tag used for this test run :link: => \`${{ env.CHAINLINK_VERSION }}\` + ### test-base-image image tag for this test run :ship: => \`ci.${{ github.sha }}\` + EOT + - name: Build Test Runner + uses: smartcontractkit/chainlink-github-actions/docker/build-push@ce87f8986ca18336cc5015df75916c2ec0a7c4b3 # v2.1.2 + with: + tags: ${{ env.ENV_JOB_IMAGE }} + file: env/Dockerfile + build-args: | + BASE_IMAGE=${{ secrets.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ secrets.QA_AWS_REGION }}.amazonaws.com/test-base-image + IMAGE_VERSION=ci.${{ github.sha }} + AWS_REGION: ${{ secrets.QA_AWS_REGION }} + AWS_ROLE_TO_ASSUME: ${{ secrets.QA_AWS_ROLE_TO_ASSUME }} + - name: Test Image Built + run: | + # shellcheck disable=SC2086 + cat <>$GITHUB_STEP_SUMMARY + ### chainlink-env-tests image tag for this test run :ship: -> \`ci.${{ github.sha }}\` + EOT + e2e_tests: + runs-on: ubuntu-latest + environment: integration + permissions: + id-token: write + contents: read + env: + TEST_SUITE: local-runner + steps: + - uses: actions/checkout@v3 + - name: Run Tests + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@ce87f8986ca18336cc5015df75916c2ec0a7c4b3 # v2.1.2 + with: + cl_repo: ${{ env.CHAINLINK_IMAGE }} + cl_image_tag: ${{ env.CHAINLINK_VERSION }} + test_command_to_run: unset ENV_JOB_IMAGE && cd env && make test_e2e_ci + test_download_vendor_packages_command: go mod download + artifacts_location: ./e2e/logs + publish_check_name: E2E Test Results + token: ${{ secrets.GITHUB_TOKEN }} + go_mod_path: go.mod + QA_AWS_REGION: ${{ secrets.QA_AWS_REGION }} + QA_AWS_ROLE_TO_ASSUME: ${{ secrets.QA_AWS_ROLE_TO_ASSUME }} + QA_KUBECONFIG: ${{ secrets.QA_KUBECONFIG }} + - name: Upload test log + uses: actions/upload-artifact@v3 + if: failure() + with: + name: test-log + path: /tmp/gotest.log + + e2e_remote_runner_tests: + runs-on: ubuntu-latest + environment: integration + needs: [build_tests] + permissions: + id-token: write + contents: read + env: + TEST_SUITE: remote-runner + TEST_TRIGGERED_BY: chainlink-env-remote-runner-ci + steps: + - uses: actions/checkout@v3 + - name: Run Remote Runner Tests + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@ce87f8986ca18336cc5015df75916c2ec0a7c4b3 # v2.1.2 + with: + cl_repo: ${{ env.CHAINLINK_IMAGE }} + cl_image_tag: ${{ env.CHAINLINK_VERSION }} + test_command_to_run: cd env && make test_e2e_ci_remote_runner + test_download_vendor_packages_command: go mod download + artifacts_location: ./e2e/logs + publish_check_name: E2E Remote Runner Test Results + token: ${{ secrets.GITHUB_TOKEN }} + go_mod_path: go.mod + QA_AWS_REGION: ${{ secrets.QA_AWS_REGION }} + QA_AWS_ROLE_TO_ASSUME: ${{ secrets.QA_AWS_ROLE_TO_ASSUME }} + QA_KUBECONFIG: ${{ secrets.QA_KUBECONFIG }} + - name: Upload test log + uses: actions/upload-artifact@v2 + if: failure() + with: + name: remote-runner-test-log + path: /tmp/remoterunnergotest.log diff --git a/.github/workflows/env-publish-test-base-image.yaml b/.github/workflows/env-publish-test-base-image.yaml new file mode 100644 index 000000000..d0d6cd7e3 --- /dev/null +++ b/.github/workflows/env-publish-test-base-image.yaml @@ -0,0 +1,27 @@ +name: Publish Test Base Image (Env) +on: + push: + tags: + - 'v*' + paths: + - "env/**" + +jobs: + publish_test_base_image: + if: ${{ false }} + runs-on: ubuntu-latest + environment: integration + permissions: + id-token: write + contents: read + env: + BASE_IMAGE_TAG: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ secrets.QA_AWS_REGION }}.amazonaws.com/test-base-image:${{ github.ref_name }} + steps: + - uses: actions/checkout@v3 + - name: Build Base Image + uses: smartcontractkit/chainlink-github-actions/docker/build-push@cb4a8f51d77cbf77ea6a765bd1f437ffc7a18730 # v2.0.28 + with: + tags: ${{ env.BASE_IMAGE_TAG }} + file: env/Dockerfile.base + AWS_REGION: ${{ secrets.QA_AWS_REGION }} + AWS_ROLE_TO_ASSUME: ${{ secrets.QA_AWS_ROLE_TO_ASSUME }} diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 9c2764a3f..2eeaa6dbc 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -29,7 +29,9 @@ jobs: PATH=$PATH:$(go env GOPATH)/bin export PATH set -euo pipefail - go test -json -cover -covermode=count -coverprofile=unit-test-coverage.out ./... 2>&1 | tee /tmp/gotest.log | gotestfmt + # disabled, because we want to use a multiline output of go list command + # shellcheck disable=SC2046 + go test -json -cover -covermode=count -coverprofile=unit-test-coverage.out $(go list ./... | grep -v /env/e2e/ | grep -v /env/examples/) 2>&1 | tee /tmp/gotest.log | gotestfmt - name: Code Coverage uses: codecov/codecov-action@v3 with: diff --git a/.gitignore b/.gitignore index 2ddd1b7d7..2ed86f9c3 100644 --- a/.gitignore +++ b/.gitignore @@ -54,4 +54,14 @@ docs/Gemfile.lock dist/ **/remote_runner_config.yaml -logs/ \ No newline at end of file +logs/ + +env/cmd/chaos +env/bin/ +# temp manifest for deployment and validation +tmp-manifest-*.yaml +# remote runner binary +remote.test +e2e.test + +k3dvolume/ \ No newline at end of file diff --git a/.golangci.yaml b/.golangci.yaml index 8f3dc690c..c5d94bee7 100644 --- a/.golangci.yaml +++ b/.golangci.yaml @@ -3,6 +3,8 @@ run: timeout: 5m skip-dirs: - contracts/ethereum + - examples + - imports linters: enable: # defaults diff --git a/.tool-versions b/.tool-versions index cd9c3faf7..a8994708c 100644 --- a/.tool-versions +++ b/.tool-versions @@ -1,7 +1,10 @@ golang 1.21.3 nodejs 14.20.0 -k3d 5.4.6 +k3d 5.5.1 act 0.2.30 golangci-lint 1.54.2 actionlint 1.6.17 shellcheck 0.9.0 +helm 3.10.3 +kubectl 1.25.5 +yarn 1.22.19 \ No newline at end of file diff --git a/Makefile b/Makefile index 82e051f44..cfed3dd39 100644 --- a/Makefile +++ b/Makefile @@ -55,4 +55,4 @@ compile_contracts: python3 ./utils/compile_contracts.py test_unit: install_gotestfmt - go test -json -cover -covermode=count -coverprofile=unit-test-coverage.out ./client ./gauntlet ./testreporters ./docker/test_env 2>&1 | tee /tmp/gotest.log | gotestfmt + go test -json -cover -covermode=count -coverprofile=unit-test-coverage.out ./client ./gauntlet ./testreporters ./docker/test_env ./env/config 2>&1 | tee /tmp/gotest.log | gotestfmt diff --git a/README.md b/README.md index e44609413..3d30f1e08 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,6 @@ -The Chainlink Testing Framework is a blockchain development framework written in Go. Its primary purpose is to help chainlink developers create extensive integration, e2e, performance, and chaos tests to ensure the stability of the chainlink project. It can also be helpful to those who just want to use chainlink oracles in their projects to help test their contracts, or even for those that aren't using chainlink. This project makes ample use of the [chainlink-env](https://github.com/smartcontractkit/chainlink-env) package to launch resources and testing apparatus. +The Chainlink Testing Framework is a blockchain development framework written in Go. Its primary purpose is to help chainlink developers create extensive integration, e2e, performance, and chaos tests to ensure the stability of the chainlink project. It can also be helpful to those who just want to use chainlink oracles in their projects to help test their contracts, or even for those that aren't using chainlink. If you're looking to implement a new chain integration for the testing framework, head over to the [blockchain](./blockchain/) directory for more info. diff --git a/blockchain/ethereum.go b/blockchain/ethereum.go index 3b229de48..fb03bd3b6 100644 --- a/blockchain/ethereum.go +++ b/blockchain/ethereum.go @@ -26,7 +26,7 @@ import ( "go.uber.org/atomic" "golang.org/x/sync/errgroup" - "github.com/smartcontractkit/chainlink-env/environment" + "github.com/smartcontractkit/chainlink-testing-framework/env/environment" "github.com/smartcontractkit/chainlink-testing-framework/utils" ) diff --git a/client/mockserver.go b/client/mockserver.go index e379bdf24..96d7f8b2c 100644 --- a/client/mockserver.go +++ b/client/mockserver.go @@ -6,10 +6,10 @@ import ( "strings" "github.com/go-resty/resty/v2" - "github.com/rs/zerolog/log" - "github.com/smartcontractkit/chainlink-env/environment" - "github.com/smartcontractkit/chainlink-env/pkg/helm/mockserver" + + "github.com/smartcontractkit/chainlink-testing-framework/env/environment" + "github.com/smartcontractkit/chainlink-testing-framework/env/pkg/helm/mockserver" ) // MockserverClient mockserver client diff --git a/client/postgres.go b/client/postgres.go index cfa434211..8aad98507 100644 --- a/client/postgres.go +++ b/client/postgres.go @@ -5,11 +5,11 @@ import ( "strings" "github.com/jmoiron/sqlx" - "github.com/smartcontractkit/chainlink-env/environment" - // import for side effect of sql packages _ "github.com/lib/pq" "github.com/rs/zerolog/log" + + "github.com/smartcontractkit/chainlink-testing-framework/env/environment" ) // PostgresConnector sqlx postgres connector diff --git a/docs/index.md b/docs/index.md index 9c468f78d..73651051a 100755 --- a/docs/index.md +++ b/docs/index.md @@ -22,6 +22,5 @@ Here you'll find some guidelines on writing blockchain tests using this framewor Some notable packages we use include: -* [chainlink-env](https://github.com/smartcontractkit/chainlink-env) * [zerolog](https://github.com/rs/zerolog) * [Kubernetes](https://github.com/kubernetes/kubernetes) diff --git a/docs/setup/code.md b/docs/setup/code.md index 7cdcc3509..e4abbe218 100644 --- a/docs/setup/code.md +++ b/docs/setup/code.md @@ -7,11 +7,11 @@ parent: Setup # Test Setup Code -Now that we've got our config and Kubernetes sorted, we can write a bit of code that will deploy an environment for our test to run. To deploy our simulated geth, mock-server, and Chainlink instances, we rely on another chainlink library, [chainlink-env](https://github.com/smartcontractkit/chainlink-env/). This library handles deploying everything our test needs to the Kubernetes cluster. +Now that we've got our config and Kubernetes sorted, we can write a bit of code that will deploy an environment for our test to run. To deploy our simulated geth, mock-server, and Chainlink instances, we rely on `env` package. This package handles deploying everything our test needs to the Kubernetes cluster. ```go -// We use the chainlink-env library to make and handle deployed resources -import "github.com/smartcontractkit/chainlink-env/environment" +// We use the env package to make and handle deployed resources +import "github.com/smartcontractkit/chainlink-testing-framework/env/environment" // Deploy a testing environment, and receive it as the `env` variable. This is used to connect to resources. e = environment.New(nil) diff --git a/env/.gitignore b/env/.gitignore new file mode 100644 index 000000000..b0fc52df4 --- /dev/null +++ b/env/.gitignore @@ -0,0 +1,13 @@ +cmd/chaos +bin/ +# temp manifest for deployment and validation +tmp-manifest-*.yaml +# remote runner binary +remote.test +e2e.test + +.vscode/ +.idea/ +.direnv/ + +k3dvolume/ \ No newline at end of file diff --git a/env/.goreleaser.yml b/env/.goreleaser.yml new file mode 100644 index 000000000..69756fd2a --- /dev/null +++ b/env/.goreleaser.yml @@ -0,0 +1,53 @@ +project_name: chainlink-env + +release: + github: + owner: smartcontractkit + name: chainlink-env + +builds: + - binary: chainlink-env + goos: + - darwin + - linux + goarch: + - amd64 + - arm64 + goarm: + - 6 + - 7 + gomips: + - hardfloat + env: + - CGO_ENABLED=0 + main: cmd/wizard/chainlink-env.go + flags: + - -trimpath + ldflags: -s -w -X main.version={{.Version}} -X main.commit={{.ShortCommit}} -X main.date={{.Date}} + +archives: + - format: tar.gz + wrap_in_directory: true + name_template: '{{ .ProjectName }}-{{ .Version }}-{{ .Os }}-{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}' + files: + - LICENSE + - README.md + +snapshot: + name_template: SNAPSHOT-{{ .Commit }} + +checksum: + name_template: '{{ .ProjectName }}-{{ .Version }}-checksums.txt' + +changelog: + sort: asc + filters: + exclude: + - '(?i)^docs?:' + - '(?i)^docs\([^:]+\):' + - '(?i)^docs\[[^:]+\]:' + - '^tests?:' + - '(?i)^dev:' + - '^build\(deps\): bump .* in /docs \(#\d+\)' + - Merge pull request + - Merge branch diff --git a/env/.tool-versions b/env/.tool-versions new file mode 100644 index 000000000..dc99022a3 --- /dev/null +++ b/env/.tool-versions @@ -0,0 +1,7 @@ +golang 1.21.1 +helm 3.10.3 +golangci-lint 1.51.1 +kubectl 1.25.5 +nodejs 18.13.0 +yarn 1.22.19 +k3d 5.5.1 diff --git a/env/Dockerfile b/env/Dockerfile new file mode 100644 index 000000000..7c848c61c --- /dev/null +++ b/env/Dockerfile @@ -0,0 +1,7 @@ +ARG BASE_IMAGE +ARG IMAGE_VERSION=latest +FROM ${BASE_IMAGE}:${IMAGE_VERSION} +COPY . testdir/ +WORKDIR /go/testdir +RUN ./env/scripts/buildTests +ENTRYPOINT ["./env/scripts/entrypoint"] diff --git a/env/Dockerfile.base b/env/Dockerfile.base new file mode 100644 index 000000000..8285ad4ef --- /dev/null +++ b/env/Dockerfile.base @@ -0,0 +1,39 @@ +# base test for all k8s test runs +FROM golang:1.21-bullseye + +ARG BASE_URL +ARG HELM_VERSION +ARG HOME +ARG KUBE_VERSION +ARG NODE_VERSION + +ENV GOOS="linux" +ENV BASE_URL="https://get.helm.sh" +ENV HELM_VERSION="3.10.3" +ENV KUBE_VERSION="v1.25.5" +ENV NODE_VERSION=18 + +RUN curl -sL https://deb.nodesource.com/setup_${NODE_VERSION}.x | bash - && \ + apt-get update && apt-get install -y nodejs wget curl git gnupg && \ + curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl && \ + chmod +x ./kubectl && \ + mv ./kubectl /usr/local/bin && \ + case `uname -m` in \ + x86_64) ARCH=amd64; ;; \ + armv7l) ARCH=arm; ;; \ + aarch64) ARCH=arm64; ;; \ + ppc64le) ARCH=ppc64le; ;; \ + s390x) ARCH=s390x; ;; \ + *) echo "un-supported arch, exit ..."; exit 1; ;; \ + esac && \ + wget ${BASE_URL}/helm-v${HELM_VERSION}-linux-${ARCH}.tar.gz -O - | tar -xz && \ + mv linux-${ARCH}/helm /usr/bin/helm && \ + chmod +x /usr/bin/helm && \ + rm -rf linux-${ARCH} && \ + npm install -g yarn && \ + apt-get clean all && \ + helm repo add chainlink-qa https://raw.githubusercontent.com/smartcontractkit/qa-charts/gh-pages/ && \ + helm repo add bitnami https://charts.bitnami.com/bitnami && \ + helm repo update + +ENTRYPOINT ["sh"] diff --git a/env/KUBERNETES.md b/env/KUBERNETES.md new file mode 100644 index 000000000..ed3dc4fe8 --- /dev/null +++ b/env/KUBERNETES.md @@ -0,0 +1,26 @@ +# Kubernetes +We run our software in Kubernetes. + +### Local k3d setup + +1. `make install` +2. (Optional) Install `Lens` from [here](https://k8slens.dev/) or use `k9s` as a low resource consumption alternative from [here](https://k9scli.io/topics/install/) +or from source [here](https://github.com/smartcontractkit/helmenv) +3. Setup your docker resources, 6vCPU/10Gb RAM are enough for most CL related tasks +4. `make create_cluster` +5. `make install_monitoring` +6. Check your contexts with `kubectl config get-contexts` +7. Switch context `kubectl config use-context k3d-local` +8. Read [here](README.md) and do some deployments +9. Open Grafana on `localhost:3000` with `admin/sdkfh26!@bHasdZ2` login/password and check the default dashboard +10. `make stop_cluster` +11. `make delete_cluster` + +### Typical problems +1. Not enough memory/CPU or cluster is slow + Recommended settings for Docker are (Docker -> Preferences -> Resources): + - 6 CPU + - 10Gb MEM + - 50-150Gb Disk +2. `NodeHasDiskPressure` errors, pods get evicted + Use `make docker_prune` to clean up all pods and volumes \ No newline at end of file diff --git a/env/LICENSE b/env/LICENSE new file mode 100644 index 000000000..8fedaaa98 --- /dev/null +++ b/env/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2022 SmartContract ChainLink, Ltd. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/env/Makefile b/env/Makefile new file mode 100644 index 000000000..af6b03c43 --- /dev/null +++ b/env/Makefile @@ -0,0 +1,96 @@ +BIN_DIR = bin +export GOPATH ?= $(shell go env GOPATH) +export GO111MODULE ?= on +CDK8S_CLI_VERSION=2.1.48 + +.PHONY: lint +lint: + golangci-lint --color=always run -v + +.PHONY: docker_prune +docker_prune: + docker system prune -a -f + docker volume prune -f + +.PHONY: install_deps +install_deps: + asdf plugin-add nodejs || true + asdf plugin-add yarn || true + asdf plugin-add golang || true + asdf plugin-add k3d || true + asdf plugin-add helm || true + asdf plugin-add kubectl || true + asdf plugin-add golangci-lint || true + asdf install + mkdir /tmp/k3dvolume/ || true + yarn global add cdk8s-cli@$(CDK8S_CLI_VERSION) + curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash + helm repo add chainlink-qa https://raw.githubusercontent.com/smartcontractkit/qa-charts/gh-pages/ + helm repo add grafana https://grafana.github.io/helm-charts + helm repo update + +.PHONY: create_cluster +create_cluster: + k3d cluster create local --config k3d.yaml + +.PHONY: start_cluster +start_cluster: + k3d cluster start local + +.PHONY: stop_cluster +stop_cluster: + k3d cluster stop local + +.PHONY: stop_cluster +delete_cluster: + k3d cluster delete local + +.PHONY: install_monitoring +install_monitoring: + helm repo add grafana https://grafana.github.io/helm-charts + helm repo update + kubectl create namespace monitoring || true + helm upgrade --wait --namespace monitoring --install loki grafana/loki-stack --set grafana.enabled=true,prometheus.enabled=true,prometheus.alertmanager.persistentVolume.enabled=false,prometheus.server.persistentVolume.enabled=false,loki.persistence.enabled=false --values grafana/values.yml + kubectl port-forward --namespace monitoring service/loki-grafana 3000:80 + +.PHONY: uninstall_monitoring +uninstall_monitoring: + helm uninstall --namespace monitoring loki + +.PHONY: build_test_base_image +build_test_base_image: + ./scripts/buildBaseImage "$(tag)" + +.PHONY: build_test_image +build_test_image: + ./scripts/buildTestImage "$(tag)" "$(base_tag)" + +.PHONY: test +test: + go test -race ./config -count 1 -v + +.PHONY: test_e2e +test_e2e: + go test ./e2e/local-runner -count 1 -test.parallel=12 -v $(args) + +test_e2e_ci: + go test ./e2e/local-runner -count 1 -v -test.parallel=14 -test.timeout=1h -json 2>&1 | tee /tmp/gotest.log | gotestfmt + +test_e2e_ci_remote_runner: + go test ./e2e/remote-runner -count 1 -v -test.parallel=16 -test.timeout=1h -json 2>&1 | tee /tmp/remoterunnergotest.log | gotestfmt + +.PHONY: examples +examples: + go run cmd/test.go + +.PHONY: chaosmesh +chaosmesh: ## there is currently a bug on JS side to import all CRDs from one yaml file, also a bug with stdin, so using cluster directly trough file + kubectl get crd networkchaos.chaos-mesh.org -o json > tmp.json && cdk8s import -o imports/k8s/networkchaos tmp.json + kubectl get crd stresschaos.chaos-mesh.org -o json > tmp.json && cdk8s import -o imports/k8s/stresschaos tmp.json + kubectl get crd timechaos.chaos-mesh.org -o json > tmp.json && cdk8s import -o imports/k8s/timechaos tmp.json + kubectl get crd podchaos.chaos-mesh.org -o json > tmp.json && cdk8s import -o imports/k8s/podchaos tmp.json + kubectl get crd podiochaos.chaos-mesh.org -o json > tmp.json && cdk8s import -o imports/k8s/podiochaos tmp.json + kubectl get crd httpchaos.chaos-mesh.org -o json > tmp.json && cdk8s import -o imports/k8s/httpchaos tmp.json + kubectl get crd iochaos.chaos-mesh.org -o json > tmp.json && cdk8s import -o imports/k8s/iochaos tmp.json + kubectl get crd podnetworkchaos.chaos-mesh.org -o json > tmp.json && cdk8s import -o imports/k8s/podnetworkchaos tmp.json + rm -rf tmp.json \ No newline at end of file diff --git a/env/README.md b/env/README.md new file mode 100644 index 000000000..51469fb76 --- /dev/null +++ b/env/README.md @@ -0,0 +1,49 @@ +## Chainlink environment +This is an environment library we are using in tests, it provides: +- [cdk8s](https://cdk8s.io/) based wrappers +- High-level k8s API +- Automatic port forwarding + +You can also use this library to spin up standalone environments + +### Local k8s cluster +Read [here](KUBERNETES.md) about how to spin up a local cluster + +#### Install +Set up deps, you need to have `node 14.x.x`, [helm](https://helm.sh/docs/intro/install/) and [yarn](https://classic.yarnpkg.com/lang/en/docs/install/#mac-stable) + +Then use +```shell +make install_deps +``` + +### Usage +Create an env in a separate file and run it +``` +export CHAINLINK_IMAGE="public.ecr.aws/chainlink/chainlink" +export CHAINLINK_TAG="1.4.0-root" +export CHAINLINK_ENV_USER="Satoshi" +go run examples/simple/env.go +``` +For more features follow [tutorial](./TUTORIAL.md) + +# Develop +#### Running standalone example environment +```shell +go run examples/simple/env.go +``` +If you have another env of that type, you can connect by overriding environment name +``` +ENV_NAMESPACE="..." go run examples/chainlink/env.go +``` + +Add more presets [here](./presets) + +Add more programmatic examples [here](./examples/) + +If you have [chaosmesh]() installed in your cluster you can pull and generated CRD in go like that +``` +make chaosmesh +``` + +If you need to check your system tests coverage, use [that](TUTORIAL.md#coverage) \ No newline at end of file diff --git a/env/REMOTE_RUN.md b/env/REMOTE_RUN.md new file mode 100644 index 000000000..bd3faf5ac --- /dev/null +++ b/env/REMOTE_RUN.md @@ -0,0 +1,30 @@ +## How to run the same environment deployment inside k8s + +You can build a `Dockerfile` to run exactly the same environment interactions inside k8s in case you need to run long-running tests +Base image is [here](Dockerfile.base) +```Dockerfile +FROM .dkr.ecr.us-west-2.amazonaws.com/test-base-image:latest +COPY . . +RUN env GOOS=linux GOARCH=amd64 go build -o test ./examples/remote-test-runner/env.go +RUN chmod +x ./test +ENTRYPOINT ["./test"] +``` +Build and upload it using the "latest" tag for the test-base-image +```bash +build_test_image tag=someTag +``` +or if you want to specify a test-base-image tag +```bash +build_test_image tag=someTag base_tag=latest +``` +Then run it +```bash +# all environment variables with a prefix TEST_ would be provided for k8s job +export TEST_ENV_VAR=myTestVarForAJob +# your image to run as a k8s job +ACCOUNT=$(aws sts get-caller-identity | jq -r .Account) +export ENV_JOB_IMAGE="${ACCOUNT}.dkr.ecr.us-west-2.amazonaws.com/core-integration-tests:v1.1" +# your example test file to run inside k8s +# if ENV_JOB_IMAGE is present it will create a job, wait until it finished and get logs +go run examples/remote-test-runner/env.go +``` \ No newline at end of file diff --git a/env/TUTORIAL.md b/env/TUTORIAL.md new file mode 100644 index 000000000..177e95144 --- /dev/null +++ b/env/TUTORIAL.md @@ -0,0 +1,592 @@ +# How to create environments + +- [Getting started](#getting-started) +- [Connect to environment](#connect-to-environment) +- [Creating environments](#creating-environments) + - [Debugging a new integration environment](#debugging-a-new-integration-environment) + - [Creating a new deployment part in Helm](#creating-a-new-deployment-part-in-helm) + - [Creating a new deployment part in cdk8s](#creating-a-new-deployment-part-in-cdk8s) + - [Using multi-stage environment](#using-multi-stage-environment) +- [Modifying environments](#modifying-environments) + - [Modifying environment from code](#modifying-environment-from-code) + - [Modifying environment part from code](#modifying-environment-part-from-code) +- [Configuring](#configuring) + - [Environment variables](#environment-variables) + - [Environment config](#environment-config) +- [Utilities](#utilities) + - [Collecting logs](#collecting-logs) + - [Resources summary](#resources-summary) +- [Chaos](#chaos) +- [Coverage](#coverage) +- [Remote run](./REMOTE_RUN.md) + +## Getting started + +Read [here](KUBERNETES.md) about how to spin up a local cluster if you don't have one + +Let's create a simple environment by combining different deployment parts + +Create `examples/simple/env.go` + +```golang +package main + +import ( + "fmt" + "github.com/smartcontractkit/chainlink-testing-framework/env/environment" + "github.com/smartcontractkit/chainlink-testing-framework/env/pkg" + "github.com/smartcontractkit/chainlink-testing-framework/env/pkg/helm/chainlink" + "github.com/smartcontractkit/chainlink-testing-framework/env/pkg/helm/ethereum" + "github.com/smartcontractkit/chainlink-testing-framework/env/pkg/helm/mockserver" +) + +func main() { + err := environment.New(&environment.Config{ + KeepConnection: false, + RemoveOnInterrupt: false, + }). + AddHelm(ethereum.New(nil)). + AddHelm(chainlink.New(0, nil)). + Run() + if err != nil { + panic(err) + } +} +``` + +Then run `go run examples/simple/env.go` + +Now you have your environment running, you can [connect](#connect-to-environment) to it later + +## Connect to environment + +We've already created an environment [previously](#getting-started), now we can connect + +If you are planning to use environment locally not in tests and keep connection, modify `KeepConnection` in `environment.Config` we used + +``` + KeepConnection: true, +``` + +Add `ENV_NAMESPACE=${your_env_namespace}` var and run `go run examples/simple/env.go` again + +You can get the namespace name from logs on creation time + +# Creating environments + +## Debugging a new integration environment + +You can spin up environment and block on forwarder if you'd like to run some other code + +```golang +package main + +import ( + "github.com/smartcontractkit/chainlink-testing-framework/env/environment" + "github.com/smartcontractkit/chainlink-testing-framework/env/pkg/helm/chainlink" + "github.com/smartcontractkit/chainlink-testing-framework/env/pkg/helm/ethereum" +) + +func main() { + err := environment.New(&environment.Config{ + Labels: []string{"type=construction-in-progress"}, + NamespacePrefix: "new-environment", + KeepConnection: true, + RemoveOnInterrupt: true, + }). + AddHelm(ethereum.New(nil)). + AddHelm(chainlink.New(0, nil)). + Run() + if err != nil { + panic(err) + } +} +``` + +Send any signal to remove the namespace then, for example `Ctrl+C` `SIGINT` + +## Creating a new deployment part in Helm + +Let's add a new [deployment part](examples/deployment_part/sol.go), it should implement an interface + +```golang +// ConnectedChart interface to interact both with cdk8s apps and helm charts +type ConnectedChart interface { + // IsDeploymentNeeded + // true - we deploy/connect and expose environment data + // false - we are using external environment, but still exposing data + IsDeploymentNeeded() bool + // GetName name of the deployed part + GetName() string + // GetPath get Helm chart path, repo or local path + GetPath() string + // GetProps get code props if it's typed environment + GetProps() any + // GetValues get values.yml props as map, if it's Helm + GetValues() *map[string]any + // ExportData export deployment part data in the env + ExportData(e *Environment) error +} +``` + +When creating new deployment part, you can use any public Helm chart or a local path in Helm props + +```golang +func New(props *Props) environment.ConnectedChart { + if props == nil { + props = defaultProps() + } + return Chart{ + HelmProps: &HelmProps{ + Name: "sol", + Path: "chainlink-qa/solana-validator", // ./local_path/chartdir will work too + Values: &props.Values, + }, + Props: props, + } +} +``` + +Now let's tie them together + +```golang +package main + +import ( + "github.com/smartcontractkit/chainlink-testing-framework/env/environment" + "github.com/smartcontractkit/chainlink-testing-framework/env/examples/deployment_part" + "github.com/smartcontractkit/chainlink-testing-framework/env/pkg/helm/chainlink" + "time" +) + +func main() { + e := environment.New(&environment.Config{ + NamespacePrefix: "adding-new-deployment-part", + TTL: 3 * time.Hour, + KeepConnection: true, + RemoveOnInterrupt: true, + }). + AddHelm(deployment_part.New(nil)). + AddHelm(chainlink.New(0, map[string]any{ + "replicas": 5, + "env": map[string]any{ + "SOLANA_ENABLED": "true", + "EVM_ENABLED": "false", + "EVM_RPC_ENABLED": "false", + "CHAINLINK_DEV": "false", + "FEATURE_OFFCHAIN_REPORTING2": "true", + "feature_offchain_reporting": "false", + "P2P_NETWORKING_STACK": "V2", + "P2PV2_LISTEN_ADDRESSES": "0.0.0.0:6690", + "P2PV2_DELTA_DIAL": "5s", + "P2PV2_DELTA_RECONCILE": "5s", + "p2p_listen_port": "0", + }, + })) + if err := e.Run(); err != nil { + panic(err) + } +} +``` + +Then run it `examples/deployment_part/cmd/env.go` + +## Creating a new deployment part in cdk8s + +Let's add a new [deployment part](examples/deployment_part/sol.go), it should implement the same interface + +```golang +// ConnectedChart interface to interact both with cdk8s apps and helm charts +type ConnectedChart interface { + // IsDeploymentNeeded + // true - we deploy/connect and expose environment data + // false - we are using external environment, but still exposing data + IsDeploymentNeeded() bool + // GetName name of the deployed part + GetName() string + // GetPath get Helm chart path, repo or local path + GetPath() string + // GetProps get code props if it's typed environment + GetProps() any + // GetValues get values.yml props as map, if it's Helm + GetValues() *map[string]any + // ExportData export deployment part data in the env + ExportData(e *Environment) error +} +``` +Now let's tie them together + +```golang +package main + +import ( + "github.com/smartcontractkit/chainlink-testing-framework/env/environment" + "github.com/smartcontractkit/chainlink-testing-framework/env/examples/deployment_part_cdk8s" + "github.com/smartcontractkit/chainlink-testing-framework/env/pkg/helm/chainlink" + "github.com/smartcontractkit/chainlink-testing-framework/env/pkg/helm/ethereum" +) + +func main() { + e := environment.New(nil). + AddChart(deployment_part_cdk8s.New(&deployment_part_cdk8s.Props{})). + AddHelm(ethereum.New(nil)). + AddHelm(chainlink.New(0, map[string]any{ + "replicas": 2, + })) + if err := e.Run(); err != nil { + panic(err) + } + e.Shutdown() +} +``` + +Then run it `examples/deployment_part_cdk8s/cmd/env.go` + +## Using multi-stage environment + +You can split [environment](examples/multistage/env.go) deployment in several parts if you need to first copy something into a pod or use connected clients first + +```golang +package main + +import ( + "fmt" + "github.com/smartcontractkit/chainlink-testing-framework/env/environment" + "github.com/smartcontractkit/chainlink-testing-framework/env/pkg/cdk8s/blockscout" + "github.com/smartcontractkit/chainlink-testing-framework/env/pkg/helm/chainlink" + "github.com/smartcontractkit/chainlink-testing-framework/env/pkg/helm/ethereum" + "github.com/smartcontractkit/chainlink-testing-framework/env/pkg/helm/mockserver" + mockservercfg "github.com/smartcontractkit/chainlink-testing-framework/env/pkg/helm/mockserver-cfg" +) + +func main() { + e := environment.New(nil) + err := e. + AddChart(blockscout.New(&blockscout.Props{})). // you can also add cdk8s charts if you like Go code + AddHelm(ethereum.New(nil)). + AddHelm(chainlink.New(0, nil)). + Run() + if err != nil { + panic(err) + } + // do some other stuff with deployed charts + pl, err := e.Client.ListPods(e.Cfg.Namespace, "app=chainlink-0") + if err != nil { + panic(err) + } + dstPath := fmt.Sprintf("%s/%s:/", e.Cfg.Namespace, pl.Items[0].Name) + if _, _, _, err = e.Client.CopyToPod(e.Cfg.Namespace, "./examples/multistage/someData.txt", dstPath, "node"); err != nil { + panic(err) + } + // deploy another part + err = e. + AddHelm(mockservercfg.New(nil)). + AddHelm(mockserver.New(nil)). + Run() + defer func() { + errr := e.Shutdown() + panic(errr) + }() + if err != nil { + panic(err) + } +} +``` + +# Modifying environments + +## Modifying environment from code + +In case you need to [modify](examples/modify_cdk8s/env.go) environment in tests you can always construct manifest again and apply it + +That's working for `cdk8s` components too + +```golang +package main + +import ( + "fmt" + "github.com/smartcontractkit/chainlink-testing-framework/env/environment" + "github.com/smartcontractkit/chainlink-testing-framework/env/pkg/cdk8s/blockscout" + "github.com/smartcontractkit/chainlink-testing-framework/env/pkg/helm/chainlink" + "github.com/smartcontractkit/chainlink-testing-framework/env/pkg/helm/ethereum" +) + +func main() { + e := environment.New(&environment.Config{ + NamespacePrefix: "modified-env", + Labels: []string{fmt.Sprintf("envType=Modified")}, + }). + AddChart(blockscout.New(&blockscout.Props{ + WsURL: "ws://geth:8546", + HttpURL: "http://geth:8544", + })). + AddHelm(ethereum.New(nil)). + AddHelm(chainlink.New(0, map[string]any{ + "replicas": 1, + })) + err := e.Run() + if err != nil { + panic(err) + } + e.ClearCharts() + err = e. + AddChart(blockscout.New(&blockscout.Props{ + HttpURL: "http://geth:9000", + })). + AddHelm(ethereum.New(nil)). + AddHelm(chainlink.New(0, map[string]any{ + "replicas": 1, + })). + Run() + if err != nil { + panic(err) + } +} +``` + +## Modifying environment part from code + +We can [modify](examples/modify_helm/env.go) only a part of environment + +```golang +package main + +import ( + "fmt" + "github.com/smartcontractkit/chainlink-testing-framework/env/environment" + "github.com/smartcontractkit/chainlink-testing-framework/env/pkg/helm/chainlink" + "github.com/smartcontractkit/chainlink-testing-framework/env/pkg/helm/ethereum" + "github.com/smartcontractkit/chainlink-testing-framework/env/pkg/helm/mockserver" + mockservercfg "github.com/smartcontractkit/chainlink-testing-framework/env/pkg/helm/mockserver-cfg" +) + +func main() { + e := environment.New(&environment.Config{ + NamespacePrefix: "modified-env", + Labels: []string{fmt.Sprintf("envType=Modified")}, + }). + AddHelm(mockservercfg.New(nil)). + AddHelm(mockserver.New(nil)). + AddHelm(ethereum.New(nil)). + AddHelm(chainlink.New(0, map[string]any{ + "replicas": 1, + })) + err := e.Run() + if err != nil { + panic(err) + } + e.Cfg.KeepConnection = true + e.Cfg.RemoveOnInterrupt = true + e, err = e. + ReplaceHelm("chainlink-0", chainlink.New(0, map[string]any{ + "replicas": 2, + })) + if err != nil { + panic(err) + } + err = e.Run() + if err != nil { + panic(err) + } +} +``` + +# Configuring + +## Environment variables + +List of environment variables available + +```golang +const ( + EnvVarNamespace = "ENV_NAMESPACE" + EnvVarNamespaceDescription = "Namespace name to connect to" + EnvVarNamespaceExample = "chainlink-test-epic" + + EnvVarCLImage = "CHAINLINK_IMAGE" + EnvVarCLImageDescription = "Chainlink image repository" + EnvVarCLImageExample = "public.ecr.aws/chainlink/chainlink" + + EnvVarCLTag = "CHAINLINK_VERSION" + EnvVarCLTagDescription = "Chainlink image tag" + EnvVarCLTagExample = "1.5.1-root" + + EnvVarUser = "CHAINLINK_ENV_USER" + EnvVarUserDescription = "Owner of an environment" + EnvVarUserExample = "Satoshi" + + EnvVarCLCommitSha = "CHAINLINK_COMMIT_SHA" + EnvVarCLCommitShaDescription = "The sha of the commit that you're running tests on. Mostly used for CI" + EnvVarCLCommitShaExample = "${{ github.sha }}" + + EnvVarTestTrigger = "TEST_TRIGGERED_BY" + EnvVarTestTriggerDescription = "How the test was triggered, either manual or CI." + EnvVarTestTriggerExample = "CI" + + EnvVarLogLevel = "TEST_LOG_LEVEL" + EnvVarLogLevelDescription = "Environment logging level" + EnvVarLogLevelExample = "info | debug | trace" + + EnvVarSlackKey = "SLACK_API_KEY" + EnvVarSlackKeyDescription = "The OAuth Slack API key to report tests results with" + EnvVarSlackKeyExample = "xoxb-example-key" + + EnvVarSlackChannel = "SLACK_CHANNEL" + EnvVarSlackChannelDescription = "The Slack code for the channel you want to send the notification to" + EnvVarSlackChannelExample = "C000000000" + + EnvVarSlackUser = "SLACK_USER" + EnvVarSlackUserDescription = "The Slack code for the user you want to notify" + EnvVarSlackUserExample = "U000000000" +) +``` +### Environment config + +```golang +// Config is an environment common configuration, labels, annotations, connection types, readiness check, etc. +type Config struct { + // TTL is time to live for the environment, used with kube-janitor + TTL time.Duration + // NamespacePrefix is a static namespace prefix + NamespacePrefix string + // Namespace is full namespace name + Namespace string + // Labels is a set of labels applied to the namespace in a format of "key=value" + Labels []string + nsLabels *map[string]*string + // ReadyCheckData is settings for readiness probes checks for all deployment components + // checking that all pods are ready by default with 8 minutes timeout + // &client.ReadyCheckData{ + // ReadinessProbeCheckSelector: "", + // Timeout: 15 * time.Minute, + // } + ReadyCheckData *client.ReadyCheckData + // DryRun if true, app will just generate a manifest in local dir + DryRun bool + // InsideK8s used for long-running soak tests where you connect to env from the inside + InsideK8s bool + // KeepConnection keeps connection until interrupted with a signal, useful when prototyping and debugging a new env + KeepConnection bool + // RemoveOnInterrupt automatically removes an environment on interrupt + RemoveOnInterrupt bool +} +``` + +# Utilities + +## Collecting logs + +You can collect the [logs](examples/dump/env.go) while running tests, or if you have created an enrionment [already](#connect-to-environment) + +```golang +package main + +import ( + "github.com/smartcontractkit/chainlink-testing-framework/env/environment" + "github.com/smartcontractkit/chainlink-testing-framework/env/pkg/helm/chainlink" + "github.com/smartcontractkit/chainlink-testing-framework/env/pkg/helm/ethereum" +) + +func main() { + e := environment.New(nil). + AddHelm(ethereum.New(nil)). + AddHelm(chainlink.New(0, nil)) + if err := e.Run(); err != nil { + panic(err) + } + if err := e.DumpLogs("logs/mytest"); err != nil { + panic(err) + } +} +``` + +## Resources summary + +It can be useful to get current env [resources](examples/resources/env.go) summary for test reporting + +```golang +package main + +import ( + "fmt" + "github.com/rs/zerolog/log" + "github.com/smartcontractkit/chainlink-testing-framework/env/environment" + "github.com/smartcontractkit/chainlink-testing-framework/env/pkg" + "github.com/smartcontractkit/chainlink-testing-framework/env/pkg/helm/chainlink" + "github.com/smartcontractkit/chainlink-testing-framework/env/pkg/helm/ethereum" +) + +func main() { + e := environment.New(&environment.Config{ + Labels: []string{fmt.Sprintf("envType=%s", pkg.EnvTypeEVM5)}, + }). + AddHelm(ethereum.New(nil)). + AddHelm(chainlink.New(0, nil)) + err := e.Run() + if err != nil { + panic(err) + } + // default k8s selector + summ, err := e.ResourcesSummary("app in (chainlink-0, geth)") + if err != nil { + panic(err) + } + log.Warn().Interface("Resources", summ).Send() + e.Shutdown() +} +``` + +# Chaos + +Check our [tests](https://github.com/smartcontractkit/chainlink/blob/develop/integration-tests/chaos/chaos_test.go) to see how we using Chaosmesh + +# Coverage + +Build your target image with those 2 steps to allow automatic coverage discovery + +```Dockerfile +FROM ... + +# add those 2 steps to instrument the code +RUN curl -s https://api.github.com/repos/qiniu/goc/releases/latest | grep "browser_download_url.*-linux-amd64.tar.gz" | cut -d : -f 2,3 | tr -d \" | xargs -n 1 curl -L | tar -zx && chmod +x goc && mv goc /usr/local/bin +# -o my_service means service will be called "my_service" in goc coverage service +# --center http://goc:7777 means that on deploy, your instrumented service will automatically register to a local goc node inside your deployment (namespace) +RUN goc build -o my_service . --center http://goc:7777 + +CMD ["./my_service"] +``` +Add `goc` to your deployment, check example with `dummy` service deployment: + +```golang +package main + +import ( + "time" + + "github.com/smartcontractkit/chainlink-testing-framework/env/environment" + goc "github.com/smartcontractkit/chainlink-testing-framework/env/pkg/cdk8s/goc" + dummy "github.com/smartcontractkit/chainlink-testing-framework/env/pkg/cdk8s/http_dummy" +) + +func main() { + e := environment.New(nil). + AddChart(goc.New()). + AddChart(dummy.New()) + if err := e.Run(); err != nil { + panic(err) + } + // run your test logic here + time.Sleep(1 * time.Minute) + if err := e.SaveCoverage(); err != nil { + panic(err) + } + // clear the coverage, rerun the tests again if needed + if err := e.ClearCoverage(); err != nil { + panic(err) + } +} + +``` + +After tests are finished, coverage is collected for every service, check `cover` directory diff --git a/env/cdk8s.yaml b/env/cdk8s.yaml new file mode 100644 index 000000000..f3b57c115 --- /dev/null +++ b/env/cdk8s.yaml @@ -0,0 +1,4 @@ +language: go +app: go run . +imports: + - k8s@1.22.0 \ No newline at end of file diff --git a/env/chaos/experiments.go b/env/chaos/experiments.go new file mode 100644 index 000000000..627ae110a --- /dev/null +++ b/env/chaos/experiments.go @@ -0,0 +1,157 @@ +package chaos + +import ( + "github.com/cdk8s-team/cdk8s-core-go/cdk8s/v2" + + "github.com/smartcontractkit/chainlink-testing-framework/env/config" + networkChaos "github.com/smartcontractkit/chainlink-testing-framework/env/imports/k8s/networkchaos/chaosmeshorg" + podChaos "github.com/smartcontractkit/chainlink-testing-framework/env/imports/k8s/podchaos/chaosmeshorg" + a "github.com/smartcontractkit/chainlink-testing-framework/env/pkg/alias" +) + +var ( + FOREVER = a.Str("999h") +) + +type ManifestFunc func(namespace string, props *Props) (cdk8s.App, string, string) + +type Props struct { + LabelsSelector *map[string]*string + ContainerNames *[]*string + DurationStr string + Delay string + FromLabels *map[string]*string + ToLabels *map[string]*string +} + +func blankManifest(namespace string) (cdk8s.App, cdk8s.Chart) { + app := cdk8s.NewApp(&cdk8s.AppProps{ + YamlOutputType: cdk8s.YamlOutputType_FILE_PER_APP, + }) + return app, cdk8s.NewChart(app, a.Str("root"), &cdk8s.ChartProps{ + Namespace: a.Str(namespace), + }) +} + +func NewKillPods(namespace string, props *Props) (cdk8s.App, string, string) { + config.JSIIGlobalMu.Lock() + defer config.JSIIGlobalMu.Unlock() + app, root := blankManifest(namespace) + c := podChaos.NewPodChaos(root, a.Str("experiment"), &podChaos.PodChaosProps{ + Spec: &podChaos.PodChaosSpec{ + Action: podChaos.PodChaosSpecAction_POD_KILL, + Mode: podChaos.PodChaosSpecMode_ALL, + Selector: &podChaos.PodChaosSpecSelector{ + LabelSelectors: props.LabelsSelector, + }, + Duration: FOREVER, + }, + }) + return app, *c.Name(), "podchaos" +} + +func NewFailPods(namespace string, props *Props) (cdk8s.App, string, string) { + config.JSIIGlobalMu.Lock() + defer config.JSIIGlobalMu.Unlock() + app, root := blankManifest(namespace) + c := podChaos.NewPodChaos(root, a.Str("experiment"), &podChaos.PodChaosProps{ + Spec: &podChaos.PodChaosSpec{ + Action: podChaos.PodChaosSpecAction_POD_FAILURE, + Mode: podChaos.PodChaosSpecMode_ALL, + Selector: &podChaos.PodChaosSpecSelector{ + LabelSelectors: props.LabelsSelector, + }, + Duration: a.Str(props.DurationStr), + }, + }) + return app, *c.Name(), "podchaos" +} + +func NewFailContainers(namespace string, props *Props) (cdk8s.App, string, string) { + config.JSIIGlobalMu.Lock() + defer config.JSIIGlobalMu.Unlock() + app, root := blankManifest(namespace) + c := podChaos.NewPodChaos(root, a.Str("experiment"), &podChaos.PodChaosProps{ + Spec: &podChaos.PodChaosSpec{ + Action: podChaos.PodChaosSpecAction_POD_KILL, + Mode: podChaos.PodChaosSpecMode_ALL, + Selector: &podChaos.PodChaosSpecSelector{ + LabelSelectors: props.LabelsSelector, + }, + ContainerNames: props.ContainerNames, + Duration: FOREVER, + }, + }) + return app, *c.Name(), "podchaos" +} + +func NewContainerKill(namespace string, props *Props) (cdk8s.App, string, string) { + config.JSIIGlobalMu.Lock() + defer config.JSIIGlobalMu.Unlock() + app, root := blankManifest(namespace) + c := podChaos.NewPodChaos(root, a.Str("experiment"), &podChaos.PodChaosProps{ + Spec: &podChaos.PodChaosSpec{ + Action: podChaos.PodChaosSpecAction_POD_KILL, + Mode: podChaos.PodChaosSpecMode_ALL, + Selector: &podChaos.PodChaosSpecSelector{ + LabelSelectors: props.LabelsSelector, + }, + Duration: FOREVER, + }, + }) + return app, *c.Name(), "podchaos" +} + +func NewNetworkPartition(namespace string, props *Props) (cdk8s.App, string, string) { + config.JSIIGlobalMu.Lock() + defer config.JSIIGlobalMu.Unlock() + app, root := blankManifest(namespace) + c := networkChaos.NewNetworkChaos(root, a.Str("experiment"), &networkChaos.NetworkChaosProps{ + Spec: &networkChaos.NetworkChaosSpec{ + Action: networkChaos.NetworkChaosSpecAction_PARTITION, + Mode: networkChaos.NetworkChaosSpecMode_ALL, + Selector: &networkChaos.NetworkChaosSpecSelector{ + LabelSelectors: props.FromLabels, + }, + Direction: networkChaos.NetworkChaosSpecDirection_BOTH, + Duration: a.Str(props.DurationStr), + ExternalTargets: nil, + Loss: &networkChaos.NetworkChaosSpecLoss{ + Loss: a.Str("100"), + }, + Target: &networkChaos.NetworkChaosSpecTarget{ + Mode: networkChaos.NetworkChaosSpecTargetMode_ALL, + Selector: &networkChaos.NetworkChaosSpecTargetSelector{ + LabelSelectors: props.ToLabels, + }, + }, + }, + }) + return app, *c.Name(), "networkchaos" +} + +func NewNetworkLatency(namespace string, props *Props) (cdk8s.App, string, string) { + app, root := blankManifest(namespace) + c := networkChaos.NewNetworkChaos(root, a.Str("experiment"), &networkChaos.NetworkChaosProps{ + Spec: &networkChaos.NetworkChaosSpec{ + Action: networkChaos.NetworkChaosSpecAction_DELAY, + Mode: networkChaos.NetworkChaosSpecMode_ALL, + Selector: &networkChaos.NetworkChaosSpecSelector{ + LabelSelectors: props.FromLabels, + }, + Direction: networkChaos.NetworkChaosSpecDirection_BOTH, + Duration: a.Str(props.DurationStr), + Delay: &networkChaos.NetworkChaosSpecDelay{ + Latency: a.Str(props.Delay), + Correlation: a.Str("100"), + }, + Target: &networkChaos.NetworkChaosSpecTarget{ + Mode: networkChaos.NetworkChaosSpecTargetMode_ALL, + Selector: &networkChaos.NetworkChaosSpecTargetSelector{ + LabelSelectors: props.ToLabels, + }, + }, + }, + }) + return app, *c.Name(), "networkchaos" +} diff --git a/env/client/chaos.go b/env/client/chaos.go new file mode 100644 index 000000000..b7cf900a5 --- /dev/null +++ b/env/client/chaos.go @@ -0,0 +1,150 @@ +package client + +import ( + "context" + "fmt" + "time" + + "github.com/cdk8s-team/cdk8s-core-go/cdk8s/v2" + "github.com/chaos-mesh/chaos-mesh/api/v1alpha1" + "github.com/rs/zerolog/log" + v1 "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/util/json" + "k8s.io/apimachinery/pkg/util/wait" + + "github.com/smartcontractkit/chainlink-testing-framework/env/config" +) + +// Chaos is controller that manages Chaosmesh CRD instances to run experiments +type Chaos struct { + Client *K8sClient + ResourceByName map[string]string + Namespace string +} + +type ChaosState struct { + ChaosDetails v1alpha1.ChaosStatus `json:"status"` +} + +// NewChaos creates controller to run and stop chaos experiments +func NewChaos(client *K8sClient, namespace string) *Chaos { + return &Chaos{ + Client: client, + ResourceByName: make(map[string]string), + Namespace: namespace, + } +} + +// Run runs experiment and saves its ID +func (c *Chaos) Run(app cdk8s.App, id string, resource string) (string, error) { + log.Info().Msg("Applying chaos experiment") + config.JSIIGlobalMu.Lock() + manifest := *app.SynthYaml() + config.JSIIGlobalMu.Unlock() + log.Trace().Str("Raw", manifest).Msg("Manifest") + c.ResourceByName[id] = resource + if err := c.Client.Apply(context.Background(), manifest, c.Namespace, false); err != nil { + return id, err + } + if err := c.checkForPodsExistence(app); err != nil { + return id, err + } + err := c.waitForChaosStatus(id, v1alpha1.ConditionAllInjected, 5*time.Minute) + if err != nil { + return id, err + } + return id, nil +} + +func (c *Chaos) waitForChaosStatus(id string, condition v1alpha1.ChaosConditionType, timeout time.Duration) error { + var result ChaosState + log.Info().Msgf("waiting for chaos experiment state %s", condition) + if timeout < time.Minute { + log.Info().Msg("timeout is less than 1 minute, setting to 1 minute") + timeout = time.Minute + } + return wait.PollImmediate(2*time.Second, timeout, func() (bool, error) { + data, err := c.Client.ClientSet. + RESTClient(). + Get(). + RequestURI(fmt.Sprintf("/apis/chaos-mesh.org/v1alpha1/namespaces/%s/%s/%s", c.Namespace, c.ResourceByName[id], id)). + Do(context.Background()). + Raw() + if err == nil { + err = json.Unmarshal(data, &result) + if err != nil { + return false, err + } + for _, c := range result.ChaosDetails.Conditions { + if c.Type == condition && c.Status == v1.ConditionTrue { + return true, err + } + } + } + return false, nil + }) +} + +func (c *Chaos) WaitForAllRecovered(id string, timeout time.Duration) error { + return c.waitForChaosStatus(id, v1alpha1.ConditionAllRecovered, timeout) +} + +// Stop removes a chaos experiment +func (c *Chaos) Stop(id string) error { + defer delete(c.ResourceByName, id) + return c.Client.DeleteResource(c.Namespace, c.ResourceByName[id], id) +} + +func (c *Chaos) checkForPodsExistence(app cdk8s.App) error { + charts := app.Charts() + var selectors []string + for _, chart := range *charts { + json := chart.ToJson() + for _, j := range *json { + m := j.(map[string]interface{}) + fmt.Println(m) + kind := m["kind"].(string) + if kind == "PodChaos" || kind == "NetworkChaos" { + selectors = append(selectors, getLabelSelectors(m["spec"].(map[string]interface{}))) + } + if kind == "NetworkChaos" { + target := m["spec"].(map[string]interface{})["target"].(map[string]interface{}) + selectors = append(selectors, getLabelSelectors(target)) + } + } + } + for _, selector := range selectors { + podList, err := c.Client.ListPods(c.Namespace, selector) + if err != nil { + return err + } + if podList == nil || len(podList.Items) == 0 { + return fmt.Errorf("no pods found for selector %s", selector) + } + log.Info(). + Int("podsCount", len(podList.Items)). + Str("selector", selector). + Msgf("found pods for chaos experiment") + } + return nil +} + +func getLabelSelectors(spec map[string]interface{}) string { + if spec == nil { + return "" + } + s := spec["selector"].(map[string]interface{}) + if s == nil { + return "" + } + m := s["labelSelectors"].(map[string]interface{}) + selector := "" + for key, value := range m { + if selector == "" { + selector = fmt.Sprintf("%s=%s", key, value) + } else { + selector = fmt.Sprintf("%s, %s=%s", selector, key, value) + } + } + return selector +} diff --git a/env/client/client.go b/env/client/client.go new file mode 100644 index 000000000..a536b2f07 --- /dev/null +++ b/env/client/client.go @@ -0,0 +1,559 @@ +package client + +import ( + "bytes" + "context" + "fmt" + "os" + "regexp" + "sort" + "strconv" + "strings" + "time" + + "github.com/google/uuid" + "github.com/pkg/errors" + "github.com/rs/zerolog/log" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/runtime/serializer" + "k8s.io/apimachinery/pkg/types" + "k8s.io/apimachinery/pkg/util/wait" + "k8s.io/cli-runtime/pkg/genericclioptions" + "k8s.io/client-go/kubernetes/scheme" + "k8s.io/client-go/tools/remotecommand" + "k8s.io/kubectl/pkg/cmd/cp" + + v1 "k8s.io/api/core/v1" + metaV1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/client-go/kubernetes" + "k8s.io/client-go/rest" + "k8s.io/client-go/tools/clientcmd" + cmdutil "k8s.io/kubectl/pkg/cmd/util" +) + +const ( + TempDebugManifest = "tmp-manifest-%s.yaml" + K8sStatePollInterval = 10 * time.Second + JobFinalizedTimeout = 2 * time.Minute + AppLabel = "app" +) + +// K8sClient high level k8s client +type K8sClient struct { + ClientSet *kubernetes.Clientset + RESTConfig *rest.Config +} + +// GetLocalK8sDeps get local k8s context config +func GetLocalK8sDeps() (*kubernetes.Clientset, *rest.Config, error) { + loadingRules := clientcmd.NewDefaultClientConfigLoadingRules() + kubeConfig := clientcmd.NewNonInteractiveDeferredLoadingClientConfig(loadingRules, &clientcmd.ConfigOverrides{}) + k8sConfig, err := kubeConfig.ClientConfig() + if err != nil { + return nil, nil, err + } + k8sClient, err := kubernetes.NewForConfig(k8sConfig) + if err != nil { + return nil, nil, err + } + return k8sClient, k8sConfig, nil +} + +// NewK8sClient creates a new k8s client with a REST config +func NewK8sClient() (*K8sClient, error) { + cs, cfg, err := GetLocalK8sDeps() + if err != nil { + return nil, err + } + return &K8sClient{ + ClientSet: cs, + RESTConfig: cfg, + }, nil +} + +// ListPods lists pods for a namespace and selector +func (m *K8sClient) ListPods(namespace, selector string) (*v1.PodList, error) { + pods, err := m.ClientSet.CoreV1().Pods(namespace).List(context.Background(), metaV1.ListOptions{LabelSelector: selector}) + sort.Slice(pods.Items, func(i, j int) bool { + return pods.Items[i].CreationTimestamp.Before(pods.Items[j].CreationTimestamp.DeepCopy()) + }) + return pods.DeepCopy(), err +} + +// ListPods lists services for a namespace and selector +func (m *K8sClient) ListServices(namespace, selector string) (*v1.ServiceList, error) { + services, err := m.ClientSet.CoreV1().Services(namespace).List(context.Background(), metaV1.ListOptions{LabelSelector: selector}) + return services.DeepCopy(), err +} + +// ListNamespaces lists k8s namespaces +func (m *K8sClient) ListNamespaces(selector string) (*v1.NamespaceList, error) { + return m.ClientSet.CoreV1().Namespaces().List(context.Background(), metaV1.ListOptions{LabelSelector: selector}) +} + +// AddLabel adds a new label to a group of pods defined by selector +func (m *K8sClient) AddLabel(namespace string, selector string, label string) error { + podList, err := m.ListPods(namespace, selector) + if err != nil { + return err + } + l := strings.Split(label, "=") + if len(l) != 2 { + return errors.New("labels must be in format key=value") + } + for _, pod := range podList.Items { + labelPatch := fmt.Sprintf(`[{"op":"add","path":"/metadata/labels/%s","value":"%s" }]`, l[0], l[1]) + _, err := m.ClientSet.CoreV1().Pods(namespace).Patch( + context.Background(), + pod.GetName(), + types.JSONPatchType, + []byte(labelPatch), + metaV1.PatchOptions{}, + ) + if err != nil { + return errors.Wrapf(err, "failed to update labels %s for pod %s", labelPatch, pod.Name) + } + } + log.Debug().Str("Selector", selector).Str("Label", label).Msg("Updated label") + return nil +} + +func (m *K8sClient) LabelChaosGroup(namespace string, labelPrefix string, startInstance int, endInstance int, group string) error { + for i := startInstance; i <= endInstance; i++ { + err := m.AddLabel(namespace, fmt.Sprintf("%s%d", labelPrefix, i), fmt.Sprintf("%s=1", group)) + if err != nil { + return err + } + } + return nil +} + +func (m *K8sClient) LabelChaosGroupByLabels(namespace string, labels map[string]string, group string) error { + labelSelector := "" + for key, value := range labels { + if labelSelector == "" { + labelSelector = fmt.Sprintf("%s=%s", key, value) + } else { + labelSelector = fmt.Sprintf("%s, %s=%s", labelSelector, key, value) + } + } + podList, err := m.ListPods(namespace, labelSelector) + if err != nil { + return err + } + for _, pod := range podList.Items { + err = m.AddPodLabel(namespace, pod, group, "1") + if err != nil { + return err + } + } + return nil +} + +// AddPodsLabels adds map of labels to all pods in list +func (m *K8sClient) AddPodsLabels(namespace string, podList *v1.PodList, labels map[string]string) error { + for _, pod := range podList.Items { + for k, v := range labels { + err := m.AddPodLabel(namespace, pod, k, v) + if err != nil { + return err + } + } + } + return nil +} + +// AddPodsAnnotations adds map of annotations to all pods in list +func (m *K8sClient) AddPodsAnnotations(namespace string, podList *v1.PodList, annotations map[string]string) error { + // when applying annotations the key doesn't like `/` characters here but everywhere else it does + // replacing it here with ~1 + fixedAnnotations := make(map[string]string) + for k, v := range annotations { + fixedAnnotations[strings.ReplaceAll(k, "/", "~1")] = v + } + for _, pod := range podList.Items { + for k, v := range fixedAnnotations { + err := m.AddPodAnnotation(namespace, pod, k, v) + if err != nil { + return err + } + } + } + return nil +} + +// UniqueLabels gets all unique application labels +func (m *K8sClient) UniqueLabels(namespace string, selector string) ([]string, error) { + uniqueLabels := make([]string, 0) + isUnique := make(map[string]bool) + podList, err := m.ListPods(namespace, selector) + if err != nil { + return nil, err + } + for _, p := range podList.Items { + appLabel := p.Labels[AppLabel] + if _, ok := isUnique[appLabel]; !ok { + uniqueLabels = append(uniqueLabels, appLabel) + } + } + log.Info(). + Interface("Apps", uniqueLabels). + Int("Count", len(uniqueLabels)). + Msg("Apps found") + return uniqueLabels, nil +} + +// AddPodLabel adds a label to a pod +func (m *K8sClient) AddPodLabel(namespace string, pod v1.Pod, key, value string) error { + labelPatch := fmt.Sprintf(`[{"op":"add","path":"/metadata/labels/%s","value":"%s" }]`, key, value) + _, err := m.ClientSet.CoreV1().Pods(namespace).Patch( + context.Background(), pod.GetName(), types.JSONPatchType, []byte(labelPatch), metaV1.PatchOptions{}) + if err != nil { + return err + } + return nil +} + +// AddPodAnnotation adds an annotation to a pod +func (m *K8sClient) AddPodAnnotation(namespace string, pod v1.Pod, key, value string) error { + labelPatch := fmt.Sprintf(`[{"op":"add","path":"/metadata/annotations/%s","value":"%s" }]`, key, value) + _, err := m.ClientSet.CoreV1().Pods(namespace).Patch( + context.Background(), pod.GetName(), types.JSONPatchType, []byte(labelPatch), metaV1.PatchOptions{}) + if err != nil { + return err + } + return nil +} + +// EnumerateInstances enumerate pods with instance label +func (m *K8sClient) EnumerateInstances(namespace string, selector string) error { + podList, err := m.ListPods(namespace, selector) + if err != nil { + return err + } + + for id, pod := range podList.Items { + // skip if already labeled with instance + existingLabels := pod.Labels + _, exists := existingLabels["instance"] + if exists { + continue + } + if err := m.AddPodLabel(namespace, pod, "instance", strconv.Itoa(id)); err != nil { + return err + } + } + return nil +} + +// waitForPodsExist waits for all the expected number of pods to exist +func (m *K8sClient) waitForPodsExist(ns string, expectedPodCount int) error { + log.Debug().Int("ExpectedCount", expectedPodCount).Msg("Waiting for pods to exist") + var exitErr error + if err := wait.PollImmediate(2*time.Second, 15*time.Minute, func() (bool, error) { + apps, err2 := m.UniqueLabels(ns, AppLabel) + if err2 != nil { + exitErr = err2 + return false, nil + } + if len(apps) >= expectedPodCount { + exitErr = nil + return true, nil + } + return false, nil + }); err != nil { + return err + } + + return exitErr +} + +// WaitPodsReady waits until all pods are ready +func (m *K8sClient) WaitPodsReady(ns string, rcd *ReadyCheckData, expectedPodCount int) error { + // Wait for pods to exist + err := m.waitForPodsExist(ns, expectedPodCount) + if err != nil { + return err + } + + log.Info().Msg("Waiting for pods to be ready") + ticker := time.NewTicker(K8sStatePollInterval) + defer ticker.Stop() + timeout := time.NewTimer(rcd.Timeout) + readyCount := 0 + defer timeout.Stop() + for { + select { + case <-timeout.C: + return fmt.Errorf("waitcontainersready, no pods in '%s' with selector '%s' after timeout '%s'", + ns, rcd.ReadinessProbeCheckSelector, rcd.Timeout) + case <-ticker.C: + podList, err := m.ListPods(ns, rcd.ReadinessProbeCheckSelector) + if err != nil { + return err + } + if len(podList.Items) == 0 && expectedPodCount > 0 { + log.Debug(). + Str("Namespace", ns). + Str("Selector", rcd.ReadinessProbeCheckSelector). + Msg("No pods found with selector") + continue + } + log.Debug().Interface("Pods", podNames(podList)).Msg("Waiting for pods readiness probes") + allReady := true + for _, pod := range podList.Items { + if pod.Status.Phase == "Succeeded" { + log.Debug().Str("Pod", pod.Name).Msg("Pod is in Succeeded state") + continue + } else if pod.Status.Phase != v1.PodRunning { + log.Debug().Str("Pod", pod.Name).Str("Phase", string(pod.Status.Phase)).Msg("Pod is not running") + allReady = false + break + } + for _, c := range pod.Status.Conditions { + if c.Type == v1.ContainersReady && c.Status != "True" { + log.Debug().Str("Text", c.Message).Msg("Pod condition message") + allReady = false + } + } + } + + if allReady { + readyCount++ + // wait for it to be ready 3 times since there is no good way to know if an old pod + // was present but not yet decommisiond during a rollout + // usually there is just a very small blip that we can run into this and this will + // prevent that from happening + if readyCount == 3 { + return nil + } + } + } + } +} + +// NamespaceExists check if namespace exists +func (m *K8sClient) NamespaceExists(namespace string) bool { + if _, err := m.ClientSet.CoreV1().Namespaces().Get(context.Background(), namespace, metaV1.GetOptions{}); err != nil { + return false + } + return true +} + +// RemoveNamespace removes namespace +func (m *K8sClient) RemoveNamespace(namespace string) error { + log.Info().Str("Namespace", namespace).Msg("Removing namespace") + return m.ClientSet.CoreV1().Namespaces().Delete(context.Background(), namespace, metaV1.DeleteOptions{}) +} + +// RolloutStatefulSets applies "rollout statefulset" to all existing statefulsets in that namespace +func (m *K8sClient) RolloutStatefulSets(ctx context.Context, namespace string) error { + stsClient := m.ClientSet.AppsV1().StatefulSets(namespace) + sts, err := stsClient.List(ctx, metaV1.ListOptions{}) + if err != nil { + return err + } + for _, s := range sts.Items { + cmd := fmt.Sprintf("kubectl rollout restart statefulset %s --namespace %s", s.Name, namespace) + log.Info().Str("Command", cmd).Msg("Applying StatefulSet rollout") + if err := ExecCmdWithContext(ctx, cmd); err != nil { + return err + } + } + // wait for the statefulsets to be ready in a separate loop otherwise this can take a long time + for _, s := range sts.Items { + // wait for the rollout to be complete + scmd := fmt.Sprintf("kubectl rollout status statefulset %s --namespace %s", s.Name, namespace) + log.Info().Str("Command", scmd).Msg("Waiting for StatefulSet rollout to finish") + if err := ExecCmdWithContext(ctx, scmd); err != nil { + return err + } + } + return nil +} + +// RolloutRestartBySelector rollouts and restarts object by selector +func (m *K8sClient) RolloutRestartBySelector(ctx context.Context, namespace, resource, selector string) error { + cmd := fmt.Sprintf("kubectl --namespace %s rollout restart -l %s %s", namespace, selector, resource) + log.Info().Str("Command", cmd).Msg("rollout restart by selector") + if err := ExecCmdWithContext(ctx, cmd); err != nil { + return err + } + // wait for the rollout to be complete + waitCmd := fmt.Sprintf("kubectl --namespace %s rollout status -l %s %s", namespace, selector, resource) + log.Info().Str("Command", waitCmd).Msg("Waiting for StatefulSet rollout to finish") + return ExecCmdWithContext(ctx, waitCmd) +} + +// ReadyCheckData data to check if selected pods are running and all containers are ready ( readiness check ) are ready +type ReadyCheckData struct { + ReadinessProbeCheckSelector string + Timeout time.Duration +} + +// WaitForJob wait for job execution, follow logs and returns an error if job failed +func (m *K8sClient) WaitForJob(namespaceName string, jobName string, fundReturnStatus func(string)) error { + cmd := fmt.Sprintf("kubectl --namespace %s logs --follow job/%s", namespaceName, jobName) + log.Info().Str("Job", jobName).Str("cmd", cmd).Msg("Waiting for job to complete") + if err := ExecCmdWithOptions(context.Background(), cmd, fundReturnStatus); err != nil { + return err + } + var exitErr error + if err := wait.PollImmediate(K8sStatePollInterval, JobFinalizedTimeout, func() (bool, error) { + job, err := m.ClientSet.BatchV1().Jobs(namespaceName).Get(context.Background(), jobName, metaV1.GetOptions{}) + if err != nil { + exitErr = err + } + if int(job.Status.Failed) > 0 { + exitErr = errors.New("job failed") + return true, nil + } + if int(job.Status.Succeeded) > 0 { + exitErr = nil + return true, nil + } + return false, nil + }); err != nil { + return err + } + return exitErr +} + +func (m *K8sClient) WaitForDeploymentsAvailable(ctx context.Context, namespace string) error { + deployments, err := m.ClientSet.AppsV1().Deployments(namespace).List(ctx, metaV1.ListOptions{}) + if err != nil { + return err + } + log.Debug().Int("Number", len(deployments.Items)).Msg("Deployments found") + for _, d := range deployments.Items { + log.Debug().Str("status", d.Status.String()).Msg("Deployment info") + waitCmd := fmt.Sprintf("kubectl rollout status -n %s deployment/%s", namespace, d.Name) + log.Debug().Str("cmd", waitCmd).Msg("wait for deployment to be available") + if err := ExecCmdWithContext(ctx, waitCmd); err != nil { + return err + } + } + return nil +} + +// Apply applying a manifest to a currently connected k8s context +func (m *K8sClient) Apply(ctx context.Context, manifest, namespace string, waitForDeployment bool) error { + manifestFile := fmt.Sprintf(TempDebugManifest, uuid.NewString()) + log.Info().Str("File", manifestFile).Msg("Applying manifest") + if err := os.WriteFile(manifestFile, []byte(manifest), os.ModePerm); err != nil { + return err + } + cmd := fmt.Sprintf("kubectl apply -f %s", manifestFile) + log.Debug().Str("cmd", cmd).Msg("Apply command") + if err := ExecCmdWithContext(ctx, cmd); err != nil { + return err + } + if waitForDeployment { + return m.WaitForDeploymentsAvailable(ctx, namespace) + } + return nil +} + +// DeleteResource deletes resource +func (m *K8sClient) DeleteResource(namespace string, resource string, instance string) error { + return ExecCmd(fmt.Sprintf("kubectl delete %s %s --namespace %s", resource, instance, namespace)) +} + +// Create creating a manifest to a currently connected k8s context +func (m *K8sClient) Create(manifest string) error { + manifestFile := fmt.Sprintf(TempDebugManifest, uuid.NewString()) + log.Info().Str("File", manifestFile).Msg("Creating manifest") + if err := os.WriteFile(manifestFile, []byte(manifest), os.ModePerm); err != nil { + return err + } + cmd := fmt.Sprintf("kubectl create -f %s", manifestFile) + return ExecCmd(cmd) +} + +// DryRun generates manifest and writes it in a file +func (m *K8sClient) DryRun(manifest string) error { + manifestFile := fmt.Sprintf(TempDebugManifest, uuid.NewString()) + log.Info().Str("File", manifestFile).Msg("Creating manifest") + return os.WriteFile(manifestFile, []byte(manifest), os.ModePerm) +} + +// CopyToPod copies src to a particular container. Destination should be in the form of a proper K8s destination path +// NAMESPACE/POD_NAME:folder/FILE_NAME +func (m *K8sClient) CopyToPod(namespace, src, destination, containername string) (*bytes.Buffer, *bytes.Buffer, *bytes.Buffer, error) { + m.RESTConfig.APIPath = "/api" + m.RESTConfig.GroupVersion = &schema.GroupVersion{Version: "v1"} // this targets the core api groups so the url path will be /api/v1 + m.RESTConfig.NegotiatedSerializer = serializer.WithoutConversionCodecFactory{CodecFactory: scheme.Codecs} + ioStreams, in, out, errOut := genericclioptions.NewTestIOStreams() + + copyOptions := cp.NewCopyOptions(ioStreams) + configFlags := genericclioptions.NewConfigFlags(false) + f := cmdutil.NewFactory(configFlags) + cmd := cp.NewCmdCp(f, ioStreams) + err := copyOptions.Complete(f, cmd, []string{src, destination}) + if err != nil { + return nil, nil, nil, err + } + copyOptions.Clientset = m.ClientSet + copyOptions.ClientConfig = m.RESTConfig + copyOptions.Container = containername + copyOptions.Namespace = namespace + + formatted, err := regexp.MatchString(".*?\\/.*?\\:.*", destination) + if err != nil { + return nil, nil, nil, fmt.Errorf("could not parse the pod destination: %v", err) + } + if !formatted { + return nil, nil, nil, fmt.Errorf("pod destination string improperly formatted, see reference 'NAMESPACE/POD_NAME:folder/FILE_NAME'") + } + + log.Info(). + Str("Namespace", namespace). + Str("Source", src). + Str("Destination", destination). + Str("Container", containername). + Msg("Uploading file to pod") + err = copyOptions.Run() + if err != nil { + return nil, nil, nil, fmt.Errorf("could not run copy operation: %v", err) + } + return in, out, errOut, nil +} + +// ExecuteInPod is similar to kubectl exec +func (m *K8sClient) ExecuteInPod(namespace, podName, containerName string, command []string) ([]byte, []byte, error) { + log.Info().Interface("Command", command).Msg("Executing command in pod") + req := m.ClientSet.CoreV1().RESTClient().Post(). + Resource("pods"). + Name(podName). + Namespace(namespace). + SubResource("exec") + req.VersionedParams(&v1.PodExecOptions{ + Container: containerName, + Command: command, + Stdin: false, + Stdout: true, + Stderr: true, + TTY: false, + }, scheme.ParameterCodec) + + exec, err := remotecommand.NewSPDYExecutor(m.RESTConfig, "POST", req.URL()) + if err != nil { + return []byte{}, []byte{}, err + } + + var stdout, stderr bytes.Buffer + err = exec.Stream(remotecommand.StreamOptions{ + Stdin: nil, + Stdout: &stdout, + Stderr: &stderr, + }) + return stdout.Bytes(), stderr.Bytes(), err +} + +func podNames(podItems *v1.PodList) []string { + pn := make([]string, 0) + for _, p := range podItems.Items { + pn = append(pn, p.Name) + } + return pn +} diff --git a/env/client/cmd.go b/env/client/cmd.go new file mode 100644 index 000000000..fd66f4513 --- /dev/null +++ b/env/client/cmd.go @@ -0,0 +1,52 @@ +package client + +import ( + "bufio" + "context" + "io" + "os/exec" + "strings" + + "github.com/rs/zerolog/log" +) + +func ExecCmd(command string) error { + return ExecCmdWithContext(context.Background(), command) +} + +func ExecCmdWithContext(ctx context.Context, command string) error { + return ExecCmdWithOptions(ctx, command, func(m string) { + log.Debug().Str("Text", m).Msg("Std Pipe") + }) +} + +// readStdPipe continuously read a pipe from the command +func readStdPipe(pipe io.ReadCloser, outputFunction func(string)) { + scanner := bufio.NewScanner(pipe) + scanner.Split(bufio.ScanLines) + for scanner.Scan() { + m := scanner.Text() + if outputFunction != nil { + outputFunction(m) + } + } +} + +func ExecCmdWithOptions(ctx context.Context, command string, outputFunction func(string)) error { + c := strings.Split(command, " ") + cmd := exec.CommandContext(ctx, c[0], c[1:]...) // #nosec: G204 + stderr, err := cmd.StderrPipe() + if err != nil { + return err + } + stdout, err := cmd.StdoutPipe() + if err != nil { + return err + } + if err := cmd.Start(); err != nil { + return err + } + go readStdPipe(stderr, outputFunction) + go readStdPipe(stdout, outputFunction) + return cmd.Wait() +} diff --git a/env/client/converter.go b/env/client/converter.go new file mode 100644 index 000000000..17294e0cd --- /dev/null +++ b/env/client/converter.go @@ -0,0 +1,73 @@ +package client + +import ( + "errors" + "fmt" +) + +type ConnectionMode int + +const ( + LocalConnection ConnectionMode = iota + RemoteConnection +) + +// Protocol represents a URL scheme to use when fetching connection details +type Protocol int + +const ( + // WS : Web Socket Protocol + WS Protocol = iota + // WSSUFFIX : Web Socket Protocol + WSSUFFIX + // WSS : Web Socket Secure Protocol + WSS + // HTTP : Hypertext Transfer Protocol + HTTP + // HTTPS : Hypertext Transfer Protocol Secure + HTTPS + POSTGRESQL +) + +// URLConverter converts ports to URLs +type URLConverter struct { + ci ConnectionInfo + err error +} + +// NewURLConverter creates new URLConverter instance +func NewURLConverter(fp ConnectionInfo, err error) *URLConverter { + return &URLConverter{fp, err} +} + +// As converts host/port to an URL +func (m *URLConverter) As(conn ConnectionMode, proto Protocol) (string, error) { + if m.err != nil { + return "", m.err + } + var host string + var port uint16 + if conn == RemoteConnection { + host = m.ci.Host + port = m.ci.Ports.Remote + } else { + host = "localhost" + port = m.ci.Ports.Local + } + switch proto { + case HTTP: + return fmt.Sprintf("http://%s:%d", host, port), nil + case HTTPS: + return fmt.Sprintf("https://%s:%d", host, port), nil + case WS: + return fmt.Sprintf("ws://%s:%d", host, port), nil + case WSSUFFIX: + return fmt.Sprintf("ws://%s:%d/ws", host, port), nil + case WSS: + return fmt.Sprintf("wss://%s:%d", host, port), nil + case POSTGRESQL: + return fmt.Sprintf("postgresql://%s:%d", host, port), nil + default: + return "", errors.New("unknown protocol conversion type") + } +} diff --git a/env/client/forwarder.go b/env/client/forwarder.go new file mode 100644 index 000000000..59421c9c0 --- /dev/null +++ b/env/client/forwarder.go @@ -0,0 +1,205 @@ +package client + +import ( + "bytes" + "fmt" + "net/http" + "net/url" + "strings" + "sync" + + "github.com/rs/zerolog/log" + "golang.org/x/sync/errgroup" + v1 "k8s.io/api/core/v1" + "k8s.io/client-go/tools/portforward" + "k8s.io/client-go/transport/spdy" +) + +type Forwarder struct { + Client *K8sClient + mu *sync.Mutex + KeepConnection bool + Info map[string]interface{} +} + +type ConnectionInfo struct { + Ports portforward.ForwardedPort + Host string +} + +func NewForwarder(client *K8sClient, keepConnection bool) *Forwarder { + return &Forwarder{ + Client: client, + mu: &sync.Mutex{}, + KeepConnection: keepConnection, + Info: make(map[string]interface{}), + } +} + +func (m *Forwarder) forwardPodPorts(pod v1.Pod, namespaceName string) error { + if pod.Status.Phase != v1.PodRunning { + log.Debug().Str("Pod", pod.Name).Interface("Phase", pod.Status.Phase).Msg("Skipping pod for port forwarding") + return nil + } + roundTripper, upgrader, err := spdy.RoundTripperFor(m.Client.RESTConfig) + if err != nil { + return err + } + httpPath := fmt.Sprintf("/api/v1/namespaces/%s/pods/%s/portforward", namespaceName, pod.Name) + hostIP := strings.TrimLeft(m.Client.RESTConfig.Host, "htps:/") + serverURL := url.URL{Scheme: "https", Path: httpPath, Host: hostIP} + + dialer := spdy.NewDialer(upgrader, &http.Client{Transport: roundTripper}, http.MethodPost, &serverURL) + + portRules := m.portRulesForPod(pod) + if len(portRules) == 0 { + return nil + } + + // porforward is not thread safe for using multiple rules in the same forwarder, + // at least not until this pr is merged: https://github.com/kubernetes/kubernetes/pull/114342 + forwardedPorts := []portforward.ForwardedPort{} + for _, portRule := range portRules { + stopChan, readyChan := make(chan struct{}, 1), make(chan struct{}, 1) + out, errOut := new(bytes.Buffer), new(bytes.Buffer) + + log.Debug(). + Str("Pod", pod.Name). + Msg("Attempting to forward ports") + + forwarder, err := portforward.New(dialer, []string{portRule}, stopChan, readyChan, out, errOut) + if err != nil { + return err + } + go func() { + if err := forwarder.ForwardPorts(); err != nil { + log.Error().Str("Pod", pod.Name).Err(err) + } + }() + + <-readyChan + if len(errOut.String()) > 0 { + return fmt.Errorf("error on forwarding k8s port: %v", errOut.String()) + } + fP, err := forwarder.GetPorts() + if err != nil { + return err + } + forwardedPorts = append(forwardedPorts, fP...) + } + m.mu.Lock() + defer m.mu.Unlock() + namedPorts := m.podPortsByName(pod, forwardedPorts) + if pod.Labels[AppLabel] != "" { + m.Info[fmt.Sprintf("%s:%s", pod.Labels[AppLabel], pod.Labels["instance"])] = namedPorts + } + return nil +} + +func (m *Forwarder) collectPodPorts(pod v1.Pod) error { + namedPorts := make(map[string]interface{}) + for _, c := range pod.Spec.Containers { + for _, cp := range c.Ports { + if namedPorts[c.Name] == nil { + namedPorts[c.Name] = make(map[string]interface{}) + } + namedPorts[c.Name].(map[string]interface{})[cp.Name] = ConnectionInfo{ + Host: pod.Status.PodIP, + Ports: portforward.ForwardedPort{Remote: uint16(cp.ContainerPort)}, + } + } + } + m.mu.Lock() + defer m.mu.Unlock() + if pod.Labels[AppLabel] != "" { + m.Info[fmt.Sprintf("%s:%s", pod.Labels[AppLabel], pod.Labels["instance"])] = namedPorts + } + return nil +} + +func (m *Forwarder) podPortsByName(pod v1.Pod, fp []portforward.ForwardedPort) map[string]interface{} { + ports := make(map[string]interface{}) + for _, forwardedPort := range fp { + for _, c := range pod.Spec.Containers { + for _, cp := range c.Ports { + if cp.ContainerPort == int32(forwardedPort.Remote) { + if ports[c.Name] == nil { + ports[c.Name] = make(map[string]interface{}) + } + ports[c.Name].(map[string]interface{})[cp.Name] = ConnectionInfo{ + Host: pod.Status.PodIP, + Ports: forwardedPort, + } + } + } + } + } + return ports +} + +func (m *Forwarder) portRulesForPod(pod v1.Pod) []string { + rules := make([]string, 0) + for _, c := range pod.Spec.Containers { + for _, port := range c.Ports { + rules = append(rules, fmt.Sprintf(":%d", port.ContainerPort)) + } + } + return rules +} + +func (m *Forwarder) Connect(namespaceName string, selector string, insideK8s bool) error { + m.Info = make(map[string]interface{}) + pods, err := m.Client.ListPods(namespaceName, selector) + if err != nil { + return err + } + eg := &errgroup.Group{} + for _, p := range pods.Items { + p := p + if insideK8s { + eg.Go(func() error { + return m.collectPodPorts(p) + }) + } else { + eg.Go(func() error { + return m.forwardPodPorts(p, namespaceName) + }) + } + } + return eg.Wait() +} + +// PrintLocalPorts prints all local forwarded ports +func (m *Forwarder) PrintLocalPorts() { + for labeledAppPodName, labeledAppPod := range m.Info { + for containerName, container := range labeledAppPod.(map[string]interface{}) { + for fpName, portsData := range container.(map[string]interface{}) { + log.Info(). + Str("Label", labeledAppPodName). + Str("Container", containerName). + Str("PortNames", fpName). + Uint16("Port", portsData.(ConnectionInfo).Ports.Local). + Msg("Local ports") + } + } + } +} + +func (m *Forwarder) FindPort(ks ...string) *URLConverter { + d, err := lookupMap(m.Info, ks...) + return NewURLConverter(d.(ConnectionInfo), err) +} + +func lookupMap(m map[string]interface{}, ks ...string) (rval interface{}, err error) { + var ok bool + if len(ks) == 0 { + return nil, fmt.Errorf("select port path like $app_name:$instance $container_name $port_name") + } + if rval, ok = m[ks[0]]; !ok { + return ConnectionInfo{}, fmt.Errorf("key not found: '%s' remaining keys: %s, provided map: %s", ks[0], ks, m) + } else if len(ks) == 1 { + return rval, nil + } else { + return lookupMap(m[ks[0]].(map[string]interface{}), ks[1:]...) + } +} diff --git a/env/config/overrides.go b/env/config/overrides.go new file mode 100644 index 000000000..51621dcaf --- /dev/null +++ b/env/config/overrides.go @@ -0,0 +1,143 @@ +package config + +import ( + "os" + "sync" + + "github.com/imdario/mergo" +) + +const ( + EnvVarPrefix = "TEST_" + + EnvVarNoManifestUpdate = "NO_MANIFEST_UPDATE" + EnvVarNoManifestUpdateDescription = "Skip updating manifest when connecting to the namespace" + EnvVarNoManifestUpdateExample = "false" + + EnvVarKeepEnvironments = "KEEP_ENVIRONMENTS" + EnvVarKeepEnvironmentsDescription = "Should we keep environments on test completion" + EnvVarKeepEnvironmentsExample = "NEVER|ALWAYS|ON_FAILURE" + + EnvVarNamespace = "ENV_NAMESPACE" + EnvVarNamespaceDescription = "Namespace name to connect to" + EnvVarNamespaceExample = "chainlink-test-epic" + + EnvVarJobImage = "ENV_JOB_IMAGE" + EnvVarJobImageDescription = "Image to run as a job in k8s" + EnvVarJobImageExample = "795953128386.dkr.ecr.us-west-2.amazonaws.com/core-integration-tests:v1.0" + + EnvVarInsideK8s = "ENV_INSIDE_K8S" + EnvVarInsideK8sDescription = "Internal variable to turn forwarding strategy off inside k8s, do not use" + EnvVarInsideK8sExample = "" + + EnvVarCLImage = "CHAINLINK_IMAGE" + EnvVarCLImageDescription = "Chainlink image repository" + EnvVarCLImageExample = "public.ecr.aws/chainlink/chainlink" + + EnvVarCLTag = "CHAINLINK_VERSION" + EnvVarCLTagDescription = "Chainlink image tag" + EnvVarCLTagExample = "1.9.0" + + EnvVarUser = "CHAINLINK_ENV_USER" + EnvVarUserDescription = "Owner of an environment" + EnvVarUserExample = "Satoshi" + + EnvVarCLCommitSha = "CHAINLINK_COMMIT_SHA" + EnvVarCLCommitShaDescription = "The sha of the commit that you're running tests on. Mostly used for CI" + EnvVarCLCommitShaExample = "${{ github.sha }}" + + EnvVarTestTrigger = "TEST_TRIGGERED_BY" + EnvVarTestTriggerDescription = "How the test was triggered, either manual or CI." + EnvVarTestTriggerExample = "CI" + + EnvVarLogLevel = "TEST_LOG_LEVEL" + EnvVarLogLevelDescription = "Environment logging level" + EnvVarLogLevelExample = "info | debug | trace" + + EnvVarSelectedNetworks = "SELECTED_NETWORKS" + EnvVarSelectedNetworksDescription = "Networks to select for testing" + EnvVarSelectedNetworksExample = "SIMULATED" + + EnvVarDBURL = "DATABASE_URL" + EnvVarDBURLDescription = "DATABASE_URL needed for component test. This is only necessary if testhelper methods are imported from core" + EnvVarDBURLExample = "postgresql://postgres:node@localhost:5432/chainlink_test?sslmode=disable" + + EnvVarSlackKey = "SLACK_API_KEY" + EnvVarSlackKeyDescription = "The OAuth Slack API key to report tests results with" + EnvVarSlackKeyExample = "xoxb-example-key" + + EnvVarSlackChannel = "SLACK_CHANNEL" + EnvVarSlackChannelDescription = "The Slack code for the channel you want to send the notification to" + EnvVarSlackChannelExample = "C000000000" + + EnvVarSlackUser = "SLACK_USER" + EnvVarSlackUserDescription = "The Slack code for the user you want to notify" + EnvVarSlackUserExample = "U000000000" + + EnvVarPyroscopeServer = "PYROSCOPE_SERVER" + EnvVarPyroscopeEnvironment = "PYROSCOPE_ENVIRONMENT" + EnvVarPyroscopeKey = "PYROSCOPE_KEY" + + EnvVarToleration = "K8S_TOLERATION" + EnvVarTolerationsUserDescription = "Node roles to tolerate" + EnvVarTolerationsExample = "foundations" + + EnvVarNodeSelector = "K8S_NODE_SELECTOR" + EnvVarNodeSelectorUserDescription = "Node role to deploy to" + EnvVarNodeSelectorExample = "foundations" + + EnvVarDetachRunner = "DETACH_RUNNER" + EnvVarDetachRunnerUserDescription = "Should we detach the remote runner after starting a test using it" + EnvVarDetachRunnerExample = "true" + + EnvVarRemoteRunnerCpu = "RR_CPU" + EnvVarRemoteRunnerCpuUserDescription = "The cpu limit and req for the remote runner" + EnvVarRemoteRunnerCpuExample = "1000m" + + EnvVarRemoteRunnerMem = "RR_MEM" + EnvVarRemoteRunnerMemUserDescription = "The mem limit and req for the remote runner" + EnvVarRemoteRunnerMemExample = "1024Mi" + + EnvVarEVMKeys = "EVM_KEYS" + EnvVarEVMKeysUserDescription = "The keys used to connect to the evm" + EnvVarEVMKeysExample = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + + EnvVarInternalDockerRepo = "INTERNAL_DOCKER_REPO" + EnvVarInternalDockerRepoDescription = "Use internal docker repository for some images" + EnvVarInternalDockerRepoExample = "public.ecr.aws" + + EnvVarEVMUrls = "EVM_URLS" + EnvVarEVMUrlsUserDescription = "The RPC URLs used to connect to the chain" + EnvVarEVMUrlsExample = "wss://mainnet.infura.io/ws/v3/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + + EnvVarEVMHttpUrls = "EVM_HTTP_URLS" + EnvVarEVMHttpUrlsUserDescription = "The HTTP RPC URLs used to connect to the chain" + EnvVarEVMHttpUrlsExample = "https://mainnet.infura.io/v3/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +) + +var ( + JSIIGlobalMu = &sync.Mutex{} +) + +func MustMerge(targetVars interface{}, codeVars interface{}) { + if err := mergo.Merge(targetVars, codeVars, mergo.WithOverride); err != nil { + panic(err) + } +} + +func MustEnvOverrideVersion(target interface{}) { + image := os.Getenv(EnvVarCLImage) + tag := os.Getenv(EnvVarCLTag) + if image != "" && tag != "" { + if err := mergo.Merge(target, map[string]interface{}{ + "chainlink": map[string]interface{}{ + "image": map[string]interface{}{ + "image": image, + "version": tag, + }, + }, + }, mergo.WithOverride); err != nil { + panic(err) + } + } +} diff --git a/env/config/overrides_test.go b/env/config/overrides_test.go new file mode 100644 index 000000000..780511d6b --- /dev/null +++ b/env/config/overrides_test.go @@ -0,0 +1,59 @@ +package config + +import ( + "testing" + + "github.com/stretchr/testify/require" +) + +type Props struct { + Name string `envconfig:"MY_NAME" yaml:"name"` +} + +func TestOverrideCodeEnv(t *testing.T) { + t.Run("CL env and version", func(t *testing.T) { + defaultCodeProps := map[string]interface{}{ + "replicas": "1", + "env": map[string]interface{}{ + "database_url": "postgresql://postgres:node@0.0.0.0/chainlink?sslmode=disable", + }, + "chainlink": map[string]interface{}{ + "image": map[string]interface{}{ + "image": "public.ecr.aws/chainlink/chainlink", + "version": "1.4.1-root", + }, + "web_port": "6688", + "p2p_port": "6690", + "resources": map[string]interface{}{ + "requests": map[string]interface{}{ + "cpu": "350m", + "memory": "1024Mi", + }, + "limits": map[string]interface{}{ + "cpu": "350m", + "memory": "1024Mi", + }, + }, + }, + "db": map[string]interface{}{ + "stateful": false, + "capacity": "1Gi", + "resources": map[string]interface{}{ + "requests": map[string]interface{}{ + "cpu": "250m", + "memory": "256Mi", + }, + "limits": map[string]interface{}{ + "cpu": "250m", + "memory": "256Mi", + }, + }, + }, + } + t.Setenv(EnvVarCLImage, "abc") + t.Setenv(EnvVarCLTag, "def") + MustEnvOverrideVersion(&defaultCodeProps) + require.Equal(t, "abc", defaultCodeProps["chainlink"].(map[string]interface{})["image"].(map[string]interface{})["image"]) + require.Equal(t, "def", defaultCodeProps["chainlink"].(map[string]interface{})["image"].(map[string]interface{})["version"]) + }) +} diff --git a/env/e2e/common/test_common.go b/env/e2e/common/test_common.go new file mode 100644 index 000000000..0703ead44 --- /dev/null +++ b/env/e2e/common/test_common.go @@ -0,0 +1,424 @@ +package common + +import ( + "fmt" + "os" + "strconv" + "testing" + "time" + + "github.com/go-resty/resty/v2" + "github.com/onsi/gomega" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/chainlink-testing-framework/env/chaos" + "github.com/smartcontractkit/chainlink-testing-framework/env/client" + "github.com/smartcontractkit/chainlink-testing-framework/env/config" + "github.com/smartcontractkit/chainlink-testing-framework/env/environment" + a "github.com/smartcontractkit/chainlink-testing-framework/env/pkg/alias" + "github.com/smartcontractkit/chainlink-testing-framework/env/pkg/helm/chainlink" + "github.com/smartcontractkit/chainlink-testing-framework/env/pkg/helm/ethereum" + "github.com/smartcontractkit/chainlink-testing-framework/env/presets" + "github.com/smartcontractkit/chainlink-testing-framework/logging" +) + +const ( + TestEnvType = "chainlink-testing-framework-env-test" +) + +var ( + testSelector = fmt.Sprintf("envType=%s", TestEnvType) +) + +func GetTestEnvConfig(t *testing.T) *environment.Config { + return &environment.Config{ + NamespacePrefix: TestEnvType, + Labels: []string{testSelector}, + Test: t, + } +} + +func TestMultiStageMultiManifestConnection(t *testing.T) { + t.Parallel() + l := logging.GetTestLogger(t) + testEnvConfig := GetTestEnvConfig(t) + + ethChart := ethereum.New(nil) + ethNetworkName := ethChart.GetProps().(*ethereum.Props).NetworkName + + // we adding the same chart with different index and executing multi-stage deployment + // connections should be renewed + e := environment.New(testEnvConfig) + err := e.AddHelm(ethChart). + AddHelm(chainlink.New(0, nil)). + Run() + require.NoError(t, err) + if e.WillUseRemoteRunner() { + return + } + t.Cleanup(func() { + assert.NoError(t, e.Shutdown()) + }) + require.Len(t, e.URLs[chainlink.NodesLocalURLsKey], 1) + require.Len(t, e.URLs[chainlink.NodesInternalURLsKey], 1) + require.Len(t, e.URLs[chainlink.DBsLocalURLsKey], 1) + require.Len(t, e.URLs, 7) + + err = e.AddHelm(chainlink.New(1, nil)). + Run() + require.NoError(t, err) + require.Len(t, e.URLs[chainlink.NodesLocalURLsKey], 2) + require.Len(t, e.URLs[chainlink.NodesInternalURLsKey], 2) + require.Len(t, e.URLs[chainlink.DBsLocalURLsKey], 2) + require.Len(t, e.URLs, 7) + + urls := make([]string, 0) + if e.Cfg.InsideK8s { + urls = append(urls, e.URLs[chainlink.NodesInternalURLsKey]...) + urls = append(urls, e.URLs[ethNetworkName+"_internal_http"]...) + } else { + urls = append(urls, e.URLs[chainlink.NodesLocalURLsKey]...) + urls = append(urls, e.URLs[ethNetworkName+"_http"]...) + } + + r := resty.New() + for _, u := range urls { + l.Info().Str("URL", u).Send() + res, err := r.R().Get(u) + require.NoError(t, err) + require.Equal(t, "200 OK", res.Status()) + } +} + +func TestConnectWithoutManifest(t *testing.T) { + l := logging.GetTestLogger(t) + existingEnvConfig := GetTestEnvConfig(t) + testEnvConfig := GetTestEnvConfig(t) + existingEnvAlreadySetupVar := "ENV_ALREADY_EXISTS" + var existingEnv *environment.Environment + + // only run this section if we don't already have an existing environment + // needed for remote runner based tests to prevent duplicate envs from being created + if os.Getenv(existingEnvAlreadySetupVar) == "" { + existingEnv = environment.New(existingEnvConfig) + l.Info().Str("Namespace", existingEnvConfig.Namespace).Msg("Existing Env Namespace") + // deploy environment to use as an existing one for the test + existingEnv.Cfg.JobImage = "" + existingEnv.AddHelm(ethereum.New(nil)). + AddHelm(chainlink.New(0, map[string]any{ + "replicas": 1, + })) + err := existingEnv.Run() + require.NoError(t, err) + // propagate the existing environment to the remote runner + t.Setenv(fmt.Sprintf("TEST_%s", existingEnvAlreadySetupVar), "abc") + // set the namespace to the existing one for local runs + testEnvConfig.Namespace = existingEnv.Cfg.Namespace + } else { + l.Info().Msg("Environment already exists, verfying it is correct") + require.NotEmpty(t, os.Getenv(config.EnvVarNamespace)) + noManifestUpdate, err := strconv.ParseBool(os.Getenv(config.EnvVarNoManifestUpdate)) + require.NoError(t, err, "Failed to parse the no manifest update env var") + require.True(t, noManifestUpdate) + } + + // Now run an environment without a manifest like a normal test + testEnvConfig.NoManifestUpdate = true + testEnv := environment.New(testEnvConfig) + l.Info().Msgf("Testing Env Namespace %s", testEnv.Cfg.Namespace) + err := testEnv.AddHelm(ethereum.New(nil)). + AddHelm(chainlink.New(0, map[string]any{ + "replicas": 1, + })). + Run() + require.NoError(t, err) + if testEnv.WillUseRemoteRunner() { + return + } + t.Cleanup(func() { + assert.NoError(t, testEnv.Shutdown()) + }) + + connection := client.LocalConnection + if testEnv.Cfg.InsideK8s { + connection = client.RemoteConnection + } + url, err := testEnv.Fwd.FindPort("chainlink-0:node-1", "node", "access").As(connection, client.HTTP) + require.NoError(t, err) + urlGeth, err := testEnv.Fwd.FindPort("geth:0", "geth-network", "http-rpc").As(connection, client.HTTP) + require.NoError(t, err) + r := resty.New() + l.Info().Msgf("getting url: %s", url) + res, err := r.R().Get(url) + require.NoError(t, err) + require.Equal(t, "200 OK", res.Status()) + l.Info().Msgf("getting url: %s", url) + res, err = r.R().Get(urlGeth) + require.NoError(t, err) + require.Equal(t, "200 OK", res.Status()) + l.Info().Msgf("done getting url: %s", url) +} + +func Test5NodesSoakEnvironmentWithPVCs(t *testing.T) { + t.Parallel() + testEnvConfig := GetTestEnvConfig(t) + e := presets.EVMSoak(testEnvConfig) + err := e.Run() + require.NoError(t, err) + t.Cleanup(func() { + assert.NoError(t, e.Shutdown()) + }) +} + +func TestWithSingleNodeEnv(t *testing.T) { + t.Parallel() + testEnvConfig := GetTestEnvConfig(t) + e, err := presets.EVMOneNode(testEnvConfig) + require.NoError(t, err) + err = e.Run() + require.NoError(t, err) + if e.WillUseRemoteRunner() { + return + } + t.Cleanup(func() { + assert.NoError(t, e.Shutdown()) + }) +} + +func TestMultipleNodeWithDiffDBVersionEnv(t *testing.T) { + t.Parallel() + testEnvConfig := GetTestEnvConfig(t) + e := presets.EVMMultipleNodesWithDiffDBVersion(testEnvConfig) + err := e.Run() + require.NoError(t, err) + if e.WillUseRemoteRunner() { + return + } + t.Cleanup(func() { + assert.NoError(t, e.Shutdown()) + }) +} + +func TestMinResources5NodesEnv(t *testing.T) { + t.Parallel() + testEnvConfig := GetTestEnvConfig(t) + e := presets.EVMMinimalLocal(testEnvConfig) + err := e.Run() + require.NoError(t, err) + if e.WillUseRemoteRunner() { + return + } + t.Cleanup(func() { + assert.NoError(t, e.Shutdown()) + }) +} + +func TestMinResources5NodesEnvWithBlockscout(t *testing.T) { + t.Parallel() + testEnvConfig := GetTestEnvConfig(t) + e, err := presets.EVMMinimalLocalBS(testEnvConfig) + require.NoError(t, err) + err = e.Run() + require.NoError(t, err) + if e.WillUseRemoteRunner() { + return + } + t.Cleanup(func() { + assert.NoError(t, e.Shutdown()) + }) +} + +func Test5NodesPlus2MiningGethsReorgEnv(t *testing.T) { + t.Parallel() + testEnvConfig := GetTestEnvConfig(t) + e, err := presets.EVMReorg(testEnvConfig) + require.NoError(t, err) + err = e.Run() + require.NoError(t, err) + if e.WillUseRemoteRunner() { + return + } + t.Cleanup(func() { + assert.NoError(t, e.Shutdown()) + }) +} + +func TestMultipleInstancesOfTheSameType(t *testing.T) { + t.Parallel() + testEnvConfig := GetTestEnvConfig(t) + e := environment.New(testEnvConfig). + AddHelm(ethereum.New(nil)). + AddHelm(chainlink.New(0, nil)). + AddHelm(chainlink.New(1, nil)) + err := e.Run() + require.NoError(t, err) + if e.WillUseRemoteRunner() { + return + } + t.Cleanup(func() { + assert.NoError(t, e.Shutdown()) + }) +} + +// TestWithChaos runs a test with chaos injected into the environment. +func TestWithChaos(t *testing.T) { + t.Parallel() + l := logging.GetTestLogger(t) + appLabel := "chainlink-0" + testCase := struct { + chaosFunc chaos.ManifestFunc + chaosProps *chaos.Props + }{ + chaos.NewFailPods, + &chaos.Props{ + LabelsSelector: &map[string]*string{client.AppLabel: a.Str(appLabel)}, + DurationStr: "30s", + }, + } + testEnvConfig := GetTestEnvConfig(t) + cd := chainlink.New(0, nil) + + e := environment.New(testEnvConfig). + AddHelm(ethereum.New(nil)). + AddHelm(cd) + err := e.Run() + require.NoError(t, err) + if e.WillUseRemoteRunner() { + return + } + t.Cleanup(func() { + assert.NoError(t, e.Shutdown()) + }) + + url := e.URLs["chainlink_local"][0] + r := resty.New() + res, err := r.R().Get(url) + require.NoError(t, err) + require.Equal(t, "200 OK", res.Status()) + + // start chaos + _, err = e.Chaos.Run(testCase.chaosFunc(e.Cfg.Namespace, testCase.chaosProps)) + require.NoError(t, err) + gom := gomega.NewGomegaWithT(t) + gom.Eventually(func(g gomega.Gomega) { + res, err = r.R().Get(url) + g.Expect(err).Should(gomega.HaveOccurred()) + l.Info().Msg("Expected error was found") + }, "1m", "3s").Should(gomega.Succeed()) + + l.Info().Msg("Waiting for Pod to start back up") + err = e.Run() + require.NoError(t, err) + + // verify that the node can receive requests again + url = e.URLs["chainlink_local"][0] + res, err = r.R().Get(url) + require.NoError(t, err) + require.Equal(t, "200 OK", res.Status()) +} + +func TestEmptyEnvironmentStartup(t *testing.T) { + t.Parallel() + testEnvConfig := GetTestEnvConfig(t) + e := environment.New(testEnvConfig) + err := e.Run() + require.NoError(t, err) + if e.WillUseRemoteRunner() { + return + } + t.Cleanup(func() { + assert.NoError(t, e.Shutdown()) + }) +} + +func TestRolloutRestart(t *testing.T, statefulSet bool) { + t.Parallel() + testEnvConfig := GetTestEnvConfig(t) + cd := chainlink.New(0, map[string]any{ + "replicas": 5, + "db": map[string]any{ + "stateful": true, + "capacity": "1Gi", + }, + }) + + e := environment.New(testEnvConfig). + AddHelm(ethereum.New(nil)). + AddHelm(cd) + err := e.Run() + require.NoError(t, err) + if e.WillUseRemoteRunner() { + return + } + t.Cleanup(func() { + assert.NoError(t, e.Shutdown()) + }) + + if statefulSet { + err = e.RolloutStatefulSets() + require.NoError(t, err, "failed to rollout statefulsets") + } else { + err = e.RolloutRestartBySelector("deployment", "envType=chainlink-env-test") + require.NoError(t, err, "failed to rollout restart deployment") + } + + err = e.Run() + require.NoError(t, err, "failed to run environment") +} + +func TestReplaceHelm(t *testing.T) { + t.Parallel() + testEnvConfig := GetTestEnvConfig(t) + cd := chainlink.New(0, map[string]any{ + "chainlink": map[string]any{ + "resources": map[string]any{ + "requests": map[string]any{ + "cpu": "350m", + }, + "limits": map[string]any{ + "cpu": "350m", + }, + }, + }, + }) + + e := environment.New(testEnvConfig).AddHelm(cd) + err := e.Run() + require.NoError(t, err) + if e.WillUseRemoteRunner() { + return + } + t.Cleanup(func() { + assert.NoError(t, e.Shutdown()) + }) + require.NoError(t, err) + cd = chainlink.New(1, map[string]any{ + "chainlink": map[string]any{ + "resources": map[string]any{ + "requests": map[string]any{ + "cpu": "345m", + }, + "limits": map[string]any{ + "cpu": "345m", + }, + }, + }, + }) + require.NoError(t, err) + e, err = e. + ReplaceHelm("chainlink-0", cd) + require.NoError(t, err) + err = e.Run() + require.NoError(t, err) +} + +func TestRunTimeout(t *testing.T) { + t.Parallel() + testEnvConfig := GetTestEnvConfig(t) + e, err := presets.EVMOneNode(testEnvConfig) + require.NoError(t, err) + e.Cfg.ReadyCheckData.Timeout = 5 * time.Second + err = e.Run() + require.Error(t, err) +} diff --git a/env/e2e/local-runner/envs_test.go b/env/e2e/local-runner/envs_test.go new file mode 100644 index 000000000..00201b376 --- /dev/null +++ b/env/e2e/local-runner/envs_test.go @@ -0,0 +1,67 @@ +package env_test + +import ( + "testing" + + "github.com/smartcontractkit/chainlink-testing-framework/env/e2e/common" +) + +func TestMultiStageMultiManifestConnection(t *testing.T) { + common.TestMultiStageMultiManifestConnection(t) +} + +func TestConnectWithoutManifest(t *testing.T) { + common.TestConnectWithoutManifest(t) +} + +func Test5NodesSoakEnvironmentWithPVCs(t *testing.T) { + common.Test5NodesSoakEnvironmentWithPVCs(t) +} + +func TestWithSingleNodeEnv(t *testing.T) { + common.TestWithSingleNodeEnv(t) +} + +func TestMultipleNodeWithDiffDBVersionEnv(t *testing.T) { + common.TestMultipleNodeWithDiffDBVersionEnv(t) +} + +func TestMinResources5NodesEnv(t *testing.T) { + common.TestMinResources5NodesEnv(t) +} + +func TestMinResources5NodesEnvWithBlockscout(t *testing.T) { + common.TestMinResources5NodesEnvWithBlockscout(t) +} + +func TestMultipleInstancesOfTheSameType(t *testing.T) { + common.TestMultipleInstancesOfTheSameType(t) +} + +func Test5NodesPlus2MiningGethsReorgEnv(t *testing.T) { + common.Test5NodesPlus2MiningGethsReorgEnv(t) +} + +func TestWithChaos(t *testing.T) { + common.TestWithChaos(t) +} + +func TestEmptyEnvironmentStartup(t *testing.T) { + common.TestEmptyEnvironmentStartup(t) +} + +func TestRolloutRestartUpdate(t *testing.T) { + common.TestRolloutRestart(t, true) +} + +func TestRolloutRestartBySelector(t *testing.T) { + common.TestRolloutRestart(t, false) +} + +func TestReplaceHelm(t *testing.T) { + common.TestReplaceHelm(t) +} + +func TestRunTimeout(t *testing.T) { + common.TestRunTimeout(t) +} diff --git a/env/e2e/remote-runner/remote_runner_envs_test.go b/env/e2e/remote-runner/remote_runner_envs_test.go new file mode 100644 index 000000000..af66b4c1c --- /dev/null +++ b/env/e2e/remote-runner/remote_runner_envs_test.go @@ -0,0 +1,158 @@ +package e2e_remote_runner_test + +import ( + "fmt" + "testing" + "time" + + "github.com/go-resty/resty/v2" + "github.com/rs/zerolog/log" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/chainlink-testing-framework/env/e2e/common" + "github.com/smartcontractkit/chainlink-testing-framework/env/environment" + "github.com/smartcontractkit/chainlink-testing-framework/env/pkg/helm/chainlink" + "github.com/smartcontractkit/chainlink-testing-framework/env/pkg/helm/ethereum" + "github.com/smartcontractkit/chainlink-testing-framework/env/pkg/helm/mockserver" + mockservercfg "github.com/smartcontractkit/chainlink-testing-framework/env/pkg/helm/mockserver-cfg" + "github.com/smartcontractkit/chainlink-testing-framework/env/presets" +) + +func TestMultiStageMultiManifestConnection(t *testing.T) { + common.TestMultiStageMultiManifestConnection(t) +} + +func TestConnectWithoutManifest(t *testing.T) { + common.TestConnectWithoutManifest(t) +} + +func Test5NodesSoakEnvironmentWithPVCs(t *testing.T) { + common.Test5NodesSoakEnvironmentWithPVCs(t) +} + +func TestWithSingleNodeEnv(t *testing.T) { + common.TestWithSingleNodeEnv(t) +} + +func TestMultipleNodeWithDiffDBVersionEnv(t *testing.T) { + common.TestMultipleNodeWithDiffDBVersionEnv(t) +} + +func TestMinResources5NodesEnv(t *testing.T) { + common.TestMinResources5NodesEnv(t) +} + +func TestMinResources5NodesEnvWithBlockscout(t *testing.T) { + common.TestMinResources5NodesEnvWithBlockscout(t) +} + +func TestMultipleInstancesOfTheSameType(t *testing.T) { + common.TestMultipleInstancesOfTheSameType(t) +} + +func Test5NodesPlus2MiningGethsReorgEnv(t *testing.T) { + common.Test5NodesPlus2MiningGethsReorgEnv(t) +} + +func TestWithChaos(t *testing.T) { + common.TestWithChaos(t) +} + +func TestFundReturnShutdownLogic(t *testing.T) { + t.Parallel() + testEnvConfig := common.GetTestEnvConfig(t) + e := presets.EVMMinimalLocal(testEnvConfig) + err := e.Run() + if e.WillUseRemoteRunner() { + require.Error(t, err, "Should return an error") + return + } + t.Cleanup(func() { + assert.NoError(t, e.Shutdown()) + }) + require.NoError(t, err) + fmt.Println(environment.FAILED_FUND_RETURN) +} + +func TestRemoteRunnerOneSetupWithMultipeTests(t *testing.T) { + t.Parallel() + testEnvConfig := common.GetTestEnvConfig(t) + ethChart := ethereum.New(nil) + e := environment.New(testEnvConfig). + AddHelm(mockservercfg.New(nil)). + AddHelm(mockserver.New(nil)). + AddHelm(ethChart). + AddHelm(chainlink.New(0, map[string]any{ + "replicas": 5, + })) + err := e.Run() + t.Cleanup(func() { + assert.NoError(t, e.Shutdown()) + }) + require.NoError(t, err) + if e.WillUseRemoteRunner() { + return + } + + // setup of variables to use for verification in a t.Run + ethNetworkName := ethChart.GetProps().(*ethereum.Props).NetworkName + urls := make([]string, 0) + if e.Cfg.InsideK8s { + urls = append(urls, e.URLs[chainlink.NodesInternalURLsKey]...) + urls = append(urls, e.URLs[ethNetworkName+"_internal_http"]...) + } else { + urls = append(urls, e.URLs[chainlink.NodesLocalURLsKey]...) + urls = append(urls, e.URLs[ethNetworkName+"_http"]...) + } + + log.Info().Str("Test", "Before").Msg("Before Tests") + + // This test will verify we can connect a t.Run to the env of the parent test + t.Run("do one", func(t1 *testing.T) { + t1.Parallel() + test1EnvConfig := common.GetTestEnvConfig(t1) + test1EnvConfig.Namespace = e.Cfg.Namespace + test1EnvConfig.NoManifestUpdate = true + e1 := presets.EVMMinimalLocal(test1EnvConfig) + err := e1.Run() + require.NoError(t1, err) + log.Info().Str("Test", "One").Msg("Inside test") + time.Sleep(1 * time.Second) + }) + + // This test will verify the sub t.Run properly uses the variables from the parent test + t.Run("do two", func(t2 *testing.T) { + t2.Parallel() + log.Info().Str("Test", "Two").Msg("Inside test") + r := resty.New() + for _, u := range urls { + log.Info().Str("URL", u).Send() + res, err := r.R().Get(u) + require.NoError(t2, err) + require.Equal(t2, "200 OK", res.Status()) + } + }) + + log.Info().Str("Test", "After").Msg("After Tests") +} + +func TestEmptyEnvironmentStartup(t *testing.T) { + common.TestEmptyEnvironmentStartup(t) +} + +func TestRolloutRestartUpdate(t *testing.T) { + common.TestRolloutRestart(t, true) +} + +func TestRolloutRestartBySelector(t *testing.T) { + common.TestRolloutRestart(t, false) +} + +func TestReplaceHelm(t *testing.T) { + common.TestReplaceHelm(t) +} + +func TestRunTimeout(t *testing.T) { + common.TestRunTimeout(t) +} diff --git a/env/environment/artifacts.go b/env/environment/artifacts.go new file mode 100644 index 000000000..919f250a2 --- /dev/null +++ b/env/environment/artifacts.go @@ -0,0 +1,178 @@ +package environment + +import ( + "bytes" + "context" + "fmt" + "io" + "os" + "path/filepath" + "strings" + + "github.com/smartcontractkit/chainlink-testing-framework/env/client" + + "github.com/pkg/errors" + "github.com/rs/zerolog/log" + coreV1 "k8s.io/api/core/v1" + metaV1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/client-go/kubernetes/scheme" + clientV1 "k8s.io/client-go/kubernetes/typed/core/v1" + "k8s.io/client-go/tools/remotecommand" +) + +// Artifacts is an artifacts dumping structure that copies logs and database dumps for all deployed pods +type Artifacts struct { + Namespace string + DBName string + Client *client.K8sClient + podsClient clientV1.PodInterface +} + +// NewArtifacts create new artifacts instance for provided environment +func NewArtifacts(client *client.K8sClient, namespace string) (*Artifacts, error) { + return &Artifacts{ + Namespace: namespace, + Client: client, + podsClient: client.ClientSet.CoreV1().Pods(namespace), + }, nil +} + +// DumpTestResult dumps all pods logs and db dump in a separate test dir +func (a *Artifacts) DumpTestResult(testDir string, dbName string) error { + a.DBName = dbName + if err := MkdirIfNotExists(testDir); err != nil { + return err + } + return a.writePodArtifacts(testDir) +} + +func (a *Artifacts) writePodArtifacts(testDir string) error { + log.Info(). + Str("Test", testDir). + Msg("Writing test artifacts") + podsList, err := a.podsClient.List(context.Background(), metaV1.ListOptions{}) + if err != nil { + log.Err(err). + Str("Namespace", a.Namespace). + Msg("Error retrieving pod list from K8s environment") + return err + } + for _, pod := range podsList.Items { + log.Info(). + Str("Pod", pod.Name). + Msg("Writing pod artifacts") + appName := pod.Labels[client.AppLabel] + instance := pod.Labels["instance"] + appDir := filepath.Join(testDir, fmt.Sprintf("%s_%s", appName, instance)) + if err := MkdirIfNotExists(appDir); err != nil { + return err + } + err = a.writePodLogs(pod, appDir) + if err != nil { + log.Err(err). + Str("Namespace", a.Namespace). + Str("Pod", pod.Name). + Msg("Error writing logs for pod") + } + } + return nil +} + +func (a *Artifacts) dumpDB(pod coreV1.Pod, container coreV1.Container) (string, error) { + postRequestBase := a.Client.ClientSet.CoreV1().RESTClient().Post(). + Namespace(pod.Namespace).Resource("pods").Name(pod.Name).SubResource("exec") + exportDBRequest := postRequestBase.VersionedParams( + &coreV1.PodExecOptions{ + Container: container.Name, + Command: []string{"/bin/sh", "-c", "pg_dump", a.DBName}, + Stdin: true, + Stdout: true, + Stderr: true, + TTY: false, + }, scheme.ParameterCodec) + exec, err := remotecommand.NewSPDYExecutor(a.Client.RESTConfig, "POST", exportDBRequest.URL()) + if err != nil { + return "", err + } + outBuff, errBuff := &bytes.Buffer{}, &bytes.Buffer{} + err = exec.Stream(remotecommand.StreamOptions{ + Stdin: &bytes.Reader{}, + Stdout: outBuff, + Stderr: errBuff, + Tty: false, + }) + if err != nil || errBuff.Len() > 0 { + return "", fmt.Errorf("error in dumping DB contents | STDOUT: %v | STDERR: %v", outBuff.String(), + errBuff.String()) + } + return outBuff.String(), err +} + +func (a *Artifacts) writePostgresDump(podDir string, pod coreV1.Pod, cont coreV1.Container) error { + dumpContents, err := a.dumpDB(pod, cont) + if err != nil { + return err + } + logFile, err := os.Create(filepath.Join(podDir, fmt.Sprintf("%s_dump.sql", cont.Name))) + if err != nil { + return err + } + _, err = logFile.WriteString(dumpContents) + if err != nil { + return err + } + return logFile.Close() +} + +func (a *Artifacts) writeContainerLogs(podDir string, pod coreV1.Pod, cont coreV1.Container) error { + logFile, err := os.Create(filepath.Join(podDir, cont.Name) + ".log") + if err != nil { + return err + } + podLogRequest := a.podsClient.GetLogs(pod.Name, &coreV1.PodLogOptions{Container: cont.Name}) + podLogs, err := podLogRequest.Stream(context.Background()) + if err != nil { + return err + } + buf := new(bytes.Buffer) + _, err = io.Copy(buf, podLogs) + if err != nil { + return err + } + _, err = logFile.Write(buf.Bytes()) + if err != nil { + return err + } + + if err = logFile.Close(); err != nil { + return err + } + return podLogs.Close() +} + +// Writes logs for each container in a pod +func (a *Artifacts) writePodLogs(pod coreV1.Pod, appDir string) error { + for _, c := range pod.Spec.Containers { + log.Info(). + Str("Container", c.Name). + Msg("Writing container artifacts") + if err := a.writeContainerLogs(appDir, pod, c); err != nil { + return err + } + if strings.Contains(c.Image, "postgres") { + if err := a.writePostgresDump(appDir, pod, c); err != nil { + return err + } + } + } + return nil +} + +func MkdirIfNotExists(dirName string) error { + if _, err := os.Stat(dirName); os.IsNotExist(err) { + if err = os.MkdirAll(dirName, os.ModePerm); err != nil { + return errors.Wrapf(err, "failed to create directory: %s", dirName) + } + } + return nil +} diff --git a/env/environment/environment.go b/env/environment/environment.go new file mode 100644 index 000000000..8652bfe88 --- /dev/null +++ b/env/environment/environment.go @@ -0,0 +1,1036 @@ +package environment + +import ( + "context" + "fmt" + "os" + "os/signal" + "strconv" + "strings" + "syscall" + "testing" + "time" + + "github.com/cdk8s-team/cdk8s-core-go/cdk8s/v2" + "github.com/go-resty/resty/v2" + "github.com/google/uuid" + "github.com/imdario/mergo" + "github.com/pkg/errors" + "github.com/rs/zerolog/log" + "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/chainlink-testing-framework/env/client" + "github.com/smartcontractkit/chainlink-testing-framework/env/config" + "github.com/smartcontractkit/chainlink-testing-framework/env/imports/k8s" + "github.com/smartcontractkit/chainlink-testing-framework/env/pkg" + a "github.com/smartcontractkit/chainlink-testing-framework/env/pkg/alias" + "github.com/smartcontractkit/chainlink-testing-framework/logging" +) + +const ( + COVERAGE_DIR string = "cover" + FAILED_FUND_RETURN string = "FAILED_FUND_RETURN" +) + +const ( + ErrInvalidOCI string = "OCI chart url should be in format oci://$ECR_URL/$ECR_REGISTRY_NAME/$CHART_NAME:[?$CHART_VERSION], was %s" + ErrOCIPull string = "failed to pull OCI repo: %s" +) + +var ( + defaultNamespaceAnnotations = map[string]*string{ + "prometheus.io/scrape": a.Str("true"), + "backyards.banzaicloud.io/image-registry-access": a.Str("true"), + "backyards.banzaicloud.io/public-dockerhub-access": a.Str("true"), + } +) + +// ConnectedChart interface to interact both with cdk8s apps and helm charts +type ConnectedChart interface { + // IsDeploymentNeeded + // true - we deploy/connect and expose environment data + // false - we are using external environment, but still exposing data + IsDeploymentNeeded() bool + // GetName name of the deployed part + GetName() string + // GetPath get Helm chart path, repo or local path + GetPath() string + // GetVersion gets the chart's version, empty string if none is specified + GetVersion() string + // GetProps get code props if it's typed environment + GetProps() any + // GetValues get values.yml props as map, if it's Helm + GetValues() *map[string]any + // ExportData export deployment part data in the env + ExportData(e *Environment) error +} + +// Config is an environment common configuration, labels, annotations, connection types, readiness check, etc. +type Config struct { + // TTL is time to live for the environment, used with kube-janitor + TTL time.Duration + // NamespacePrefix is a static namespace prefix + NamespacePrefix string + // Namespace is full namespace name + Namespace string + // Labels is a set of labels applied to the namespace in a format of "key=value" + Labels []string + // PodLabels is a set of labels applied to every pod in the namespace + PodLabels map[string]string + // PreventPodEviction if true sets a k8s annotation safe-to-evict=false to prevent pods from being evicted + // Note: This should only be used if your test is completely incapable of handling things like K8s rebalances without failing. + // If that is the case, it's worth the effort to make your test fault-tolerant soon. The alternative is expensive and infuriating. + PreventPodEviction bool + // Allow deployment to nodes with these tolerances + Tolerations []map[string]string + // Restrict deployment to only nodes matching a particular node role + NodeSelector map[string]string + // ReadyCheckData is settings for readiness probes checks for all deployment components + // checking that all pods are ready by default with 8 minutes timeout + // &client.ReadyCheckData{ + // ReadinessProbeCheckSelector: "", + // Timeout: 15 * time.Minute, + // } + ReadyCheckData *client.ReadyCheckData + // DryRun if true, app will just generate a manifest in local dir + DryRun bool + // InsideK8s used for long-running soak tests where you connect to env from the inside + InsideK8s bool + // NoManifestUpdate is a flag to skip manifest updating when connecting + NoManifestUpdate bool + // KeepConnection keeps connection until interrupted with a signal, useful when prototyping and debugging a new env + KeepConnection bool + // RemoveOnInterrupt automatically removes an environment on interrupt + RemoveOnInterrupt bool + // UpdateWaitInterval an interval to wait for deployment update started + UpdateWaitInterval time.Duration + + // Remote Runner Specific Variables // + // JobImage an image to run environment as a job inside k8s + JobImage string + // JobLogFunction a function that will be run on each log + JobLogFunction func(*Environment, string) + // Test the testing library current Test struct + Test *testing.T + // jobDeployed used to limit us to 1 remote runner deploy + jobDeployed bool + // detachRunner should we detach the remote runner after starting the test + detachRunner bool + // fundReturnFailed the status of a fund return + fundReturnFailed bool +} + +func defaultEnvConfig() *Config { + return &Config{ + TTL: 20 * time.Minute, + NamespacePrefix: "chainlink-test-env", + UpdateWaitInterval: 1 * time.Second, + ReadyCheckData: &client.ReadyCheckData{ + ReadinessProbeCheckSelector: "", + Timeout: 15 * time.Minute, + }, + } +} + +// Environment describes a launched test environment +type Environment struct { + App cdk8s.App + CurrentManifest string + root cdk8s.Chart + Charts []ConnectedChart // All connected charts in the + Cfg *Config // The environment specific config + Client *client.K8sClient // Client connecting to the K8s cluster + Fwd *client.Forwarder // Used to forward ports from local machine to the K8s cluster + Artifacts *Artifacts + Chaos *client.Chaos + httpClient *resty.Client + URLs map[string][]string // General URLs of launched resources. Uses '_local' to delineate forwarded ports + ChainlinkNodeDetails []*ChainlinkNodeDetail // ChainlinkNodeDetails has convenient details for connecting to chainlink deployments + err error +} + +// ChainlinkNodeDetail contains details about a chainlink node deployment +type ChainlinkNodeDetail struct { + // ChartName details the name of the Helm chart this node uses, handy for modifying deployment values + // Note: if you are using replicas of the same chart, this will be the same for all nodes + // Use NewDeployment function for Chainlink nodes to make use of this + ChartName string + // PodName is the name of the pod running the chainlink node + PodName string + // LocalIP is the URL to connect to the node from the local machine + LocalIP string + // InternalIP is the URL to connect to the node from inside the K8s cluster + InternalIP string + // DBLocalIP is the URL to connect to the node's database from the local machine + DBLocalIP string +} + +// New creates new environment +func New(cfg *Config) *Environment { + logging.Init() + if cfg == nil { + cfg = &Config{} + } + targetCfg := defaultEnvConfig() + config.MustMerge(targetCfg, cfg) + ns := os.Getenv(config.EnvVarNamespace) + if ns != "" { + cfg.Namespace = ns + } + if cfg.Namespace != "" { + log.Info().Str("Namespace", cfg.Namespace).Msg("Namespace selected") + targetCfg.Namespace = cfg.Namespace + } else { + targetCfg.Namespace = fmt.Sprintf("%s-%s", targetCfg.NamespacePrefix, uuid.NewString()[0:5]) + log.Info().Str("Namespace", targetCfg.Namespace).Msg("Creating new namespace") + } + jobImage := os.Getenv(config.EnvVarJobImage) + if jobImage != "" { + targetCfg.JobImage = jobImage + targetCfg.detachRunner, _ = strconv.ParseBool(os.Getenv(config.EnvVarDetachRunner)) + } else { + targetCfg.InsideK8s, _ = strconv.ParseBool(os.Getenv(config.EnvVarInsideK8s)) + } + + c, err := client.NewK8sClient() + if err != nil { + return &Environment{err: err} + } + e := &Environment{ + URLs: make(map[string][]string), + Charts: make([]ConnectedChart, 0), + Client: c, + Cfg: targetCfg, + Fwd: client.NewForwarder(c, targetCfg.KeepConnection), + } + arts, err := NewArtifacts(e.Client, e.Cfg.Namespace) + if err != nil { + log.Error().Err(err).Msg("failed to create artifacts client") + return &Environment{err: err} + } + e.Artifacts = arts + + config.JSIIGlobalMu.Lock() + defer config.JSIIGlobalMu.Unlock() + if err := e.initApp(); err != nil { + log.Error().Err(err).Msg("failed to apply the initial manifest to create the namespace") + return &Environment{err: err} + } + e.Chaos = client.NewChaos(c, e.Cfg.Namespace) + + // setup test cleanup if this is using a remote runner + // and not in detached mode + // and not using an existing environment + if targetCfg.JobImage != "" && !targetCfg.detachRunner && !targetCfg.NoManifestUpdate { + targetCfg.fundReturnFailed = false + if targetCfg.Test != nil { + targetCfg.Test.Cleanup(func() { + err := e.Shutdown() + require.NoError(targetCfg.Test, err) + }) + } + } + return e +} + +func (m *Environment) initApp() error { + var err error + m.App = cdk8s.NewApp(&cdk8s.AppProps{ + YamlOutputType: cdk8s.YamlOutputType_FILE_PER_APP, + }) + m.Cfg.Labels = append(m.Cfg.Labels, "app.kubernetes.io/managed-by=cdk8s") + owner := os.Getenv(config.EnvVarUser) + if owner == "" { + return fmt.Errorf("missing owner environment variable, please set %s to your name or if you are seeing this in CI please set it to ${{ github.actor }}", config.EnvVarUser) + } + m.Cfg.Labels = append(m.Cfg.Labels, fmt.Sprintf("owner=%s", owner)) + + if os.Getenv(config.EnvVarCLCommitSha) != "" { + m.Cfg.Labels = append(m.Cfg.Labels, fmt.Sprintf("commit=%s", os.Getenv(config.EnvVarCLCommitSha))) + } + testTrigger := os.Getenv(config.EnvVarTestTrigger) + if testTrigger == "" { + testTrigger = "manual" + } + m.Cfg.Labels = append(m.Cfg.Labels, fmt.Sprintf("triggered-by=%s", testTrigger)) + + if tolerationRole := os.Getenv(config.EnvVarToleration); tolerationRole != "" { + m.Cfg.Tolerations = []map[string]string{{ + "key": "node-role", + "operator": "Equal", + "value": tolerationRole, + "effect": "NoSchedule", + }} + } + + if selectorRole := os.Getenv(config.EnvVarNodeSelector); selectorRole != "" { + m.Cfg.NodeSelector = map[string]string{ + "node-role": selectorRole, + } + } + + nsLabels, err := a.ConvertLabels(m.Cfg.Labels) + if err != nil { + return err + } + defaultNamespaceAnnotations[pkg.TTLLabelKey] = a.ShortDur(m.Cfg.TTL) + m.root = cdk8s.NewChart(m.App, a.Str(fmt.Sprintf("root-chart-%s", m.Cfg.Namespace)), &cdk8s.ChartProps{ + Labels: nsLabels, + Namespace: a.Str(m.Cfg.Namespace), + }) + k8s.NewKubeNamespace(m.root, a.Str("namespace"), &k8s.KubeNamespaceProps{ + Metadata: &k8s.ObjectMeta{ + Name: a.Str(m.Cfg.Namespace), + Labels: nsLabels, + Annotations: &defaultNamespaceAnnotations, + }, + }) + if m.Cfg.PreventPodEviction { + zero := float64(0) + k8s.NewKubePodDisruptionBudget(m.root, a.Str("pdb"), &k8s.KubePodDisruptionBudgetProps{ + Metadata: &k8s.ObjectMeta{ + Name: a.Str("clenv-pdb"), + Namespace: a.Str(m.Cfg.Namespace), + }, + Spec: &k8s.PodDisruptionBudgetSpec{ + MaxUnavailable: k8s.IntOrString_FromNumber(&zero), + Selector: &k8s.LabelSelector{ + MatchLabels: &map[string]*string{ + pkg.NamespaceLabelKey: a.Str(m.Cfg.Namespace), + }, + }, + }, + }) + } + m.CurrentManifest = *m.App.SynthYaml() + // loop retry applying the initial manifest with the namespace and other basics + ctx, cancel := context.WithTimeout(context.Background(), m.Cfg.ReadyCheckData.Timeout) + defer cancel() + startTime := time.Now() + deadline, _ := ctx.Deadline() + for { + err = m.Client.Apply(ctx, m.CurrentManifest, m.Cfg.Namespace, true) + if err == nil || ctx.Err() != nil { + break + } + elapsed := time.Since(startTime) + remaining := time.Until(deadline) + log.Debug().Err(err).Msgf("Failed to apply initial manifest, will continue to retry. Time elapsed: %s, Time until timeout %s\n", elapsed, remaining) + time.Sleep(5 * time.Second) + } + if errors.Is(ctx.Err(), context.DeadlineExceeded) { + return fmt.Errorf("failed to apply manifest within %s", m.Cfg.ReadyCheckData.Timeout) + } + if m.Cfg.PodLabels == nil { + m.Cfg.PodLabels = map[string]string{} + } + m.Cfg.PodLabels[pkg.NamespaceLabelKey] = m.Cfg.Namespace + return err +} + +// AddChart adds a chart to the deployment +func (m *Environment) AddChart(f func(root cdk8s.Chart) ConnectedChart) *Environment { + if m.err != nil { + return m + } + config.JSIIGlobalMu.Lock() + defer config.JSIIGlobalMu.Unlock() + m.Charts = append(m.Charts, f(m.root)) + return m +} + +func (m *Environment) removeChart(name string) error { + chartIndex, _, err := m.findChart(name) + if err != nil { + return err + } + m.Charts = append(m.Charts[:chartIndex], m.Charts[chartIndex+1:]...) + m.root.Node().TryRemoveChild(a.Str(name)) + return nil +} + +// findChart finds a chart by name, returning the index of it in the Charts slice, and the chart itself +func (m *Environment) findChart(name string) (index int, chart ConnectedChart, err error) { + for i, c := range m.Charts { + if c.GetName() == name { + return i, c, nil + } + } + return -1, nil, fmt.Errorf("chart %s not found", name) +} + +// ReplaceHelm entirely replaces an existing helm chart with a new one +// Note: you need to call Run() after this to apply the changes. If you're modifying ConfigMap values, you'll probably +// need to use RollOutStatefulSets to apply the changes to the pods. https://stackoverflow.com/questions/57356521/rollingupdate-for-stateful-set-doesnt-restart-pods-and-changes-from-updated-con +func (m *Environment) ReplaceHelm(name string, chart ConnectedChart) (*Environment, error) { + if m.err != nil { + return nil, m.err + } + config.JSIIGlobalMu.Lock() + defer config.JSIIGlobalMu.Unlock() + if err := m.removeChart(name); err != nil { + return nil, err + } + if m.Cfg.JobImage != "" || !chart.IsDeploymentNeeded() { + return m, fmt.Errorf("cannot modify helm chart '%s' that does not need deployment, it may be in a remote runner or detached mode", name) + } + log.Trace(). + Str("Chart", chart.GetName()). + Str("Path", chart.GetPath()). + Interface("Props", chart.GetProps()). + Interface("Values", chart.GetValues()). + Msg("Chart deployment values") + h := cdk8s.NewHelm(m.root, a.Str(chart.GetName()), &cdk8s.HelmProps{ + Chart: a.Str(chart.GetPath()), + HelmFlags: &[]*string{ + a.Str("--namespace"), + a.Str(m.Cfg.Namespace), + }, + ReleaseName: a.Str(chart.GetName()), + Values: chart.GetValues(), + }) + addDefaultPodAnnotationsAndLabels(h, markNotSafeToEvict(m.Cfg.PreventPodEviction, nil), m.Cfg.PodLabels) + m.Charts = append(m.Charts, chart) + return m, nil +} + +func addDefaultPodAnnotationsAndLabels(h cdk8s.Helm, annotations, labels map[string]string) { + annoatationsCopy := map[string]string{} + for k, v := range annotations { + annoatationsCopy[k] = v + } + for _, ao := range *h.ApiObjects() { + switch *ao.Kind() { + case "Deployment", "ReplicaSet", "StatefulSet": + // we aren't guaranteed to have annotations in existence so we have to dig down to see if they exist + // and add any to our current list we want to add + aj := *ao.Chart().ToJson() + // loop over the json array until we get the expected kind and look for existing annotations + for _, dep := range aj { + l := fmt.Sprint(dep) + if !strings.Contains(l, fmt.Sprintf("kind:%s", *ao.Kind())) { + continue + } + depM := dep.(map[string]interface{}) + spec, ok := depM["spec"].(map[string]interface{}) + if !ok { + continue + } + template, ok := spec["template"].(map[string]interface{}) + if !ok { + continue + } + metadata, ok := template["metadata"].(map[string]interface{}) + if !ok { + continue + } + annot, ok := metadata["annotations"].(map[string]interface{}) + if !ok { + continue + } + for k, v := range annot { + annoatationsCopy[k] = v.(string) + } + } + ao.AddJsonPatch(cdk8s.JsonPatch_Add(a.Str("/spec/template/metadata/annotations"), annoatationsCopy)) + + // loop over the labels and apply them to both the labels and selectors + // these should in theory always have at least one label/selector combo in existence so we don't + // have to do the existence check like we do for the annotations + for k, v := range labels { + // Escape the keys according to JSON Pointer syntax in RFC 6901 + escapedKey := strings.ReplaceAll(strings.ReplaceAll(k, "~", "~0"), "/", "~1") + ao.AddJsonPatch(cdk8s.JsonPatch_Add(a.Str(fmt.Sprintf("/spec/template/metadata/labels/%s", escapedKey)), v)) + ao.AddJsonPatch(cdk8s.JsonPatch_Add(a.Str(fmt.Sprintf("/spec/selector/matchLabels/%s", escapedKey)), v)) + } + } + } +} + +// UpdateHelm update a helm chart with new values. The pod will launch with an `updated=true` label if it's a Chainlink node. +// Note: If you're modifying ConfigMap values, you'll probably need to use RollOutStatefulSets to apply the changes to the pods. +// https://stackoverflow.com/questions/57356521/rollingupdate-for-stateful-set-doesnt-restart-pods-and-changes-from-updated-con +func (m *Environment) UpdateHelm(name string, values map[string]any) (*Environment, error) { + if m.err != nil { + return nil, m.err + } + _, chart, err := m.findChart(name) + if err != nil { + return nil, err + } + if _, labelsExist := values["labels"]; !labelsExist { + values["labels"] = make(map[string]*string) + } + values["labels"].(map[string]*string)["updated"] = a.Str("true") + if err = mergo.Merge(chart.GetValues(), values, mergo.WithOverride); err != nil { + return nil, err + } + return m.ReplaceHelm(name, chart) +} + +// AddHelmCharts adds multiple helm charts to the testing environment +func (m *Environment) AddHelmCharts(charts []ConnectedChart) *Environment { + if m.err != nil { + return m + } + for _, c := range charts { + m.AddHelm(c) + } + return m +} + +// AddHelm adds a helm chart to the testing environment +func (m *Environment) AddHelm(chart ConnectedChart) *Environment { + if m.err != nil { + return m + } + if m.Cfg.JobImage != "" || !chart.IsDeploymentNeeded() { + return m + } + config.JSIIGlobalMu.Lock() + defer config.JSIIGlobalMu.Unlock() + + values := &map[string]any{ + "tolerations": m.Cfg.Tolerations, + "nodeSelector": m.Cfg.NodeSelector, + } + config.MustMerge(values, chart.GetValues()) + log.Trace(). + Str("Chart", chart.GetName()). + Str("Path", chart.GetPath()). + Interface("Props", chart.GetProps()). + Interface("Values", values). + Msg("Chart deployment values") + helmFlags := []*string{ + a.Str("--namespace"), + a.Str(m.Cfg.Namespace), + a.Str("--skip-tests"), + } + if chart.GetVersion() != "" { + helmFlags = append(helmFlags, a.Str("--version"), a.Str(chart.GetVersion())) + } + chartPath, err := m.PullOCIChart(chart) + if err != nil { + m.err = err + return m + } + h := cdk8s.NewHelm(m.root, a.Str(chart.GetName()), &cdk8s.HelmProps{ + Chart: a.Str(chartPath), + HelmFlags: &helmFlags, + ReleaseName: a.Str(chart.GetName()), + Values: values, + }) + addDefaultPodAnnotationsAndLabels(h, markNotSafeToEvict(m.Cfg.PreventPodEviction, nil), m.Cfg.PodLabels) + m.Charts = append(m.Charts, chart) + return m +} + +// PullOCIChart handles working with OCI format repositories +// https://helm.sh/docs/topics/registries/ +// API is not compatible between helm repos and OCI repos, so we download and untar the chart +func (m *Environment) PullOCIChart(chart ConnectedChart) (string, error) { + if !strings.HasPrefix(chart.GetPath(), "oci") { + return chart.GetPath(), nil + } + cp := strings.Split(chart.GetPath(), "/") + if len(cp) != 5 { + return "", fmt.Errorf(ErrInvalidOCI, chart.GetPath()) + } + sp := strings.Split(chart.GetPath(), ":") + + var cmd string + var chartName string + chartName = cp[len(cp)-1] + chartDir := uuid.NewString() + switch len(sp) { + case 2: + cmd = fmt.Sprintf("helm pull %s --untar --untardir %s", chart.GetPath(), chartDir) + case 3: + chartName = strings.Split(chartName, ":")[0] + cmd = fmt.Sprintf("helm pull %s --version %s --untar --untardir %s", fmt.Sprintf("%s:%s", sp[0], sp[1]), sp[2], chartDir) + default: + return "", fmt.Errorf(ErrInvalidOCI, chart.GetPath()) + } + log.Info().Str("CMD", cmd).Msg("Running helm cmd") + if err := client.ExecCmd(cmd); err != nil { + return "", fmt.Errorf(ErrOCIPull, chart.GetPath()) + } + localChartPath := fmt.Sprintf("%s/%s/", chartDir, chartName) + log.Info().Str("Path", localChartPath).Msg("Local chart path") + return localChartPath, nil +} + +// PrintExportData prints export data +func (m *Environment) PrintExportData() error { + m.URLs = make(map[string][]string) + for _, c := range m.Charts { + err := c.ExportData(m) + if err != nil { + return err + } + } + log.Debug().Interface("URLs", m.URLs).Msg("Connection URLs") + return nil +} + +// DumpLogs dumps all logs into a file +func (m *Environment) DumpLogs(path string) error { + arts, err := NewArtifacts(m.Client, m.Cfg.Namespace) + if err != nil { + return err + } + if path == "" { + path = fmt.Sprintf("logs/%s-%d", m.Cfg.Namespace, time.Now().Unix()) + } + return arts.DumpTestResult(path, "chainlink") +} + +// ResourcesSummary returns resources summary for selected pods as a map, used in reports +func (m *Environment) ResourcesSummary(selector string) (map[string]map[string]string, error) { + pl, err := m.Client.ListPods(m.Cfg.Namespace, selector) + if err != nil { + return nil, err + } + if len(pl.Items) == 0 { + return nil, errors.Errorf("no pods found for selector: %s", selector) + } + resources := make(map[string]map[string]string) + for _, p := range pl.Items { + for _, c := range p.Spec.Containers { + if resources[c.Name] == nil { + resources[c.Name] = make(map[string]string) + } + cpuRes := c.Resources.Requests["cpu"] + resources[c.Name]["cpu"] = cpuRes.String() + memRes := c.Resources.Requests["memory"] + resources[c.Name]["memory"] = memRes.String() + } + } + return resources, nil +} + +// ClearCharts recreates cdk8s app +func (m *Environment) ClearCharts() error { + m.Charts = make([]ConnectedChart, 0) + if err := m.initApp(); err != nil { + log.Error().Err(err).Msg("failed to apply the initial manifest to create the namespace") + return err + } + return nil +} + +func (m *Environment) Manifest() string { + return m.CurrentManifest +} + +// Update current manifest based on the cdk8s app state +func (m *Environment) UpdateManifest() { + config.JSIIGlobalMu.Lock() + m.CurrentManifest = *m.App.SynthYaml() + config.JSIIGlobalMu.Unlock() +} + +// RunCustomReadyConditions Runs the environment with custom ready conditions for a supplied pod count +func (m *Environment) RunCustomReadyConditions(customCheck *client.ReadyCheckData, podCount int) error { + if m.err != nil { + return m.err + } + if m.Cfg.jobDeployed { + return nil + } + if m.Cfg.JobImage != "" { + if m.Cfg.Test == nil { + return errors.New("Test must be configured in the environment when using the remote runner") + } + rrSelector := map[string]*string{pkg.NamespaceLabelKey: a.Str(m.Cfg.Namespace)} + m.AddChart(NewRunner(&Props{ + BaseName: REMOTE_RUNNER_NAME, + TargetNamespace: m.Cfg.Namespace, + Labels: &rrSelector, + Image: m.Cfg.JobImage, + TestName: m.Cfg.Test.Name(), + NoManifestUpdate: m.Cfg.NoManifestUpdate, + PreventPodEviction: m.Cfg.PreventPodEviction, + })) + } + m.UpdateManifest() + m.ChainlinkNodeDetails = []*ChainlinkNodeDetail{} // Resets potentially old details if re-deploying + if m.Cfg.DryRun { + log.Info().Msg("Dry-run mode, manifest synthesized and saved as tmp-manifest.yaml") + return nil + } + manifestUpdate := os.Getenv(config.EnvVarNoManifestUpdate) + if manifestUpdate != "" { + mu, err := strconv.ParseBool(manifestUpdate) + if err != nil { + return fmt.Errorf("manifest update should be bool: true, false") + } + m.Cfg.NoManifestUpdate = mu + } + log.Debug().Bool("ManifestUpdate", !m.Cfg.NoManifestUpdate).Msg("Update mode") + if !m.Cfg.NoManifestUpdate || m.Cfg.JobImage != "" { + if err := m.DeployCustomReadyConditions(customCheck, podCount); err != nil { + log.Error().Err(err).Msg("Error deploying environment") + _ = m.Shutdown() + return err + } + } + if m.Cfg.JobImage != "" { + log.Info().Msg("Waiting for remote runner to complete") + // Do not wait for the job to complete if we are running something like a soak test in the remote runner + if m.Cfg.detachRunner { + return nil + } + if err := m.Client.WaitForJob(m.Cfg.Namespace, "remote-test-runner", func(message string) { + if m.Cfg.JobLogFunction != nil { + m.Cfg.JobLogFunction(m, message) + } else { + DefaultJobLogFunction(m, message) + } + }); err != nil { + return err + } + if m.Cfg.fundReturnFailed { + return errors.New("failed to return funds in remote runner") + } + m.Cfg.jobDeployed = true + } else { + if err := m.Fwd.Connect(m.Cfg.Namespace, "", m.Cfg.InsideK8s); err != nil { + return err + } + log.Debug().Interface("Ports", m.Fwd.Info).Msg("Forwarded ports") + m.Fwd.PrintLocalPorts() + if err := m.PrintExportData(); err != nil { + return err + } + arts, err := NewArtifacts(m.Client, m.Cfg.Namespace) + if err != nil { + log.Error().Err(err).Msg("failed to create artifacts client") + return err + } + m.Artifacts = arts + if len(m.URLs["goc"]) != 0 { + m.httpClient = resty.New().SetBaseURL(m.URLs["goc"][0]) + } + if m.Cfg.KeepConnection { + log.Info().Msg("Keeping forwarder connections, press Ctrl+C to interrupt") + if m.Cfg.RemoveOnInterrupt { + log.Warn().Msg("Environment will be removed on interrupt") + } + ch := make(chan os.Signal, 1) + signal.Notify(ch, os.Interrupt, syscall.SIGTERM) + <-ch + log.Warn().Msg("Interrupted") + if m.Cfg.RemoveOnInterrupt { + return m.Client.RemoveNamespace(m.Cfg.Namespace) + } + } + } + return nil +} + +// RunUpdated runs the environment and checks for pods with `updated=true` label +func (m *Environment) RunUpdated(podCount int) error { + if m.err != nil { + return m.err + } + conds := &client.ReadyCheckData{ + ReadinessProbeCheckSelector: "updated=true", + Timeout: 10 * time.Minute, + } + return m.RunCustomReadyConditions(conds, podCount) +} + +// Run deploys or connects to already created environment +func (m *Environment) Run() error { + if m.err != nil { + return m.err + } + return m.RunCustomReadyConditions(nil, 0) +} + +func (m *Environment) enumerateApps() error { + apps, err := m.Client.UniqueLabels(m.Cfg.Namespace, client.AppLabel) + if err != nil { + return err + } + for _, app := range apps { + if err := m.Client.EnumerateInstances(m.Cfg.Namespace, fmt.Sprintf("app=%s", app)); err != nil { + return err + } + } + return nil +} + +// DeployCustomReadyConditions deploy current manifest with added custom readiness checks +func (m *Environment) DeployCustomReadyConditions(customCheck *client.ReadyCheckData, customPodCount int) error { + if m.err != nil { + return m.err + } + log.Info().Str("Namespace", m.Cfg.Namespace).Msg("Deploying namespace") + + if m.Cfg.DryRun { + return m.Client.DryRun(m.CurrentManifest) + } + ctx, cancel := context.WithTimeout(context.Background(), m.Cfg.ReadyCheckData.Timeout) + defer cancel() + err := m.Client.Apply(ctx, m.CurrentManifest, m.Cfg.Namespace, true) + if errors.Is(ctx.Err(), context.DeadlineExceeded) { + return errors.New("timeout waiting for environment to be ready") + } + if err != nil { + return err + } + if int64(m.Cfg.UpdateWaitInterval) != 0 { + time.Sleep(m.Cfg.UpdateWaitInterval) + } + + expectedPodCount := m.findPodCountInDeploymentManifest() + + if err := m.Client.WaitPodsReady(m.Cfg.Namespace, m.Cfg.ReadyCheckData, expectedPodCount); err != nil { + return err + } + if customCheck != nil { + if err := m.Client.WaitPodsReady(m.Cfg.Namespace, customCheck, customPodCount); err != nil { + return err + } + } + return m.enumerateApps() +} + +// Deploy deploy current manifest and check logs for readiness +func (m *Environment) Deploy() error { + return m.DeployCustomReadyConditions(nil, 0) +} + +// RolloutStatefulSets applies "rollout statefulset" to all existing statefulsets in our namespace +func (m *Environment) RolloutStatefulSets() error { + if m.err != nil { + return m.err + } + ctx, cancel := context.WithTimeout(context.Background(), m.Cfg.ReadyCheckData.Timeout) + defer cancel() + err := m.Client.RolloutStatefulSets(ctx, m.Cfg.Namespace) + if errors.Is(ctx.Err(), context.DeadlineExceeded) { + return errors.New("timeout waiting for rollout statefulset to complete") + } + return err +} + +// RolloutRestartBySelector applies "rollout restart" to the selected resources +func (m *Environment) RolloutRestartBySelector(resource string, selector string) error { + if m.err != nil { + return m.err + } + ctx, cancel := context.WithTimeout(context.Background(), m.Cfg.ReadyCheckData.Timeout) + defer cancel() + err := m.Client.RolloutRestartBySelector(ctx, m.Cfg.Namespace, resource, selector) + if errors.Is(ctx.Err(), context.DeadlineExceeded) { + return errors.New("timeout waiting for rollout restart to complete") + } + return err +} + +// findPodsInDeploymentManifest finds all the pods we will be deploying +func (m *Environment) findPodCountInDeploymentManifest() int { + config.JSIIGlobalMu.Lock() + defer config.JSIIGlobalMu.Unlock() + podCount := 0 + charts := m.App.Charts() + for _, chart := range *charts { + json := chart.ToJson() + if json == nil { + continue + } + for _, j := range *json { + m := j.(map[string]any) + // if the kind is a deployment then we want to see if it has replicas to count towards the app count + if _, ok := m["kind"]; !ok { + continue + } + kind := m["kind"].(string) + if kind == "Deployment" || kind == "StatefulSet" { + if _, ok := m["spec"]; !ok { + continue + } + podCount += getReplicaCount(m["spec"].(map[string]any)) + } + } + + } + return podCount +} + +func getReplicaCount(spec map[string]any) int { + if spec == nil { + return 0 + } + if _, ok := spec["selector"]; !ok { + return 0 + } + s := spec["selector"].(map[string]any) + if s == nil { + return 0 + } + if _, ok := s["matchLabels"]; !ok { + return 0 + } + m := s["matchLabels"].(map[string]any) + if m == nil { + return 0 + } + if _, ok := m[client.AppLabel]; !ok { + return 0 + } + l := m[client.AppLabel] + if l == nil { + return 0 + } + + replicaCount := 0 + var replicas any + replicas, ok := spec["replicas"] + if ok { + replicaCount += int(replicas.(float64)) + } else { + replicaCount++ + } + + return replicaCount +} + +type CoverageProfileParams struct { + Force bool `form:"force" json:"force"` + Service []string `form:"service" json:"service"` + Address []string `form:"address" json:"address"` + CoverFilePatterns []string `form:"coverfile" json:"coverfile"` + SkipFilePatterns []string `form:"skipfile" json:"skipfile"` +} + +func (m *Environment) getCoverageList() (map[string]any, error) { + var servicesMap map[string]any + resp, err := m.httpClient.R(). + SetResult(&servicesMap). + Get("v1/cover/list") + if err != nil { + return nil, err + } + if resp.Status() != "200 OK" { + return nil, errors.New("coverage service list request is not 200") + } + return servicesMap, nil +} + +func (m *Environment) ClearCoverage() error { + servicesMap, err := m.getCoverageList() + if err != nil { + return err + } + for serviceName := range servicesMap { + r, err := m.httpClient.R(). + SetBody(CoverageProfileParams{Service: []string{serviceName}}). + Post("v1/cover/clear") + if err != nil { + return err + } + if r.Status() != "200 OK" { + return errors.New("coverage service list request is not 200") + } + log.Debug().Str("Service", serviceName).Msg("Coverage cleared") + } + return nil +} + +func (m *Environment) SaveCoverage() error { + if err := MkdirIfNotExists(COVERAGE_DIR); err != nil { + return err + } + servicesMap, err := m.getCoverageList() + if err != nil { + return err + } + log.Debug().Interface("Services", servicesMap).Msg("Services eligible for coverage") + for serviceName := range servicesMap { + r, err := m.httpClient.R(). + SetBody(CoverageProfileParams{Service: []string{serviceName}}). + Post("v1/cover/profile") + if err != nil { + return err + } + if r.Status() != "200 OK" { + return errors.New("coverage service list request is not 200") + } + log.Debug().Str("Service", serviceName).Msg("Coverage received") + if err := os.WriteFile(fmt.Sprintf("%s/%s.cov", COVERAGE_DIR, serviceName), r.Body(), os.ModePerm); err != nil { + return err + } + } + return nil +} + +// Shutdown environment, remove namespace +func (m *Environment) Shutdown() error { + // don't shutdown if returning of funds failed + if m.Cfg.fundReturnFailed { + return nil + } + + // don't shutdown if this is a test running remotely + if m.Cfg.InsideK8s { + return nil + } + + keepEnvs := os.Getenv(config.EnvVarKeepEnvironments) + if keepEnvs == "" { + keepEnvs = "NEVER" + } + + shouldShutdown := false + switch strings.ToUpper(keepEnvs) { + case "ALWAYS": + return nil + case "ONFAIL": + if m.Cfg.Test != nil { + if !m.Cfg.Test.Failed() { + shouldShutdown = true + } + } + case "NEVER": + shouldShutdown = true + default: + log.Warn().Str("Invalid Keep Value", keepEnvs). + Msg("Invalid 'keep_environments' value, see the KEEP_ENVIRONMENTS env var") + } + + if shouldShutdown { + return m.Client.RemoveNamespace(m.Cfg.Namespace) + } + return nil +} + +// BeforeTest sets the test name variable and determines if we need to start the remote runner +func (m *Environment) WillUseRemoteRunner() bool { + val, _ := os.LookupEnv(config.EnvVarJobImage) + return val != "" && m.Cfg.Test.Name() != "" +} + +func DefaultJobLogFunction(e *Environment, message string) { + e.Cfg.Test.Log(message) + found := strings.Contains(message, FAILED_FUND_RETURN) + if found { + e.Cfg.fundReturnFailed = true + } +} + +// markNotSafeToEvict adds the safe to evict annotation to the provided map if needed +func markNotSafeToEvict(preventPodEviction bool, m map[string]string) map[string]string { + if m == nil { + m = make(map[string]string) + } + if preventPodEviction { + m["karpenter.sh/do-not-evict"] = "true" + m["cluster-autoscaler.kubernetes.io/safe-to-evict"] = "false" + } + + return m +} diff --git a/env/environment/runner.go b/env/environment/runner.go new file mode 100644 index 000000000..a4649b8c9 --- /dev/null +++ b/env/environment/runner.go @@ -0,0 +1,247 @@ +package environment + +import ( + "fmt" + "os" + "strconv" + "strings" + + "github.com/cdk8s-team/cdk8s-core-go/cdk8s/v2" + "github.com/rs/zerolog/log" + + "github.com/smartcontractkit/chainlink-testing-framework/env/config" + "github.com/smartcontractkit/chainlink-testing-framework/env/imports/k8s" + a "github.com/smartcontractkit/chainlink-testing-framework/env/pkg/alias" +) + +const REMOTE_RUNNER_NAME = "remote-test-runner" + +type Chart struct { + Props *Props +} + +func (m Chart) IsDeploymentNeeded() bool { + return true +} + +func (m Chart) GetName() string { + return REMOTE_RUNNER_NAME +} + +func (m Chart) GetProps() interface{} { + return m.Props +} + +func (m Chart) GetPath() string { + return "" +} + +func (m Chart) GetVersion() string { + return "" +} + +func (m Chart) GetValues() *map[string]interface{} { + return nil +} + +func (m Chart) ExportData(e *Environment) error { + return nil +} + +func NewRunner(props *Props) func(root cdk8s.Chart) ConnectedChart { + return func(root cdk8s.Chart) ConnectedChart { + c := &Chart{ + Props: props, + } + role(root, props) + job(root, props) + return c + } +} + +type Props struct { + BaseName string + TargetNamespace string + Labels *map[string]*string + Image string + TestName string + NoManifestUpdate bool + PreventPodEviction bool +} + +func role(chart cdk8s.Chart, props *Props) { + k8s.NewKubeRole( + chart, + a.Str(fmt.Sprintf("%s-role", props.BaseName)), + &k8s.KubeRoleProps{ + Metadata: &k8s.ObjectMeta{ + Name: a.Str(props.BaseName), + }, + Rules: &[]*k8s.PolicyRule{ + { + ApiGroups: &[]*string{ + a.Str(""), // this empty line is needed or k8s get really angry + a.Str("apps"), + a.Str("batch"), + a.Str("core"), + a.Str("networking.k8s.io"), + a.Str("storage.k8s.io"), + a.Str("policy"), + a.Str("chaos-mesh.org"), + a.Str("monitoring.coreos.com"), + a.Str("rbac.authorization.k8s.io"), + }, + Resources: &[]*string{ + a.Str("*"), + }, + Verbs: &[]*string{ + a.Str("*"), + }, + }, + }, + }) + k8s.NewKubeRoleBinding( + chart, + a.Str(fmt.Sprintf("%s-role-binding", props.BaseName)), + &k8s.KubeRoleBindingProps{ + RoleRef: &k8s.RoleRef{ + ApiGroup: a.Str("rbac.authorization.k8s.io"), + Kind: a.Str("Role"), + Name: a.Str("remote-test-runner"), + }, + Metadata: nil, + Subjects: &[]*k8s.Subject{ + { + Kind: a.Str("ServiceAccount"), + Name: a.Str("default"), + Namespace: a.Str(props.TargetNamespace), + }, + }, + }, + ) +} + +func job(chart cdk8s.Chart, props *Props) { + defaultRunnerPodAnnotations := markNotSafeToEvict(props.PreventPodEviction, nil) + restartPolicy := "Never" + backOffLimit := float64(0) + if os.Getenv(config.EnvVarDetachRunner) == "true" { // If we're running detached, we're likely running a long-form test + restartPolicy = "OnFailure" + backOffLimit = 100000 // effectively infinite (I hope) + } + k8s.NewKubeJob( + chart, + a.Str(fmt.Sprintf("%s-job", props.BaseName)), + &k8s.KubeJobProps{ + Metadata: &k8s.ObjectMeta{ + Name: a.Str(props.BaseName), + }, + Spec: &k8s.JobSpec{ + Template: &k8s.PodTemplateSpec{ + Metadata: &k8s.ObjectMeta{ + Labels: props.Labels, + Annotations: a.ConvertAnnotations(defaultRunnerPodAnnotations), + }, + Spec: &k8s.PodSpec{ + ServiceAccountName: a.Str("default"), + Containers: &[]*k8s.Container{ + container(props), + }, + RestartPolicy: a.Str(restartPolicy), + Volumes: &[]*k8s.Volume{ + { + Name: a.Str("persistence"), + EmptyDir: &k8s.EmptyDirVolumeSource{}, + }, + }, + }, + }, + ActiveDeadlineSeconds: nil, + BackoffLimit: a.Num(backOffLimit), + }, + }) +} + +func container(props *Props) *k8s.Container { + cpu := os.Getenv(config.EnvVarRemoteRunnerCpu) + if cpu == "" { + cpu = "1000m" + } + mem := os.Getenv(config.EnvVarRemoteRunnerMem) + if mem == "" { + mem = "1024Mi" + } + return &k8s.Container{ + Name: a.Str(fmt.Sprintf("%s-node", props.BaseName)), + Image: a.Str(props.Image), + ImagePullPolicy: a.Str("Always"), + Env: jobEnvVars(props), + Resources: a.ContainerResources(cpu, mem, cpu, mem), + VolumeMounts: &[]*k8s.VolumeMount{ + { + Name: a.Str("persistence"), + MountPath: a.Str("/persistence"), + }, + }, + } +} + +func jobEnvVars(props *Props) *[]*k8s.EnvVar { + // Use a map to set values so we can easily overwrite duplicate values + env := make(map[string]string) + + // Propagate common environment variables to the runner + lookups := []string{ + config.EnvVarCLImage, + config.EnvVarCLTag, + config.EnvVarCLCommitSha, + config.EnvVarLogLevel, + config.EnvVarTestTrigger, + config.EnvVarToleration, + config.EnvVarSlackChannel, + config.EnvVarSlackKey, + config.EnvVarSlackUser, + config.EnvVarPyroscopeKey, + config.EnvVarPyroscopeEnvironment, + config.EnvVarPyroscopeServer, + config.EnvVarUser, + config.EnvVarNodeSelector, + config.EnvVarSelectedNetworks, + config.EnvVarDBURL, + config.EnvVarEVMKeys, + config.EnvVarInternalDockerRepo, + config.EnvVarEVMUrls, + config.EnvVarEVMHttpUrls, + } + for _, k := range lookups { + v, success := os.LookupEnv(k) + if success && len(v) > 0 { + log.Debug().Str(k, v).Msg("Forwarding Env Var") + env[k] = v + } + } + + // Propagate prefixed variables to the runner + // These should overwrite anything that was unprefixed if they match up + for _, e := range os.Environ() { + if i := strings.Index(e, "="); i >= 0 { + if strings.HasPrefix(e[:i], config.EnvVarPrefix) { + withoutPrefix := strings.Replace(e[:i], config.EnvVarPrefix, "", 1) + env[withoutPrefix] = e[i+1:] + } + } + } + + // Add variables that should need specific values for thre remote runner + env[config.EnvVarNamespace] = props.TargetNamespace + env["TEST_NAME"] = props.TestName + env[config.EnvVarInsideK8s] = "true" + env[config.EnvVarNoManifestUpdate] = strconv.FormatBool(props.NoManifestUpdate) + + // convert from map to the expected array + cdk8sVars := make([]*k8s.EnvVar, 0) + for k, v := range env { + cdk8sVars = append(cdk8sVars, a.EnvVarStr(k, v)) + } + return &cdk8sVars +} diff --git a/env/examples/clones/clones.go b/env/examples/clones/clones.go new file mode 100644 index 000000000..d8c54c2d3 --- /dev/null +++ b/env/examples/clones/clones.go @@ -0,0 +1,53 @@ +package main + +import ( + "fmt" + + "github.com/smartcontractkit/chainlink-testing-framework/env/environment" + "github.com/smartcontractkit/chainlink-testing-framework/env/pkg" + "github.com/smartcontractkit/chainlink-testing-framework/env/pkg/helm/chainlink" + "github.com/smartcontractkit/chainlink-testing-framework/env/pkg/helm/ethereum" +) + +func main() { + // Multiple environments of the same type/chart + err := environment.New(&environment.Config{ + Labels: []string{fmt.Sprintf("envType=%s", pkg.EnvTypeEVM5)}, + KeepConnection: true, + RemoveOnInterrupt: true, + }). + AddHelm(ethereum.New(nil)). + AddHelm(chainlink.New(0, map[string]interface{}{ + "chainlink": map[string]interface{}{ + "resources": map[string]interface{}{ + "requests": map[string]interface{}{ + "cpu": "344m", + }, + "limits": map[string]interface{}{ + "cpu": "344m", + }, + }, + }, + "db": map[string]interface{}{ + "stateful": "true", + "capacity": "1Gi", + }, + })). + AddHelm(chainlink.New(1, + map[string]interface{}{ + "chainlink": map[string]interface{}{ + "resources": map[string]interface{}{ + "requests": map[string]interface{}{ + "cpu": "577m", + }, + "limits": map[string]interface{}{ + "cpu": "577m", + }, + }, + }, + })). + Run() + if err != nil { + panic(err) + } +} diff --git a/env/examples/concurrent/env_test.go b/env/examples/concurrent/env_test.go new file mode 100644 index 000000000..048219e81 --- /dev/null +++ b/env/examples/concurrent/env_test.go @@ -0,0 +1,35 @@ +package concurrent_test + +import ( + "testing" + + "github.com/smartcontractkit/chainlink-testing-framework/env/environment" + "github.com/smartcontractkit/chainlink-testing-framework/env/pkg/helm/chainlink" + "github.com/stretchr/testify/require" +) + +func TestConcurrentEnvs(t *testing.T) { + t.Run("test 1", func(t *testing.T) { + t.Parallel() + e := environment.New(nil). + AddHelm(chainlink.New(0, nil)) + defer e.Shutdown() + err := e.Run() + require.NoError(t, err) + }) + t.Run("test 2", func(t *testing.T) { + t.Parallel() + e := environment.New(nil). + AddHelm(chainlink.New(0, nil)) + defer e.Shutdown() + err := e.Run() + require.NoError(t, err) + e, err = e. + ReplaceHelm("chainlink-0", chainlink.New(0, map[string]any{ + "replicas": 2, + })) + require.NoError(t, err) + err = e.Run() + require.NoError(t, err) + }) +} diff --git a/env/examples/coverage/Dockerfile b/env/examples/coverage/Dockerfile new file mode 100644 index 000000000..947bbd834 --- /dev/null +++ b/env/examples/coverage/Dockerfile @@ -0,0 +1,5 @@ +FROM golang:1.21-buster + +RUN curl -s https://api.github.com/repos/qiniu/goc/releases/latest | grep "browser_download_url.*-linux-amd64.tar.gz" | cut -d : -f 2,3 | tr -d \" | xargs -n 1 curl -L | tar -zx && chmod +x goc && mv goc /usr/local/bin + +CMD ["goc", "server"] \ No newline at end of file diff --git a/env/examples/coverage/Dockerfile.target b/env/examples/coverage/Dockerfile.target new file mode 100644 index 000000000..3ca0fc3d0 --- /dev/null +++ b/env/examples/coverage/Dockerfile.target @@ -0,0 +1,8 @@ +FROM public.ecr.aws/chainlink/goc:latest + +COPY . app/ +WORKDIR app/cmd +RUN goc build -o service1 . --center http://goc:7777 +RUN chmod +x ../entrypoint.sh + +CMD ["../entrypoint.sh"] \ No newline at end of file diff --git a/env/examples/coverage/entrypoint.sh b/env/examples/coverage/entrypoint.sh new file mode 100644 index 000000000..38f62f228 --- /dev/null +++ b/env/examples/coverage/entrypoint.sh @@ -0,0 +1,2 @@ +#!/usr/bin/env bash +sleep 30 && ./service1 \ No newline at end of file diff --git a/env/examples/coverage/env.go b/env/examples/coverage/env.go new file mode 100644 index 000000000..89ffeef81 --- /dev/null +++ b/env/examples/coverage/env.go @@ -0,0 +1,27 @@ +package main + +import ( + "time" + + "github.com/smartcontractkit/chainlink-testing-framework/env/environment" + goc "github.com/smartcontractkit/chainlink-testing-framework/env/pkg/cdk8s/goc" + dummy "github.com/smartcontractkit/chainlink-testing-framework/env/pkg/cdk8s/http_dummy" +) + +func main() { + e := environment.New(nil). + AddChart(goc.New()). + AddChart(dummy.New()) + if err := e.Run(); err != nil { + panic(err) + } + // run your test logic here + time.Sleep(1 * time.Minute) + if err := e.SaveCoverage(); err != nil { + panic(err) + } + // clear the coverage, rerun the tests again if needed + if err := e.ClearCoverage(); err != nil { + panic(err) + } +} diff --git a/env/examples/deployment_part/cmd/env.go b/env/examples/deployment_part/cmd/env.go new file mode 100644 index 000000000..468c84474 --- /dev/null +++ b/env/examples/deployment_part/cmd/env.go @@ -0,0 +1,38 @@ +package main + +import ( + "time" + + "github.com/smartcontractkit/chainlink-testing-framework/env/environment" + "github.com/smartcontractkit/chainlink-testing-framework/env/examples/deployment_part" + "github.com/smartcontractkit/chainlink-testing-framework/env/pkg/helm/chainlink" +) + +func main() { + e := environment.New(&environment.Config{ + NamespacePrefix: "adding-new-deployment-part", + TTL: 3 * time.Hour, + KeepConnection: true, + RemoveOnInterrupt: true, + }). + AddHelm(deployment_part.New(nil)). + AddHelm(chainlink.New(0, map[string]interface{}{ + "replicas": 5, + "env": map[string]interface{}{ + "SOLANA_ENABLED": "true", + "EVM_ENABLED": "false", + "EVM_RPC_ENABLED": "false", + "CHAINLINK_DEV": "false", + "FEATURE_OFFCHAIN_REPORTING2": "true", + "feature_offchain_reporting": "false", + "P2P_NETWORKING_STACK": "V2", + "P2PV2_LISTEN_ADDRESSES": "0.0.0.0:6690", + "P2PV2_DELTA_DIAL": "5s", + "P2PV2_DELTA_RECONCILE": "5s", + "p2p_listen_port": "0", + }, + })) + if err := e.Run(); err != nil { + panic(err) + } +} diff --git a/env/examples/deployment_part/sol.go b/env/examples/deployment_part/sol.go new file mode 100644 index 000000000..7db11947d --- /dev/null +++ b/env/examples/deployment_part/sol.go @@ -0,0 +1,111 @@ +package deployment_part + +import ( + "github.com/rs/zerolog/log" + + "github.com/smartcontractkit/chainlink-testing-framework/env/client" + "github.com/smartcontractkit/chainlink-testing-framework/env/environment" +) + +type Props struct { + NetworkName string `envconfig:"network_name"` + HttpURLs []string `envconfig:"http_url"` + WsURLs []string `envconfig:"ws_url"` + Values map[string]interface{} +} + +type HelmProps struct { + Name string + Path string + Version string + Values *map[string]interface{} +} + +type Chart struct { + HelmProps *HelmProps + Props *Props +} + +func (m Chart) IsDeploymentNeeded() bool { + return true +} + +func (m Chart) GetProps() interface{} { + return m.Props +} + +func (m Chart) GetName() string { + return m.HelmProps.Name +} + +func (m Chart) GetPath() string { + return m.HelmProps.Path +} + +func (m Chart) GetVersion() string { + return m.HelmProps.Version +} + +func (m Chart) GetValues() *map[string]interface{} { + return m.HelmProps.Values +} + +func (m Chart) ExportData(e *environment.Environment) error { + netLocal, err := e.Fwd.FindPort("sol:0", "sol-val", "http-rpc").As(client.LocalConnection, client.HTTP) + if err != nil { + return err + } + netLocalWS, err := e.Fwd.FindPort("sol:0", "sol-val", "ws-rpc").As(client.LocalConnection, client.WS) + if err != nil { + return err + } + netInternal, err := e.Fwd.FindPort("sol:0", "sol-val", "http-rpc").As(client.RemoteConnection, client.HTTP) + if err != nil { + return err + } + e.URLs[m.Props.NetworkName] = []string{netLocal, netLocalWS} + if e.Cfg.InsideK8s { + e.URLs[m.Props.NetworkName] = []string{netInternal} + } + log.Info().Str("Name", m.Props.NetworkName).Str("URLs", netLocal).Msg("Solana network") + return nil +} + +func defaultProps() *Props { + return &Props{ + NetworkName: "sol", + Values: map[string]interface{}{ + "replicas": "1", + "sol": map[string]interface{}{ + "image": map[string]interface{}{ + "image": "solanalabs/solana", + "version": "v1.9.14", + }, + "resources": map[string]interface{}{ + "requests": map[string]interface{}{ + "cpu": "2000m", + "memory": "4000Mi", + }, + "limits": map[string]interface{}{ + "cpu": "2000m", + "memory": "4000Mi", + }, + }, + }, + }, + } +} + +func New(props *Props) environment.ConnectedChart { + if props == nil { + props = defaultProps() + } + return Chart{ + HelmProps: &HelmProps{ + Name: "sol", + Path: "chainlink-qa/solana-validator", + Values: &props.Values, + }, + Props: props, + } +} diff --git a/env/examples/deployment_part_cdk8s/blockscout.go b/env/examples/deployment_part_cdk8s/blockscout.go new file mode 100644 index 000000000..366b2f635 --- /dev/null +++ b/env/examples/deployment_part_cdk8s/blockscout.go @@ -0,0 +1,212 @@ +package deployment_part_cdk8s + +import ( + "fmt" + + cdk8s "github.com/cdk8s-team/cdk8s-core-go/cdk8s/v2" + "github.com/rs/zerolog/log" + "github.com/smartcontractkit/chainlink-testing-framework/env/client" + "github.com/smartcontractkit/chainlink-testing-framework/env/config" + "github.com/smartcontractkit/chainlink-testing-framework/env/environment" + "github.com/smartcontractkit/chainlink-testing-framework/env/imports/k8s" + "github.com/smartcontractkit/chainlink-testing-framework/env/pkg" + a "github.com/smartcontractkit/chainlink-testing-framework/env/pkg/alias" +) + +const ( + URLsKey = "blockscout" +) + +type Chart struct { + Props *Props +} + +func (m Chart) IsDeploymentNeeded() bool { + return true +} + +func (m Chart) GetName() string { + return "blockscout" +} + +func (m Chart) GetProps() interface{} { + return m.Props +} + +func (m Chart) GetPath() string { + return "" +} + +func (m Chart) GetVersion() string { + return "" +} + +func (m Chart) GetValues() *map[string]interface{} { + return nil +} + +func (m Chart) ExportData(e *environment.Environment) error { + bsURL, err := e.Fwd.FindPort("blockscout:0", "blockscout-node", "explorer").As(client.LocalConnection, client.HTTP) + if err != nil { + return err + } + log.Info().Str("URL", bsURL).Msg("Blockscout explorer") + e.URLs[URLsKey] = []string{bsURL} + return nil +} + +func New(props *Props) func(root cdk8s.Chart) environment.ConnectedChart { + return func(root cdk8s.Chart) environment.ConnectedChart { + dp := defaultProps() + config.MustMerge(dp, props) + c := &Chart{ + Props: dp, + } + vars := vars{ + Labels: &map[string]*string{ + "app": a.Str(c.GetName()), + }, + ConfigMapName: fmt.Sprintf("%s-cm", c.GetName()), + BaseName: c.GetName(), + Port: 4000, + Props: dp, + } + service(root, vars) + deployment(root, vars) + return c + } +} + +type Props struct { + HttpURL string `envconfig:"http_url"` + WsURL string `envconfig:"ws_url"` +} + +func defaultProps() *Props { + return &Props{ + HttpURL: "http://geth:8544", + WsURL: "ws://geth:8546", + } +} + +// vars some shared labels/selectors and names that must match in resources +type vars struct { + Labels *map[string]*string + BaseName string + ConfigMapName string + Port float64 + Props *Props +} + +func service(chart cdk8s.Chart, vars vars) { + k8s.NewKubeService(chart, a.Str(fmt.Sprintf("%s-service", vars.BaseName)), &k8s.KubeServiceProps{ + Metadata: &k8s.ObjectMeta{ + Name: a.Str(vars.BaseName), + }, + Spec: &k8s.ServiceSpec{ + Ports: &[]*k8s.ServicePort{ + { + Name: a.Str("explorer"), + Port: a.Num(vars.Port), + TargetPort: k8s.IntOrString_FromNumber(a.Num(4000)), + }, + }, + Selector: vars.Labels, + }, + }) +} + +func postgresContainer(p vars) *k8s.Container { + return &k8s.Container{ + Name: a.Str(fmt.Sprintf("%s-db", p.BaseName)), + Image: a.Str("postgres:13.6"), + Ports: &[]*k8s.ContainerPort{ + { + Name: a.Str("postgres"), + ContainerPort: a.Num(5432), + }, + }, + Env: &[]*k8s.EnvVar{ + a.EnvVarStr("POSTGRES_PASSWORD", "postgres"), + a.EnvVarStr("POSTGRES_DB", "blockscout"), + }, + LivenessProbe: &k8s.Probe{ + Exec: &k8s.ExecAction{ + Command: pkg.PGIsReadyCheck()}, + InitialDelaySeconds: a.Num(60), + PeriodSeconds: a.Num(60), + }, + ReadinessProbe: &k8s.Probe{ + Exec: &k8s.ExecAction{ + Command: pkg.PGIsReadyCheck()}, + InitialDelaySeconds: a.Num(2), + PeriodSeconds: a.Num(2), + }, + Resources: a.ContainerResources("1000m", "2048Mi", "1000m", "2048Mi"), + } +} + +func deployment(chart cdk8s.Chart, vars vars) { + k8s.NewKubeDeployment( + chart, + a.Str(fmt.Sprintf("%s-deployment", vars.BaseName)), + &k8s.KubeDeploymentProps{ + Metadata: &k8s.ObjectMeta{ + Name: a.Str(vars.BaseName), + }, + Spec: &k8s.DeploymentSpec{ + Selector: &k8s.LabelSelector{ + MatchLabels: vars.Labels, + }, + Template: &k8s.PodTemplateSpec{ + Metadata: &k8s.ObjectMeta{ + Labels: vars.Labels, + }, + Spec: &k8s.PodSpec{ + ServiceAccountName: a.Str("default"), + Containers: &[]*k8s.Container{ + container(vars), + postgresContainer(vars), + }, + }, + }, + }, + }) +} + +func container(vars vars) *k8s.Container { + return &k8s.Container{ + Name: a.Str(fmt.Sprintf("%s-node", vars.BaseName)), + Image: a.Str("f4hrenh9it/blockscout:v1"), + ImagePullPolicy: a.Str("Always"), + Command: &[]*string{a.Str(`/bin/bash`)}, + Args: &[]*string{ + a.Str("-c"), + a.Str("mix ecto.create && mix ecto.migrate && mix phx.server"), + }, + Ports: &[]*k8s.ContainerPort{ + { + Name: a.Str("explorer"), + ContainerPort: a.Num(vars.Port), + }, + }, + ReadinessProbe: &k8s.Probe{ + HttpGet: &k8s.HttpGetAction{ + Port: k8s.IntOrString_FromNumber(a.Num(vars.Port)), + Path: a.Str("/"), + }, + InitialDelaySeconds: a.Num(20), + PeriodSeconds: a.Num(5), + }, + Env: &[]*k8s.EnvVar{ + a.EnvVarStr("MIX_ENV", "prod"), + a.EnvVarStr("ECTO_USE_SSL", "'false'"), + a.EnvVarStr("COIN", "DAI"), + a.EnvVarStr("ETHEREUM_JSONRPC_VARIANT", "geth"), + a.EnvVarStr("ETHEREUM_JSONRPC_HTTP_URL", vars.Props.HttpURL), + a.EnvVarStr("ETHEREUM_JSONRPC_WS_URL", vars.Props.WsURL), + a.EnvVarStr("DATABASE_URL", "postgresql://postgres:@localhost:5432/blockscout?ssl=false"), + }, + Resources: a.ContainerResources("300m", "2048Mi", "300m", "2048Mi"), + } +} diff --git a/env/examples/deployment_part_cdk8s/cmd/env.go b/env/examples/deployment_part_cdk8s/cmd/env.go new file mode 100644 index 000000000..59ea0c486 --- /dev/null +++ b/env/examples/deployment_part_cdk8s/cmd/env.go @@ -0,0 +1,21 @@ +package main + +import ( + "github.com/smartcontractkit/chainlink-testing-framework/env/environment" + "github.com/smartcontractkit/chainlink-testing-framework/env/examples/deployment_part_cdk8s" + "github.com/smartcontractkit/chainlink-testing-framework/env/pkg/helm/chainlink" + "github.com/smartcontractkit/chainlink-testing-framework/env/pkg/helm/ethereum" +) + +func main() { + e := environment.New(nil). + AddChart(deployment_part_cdk8s.New(&deployment_part_cdk8s.Props{})). + AddHelm(ethereum.New(nil)). + AddHelm(chainlink.New(0, map[string]interface{}{ + "replicas": 2, + })) + if err := e.Run(); err != nil { + panic(err) + } + e.Shutdown() +} diff --git a/env/examples/dump/env.go b/env/examples/dump/env.go new file mode 100644 index 000000000..a84c4d3ce --- /dev/null +++ b/env/examples/dump/env.go @@ -0,0 +1,19 @@ +package main + +import ( + "github.com/smartcontractkit/chainlink-testing-framework/env/environment" + "github.com/smartcontractkit/chainlink-testing-framework/env/pkg/helm/chainlink" + "github.com/smartcontractkit/chainlink-testing-framework/env/pkg/helm/ethereum" +) + +func main() { + e := environment.New(nil). + AddHelm(ethereum.New(nil)). + AddHelm(chainlink.New(0, nil)) + if err := e.Run(); err != nil { + panic(err) + } + if err := e.DumpLogs("logs/mytest"); err != nil { + panic(err) + } +} diff --git a/env/examples/modify_cdk8s/env.go b/env/examples/modify_cdk8s/env.go new file mode 100644 index 000000000..a60f6df47 --- /dev/null +++ b/env/examples/modify_cdk8s/env.go @@ -0,0 +1,42 @@ +package main + +import ( + "fmt" + + "github.com/smartcontractkit/chainlink-testing-framework/env/environment" + "github.com/smartcontractkit/chainlink-testing-framework/env/pkg/cdk8s/blockscout" + "github.com/smartcontractkit/chainlink-testing-framework/env/pkg/helm/chainlink" + "github.com/smartcontractkit/chainlink-testing-framework/env/pkg/helm/ethereum" +) + +func main() { + e := environment.New(&environment.Config{ + NamespacePrefix: "modified-env", + Labels: []string{fmt.Sprintf("envType=Modified")}, + }). + AddChart(blockscout.New(&blockscout.Props{ + WsURL: "ws://geth:8546", + HttpURL: "http://geth:8544", + })). + AddHelm(ethereum.New(nil)). + AddHelm(chainlink.New(0, map[string]interface{}{ + "replicas": 1, + })) + err := e.Run() + if err != nil { + panic(err) + } + e.ClearCharts() + err = e. + AddChart(blockscout.New(&blockscout.Props{ + HttpURL: "http://geth:9000", + })). + AddHelm(ethereum.New(nil)). + AddHelm(chainlink.New(0, map[string]interface{}{ + "replicas": 1, + })). + Run() + if err != nil { + panic(err) + } +} diff --git a/env/examples/modify_helm/env.go b/env/examples/modify_helm/env.go new file mode 100644 index 000000000..985220dba --- /dev/null +++ b/env/examples/modify_helm/env.go @@ -0,0 +1,41 @@ +package main + +import ( + "fmt" + + "github.com/smartcontractkit/chainlink-testing-framework/env/environment" + "github.com/smartcontractkit/chainlink-testing-framework/env/pkg/helm/chainlink" + "github.com/smartcontractkit/chainlink-testing-framework/env/pkg/helm/ethereum" + "github.com/smartcontractkit/chainlink-testing-framework/env/pkg/helm/mockserver" + mockservercfg "github.com/smartcontractkit/chainlink-testing-framework/env/pkg/helm/mockserver-cfg" +) + +func main() { + e := environment.New(&environment.Config{ + NamespacePrefix: "modified-env", + Labels: []string{fmt.Sprintf("envType=Modified")}, + }). + AddHelm(mockservercfg.New(nil)). + AddHelm(mockserver.New(nil)). + AddHelm(ethereum.New(nil)). + AddHelm(chainlink.New(0, map[string]any{ + "replicas": 1, + })) + err := e.Run() + if err != nil { + panic(err) + } + e.Cfg.KeepConnection = true + e.Cfg.RemoveOnInterrupt = true + e, err = e. + ReplaceHelm("chainlink-0", chainlink.New(0, map[string]any{ + "replicas": 2, + })) + if err != nil { + panic(err) + } + err = e.Run() + if err != nil { + panic(err) + } +} diff --git a/env/examples/multistage/env.go b/env/examples/multistage/env.go new file mode 100644 index 000000000..dce8c20a3 --- /dev/null +++ b/env/examples/multistage/env.go @@ -0,0 +1,36 @@ +package main + +import ( + "time" + + "github.com/smartcontractkit/chainlink-testing-framework/env/environment" + "github.com/smartcontractkit/chainlink-testing-framework/env/pkg/helm/chainlink" + "github.com/smartcontractkit/chainlink-testing-framework/env/pkg/helm/ethereum" + "github.com/smartcontractkit/chainlink-testing-framework/env/pkg/helm/mockserver" + mockservercfg "github.com/smartcontractkit/chainlink-testing-framework/env/pkg/helm/mockserver-cfg" +) + +func main() { + e := environment.New(&environment.Config{TTL: 20 * time.Minute}) + err := e. + AddHelm(ethereum.New(nil)). + AddHelm(chainlink.New(0, nil)). + Run() + if err != nil { + panic(err) + } + // deploy another part + e.Cfg.KeepConnection = true + err = e. + AddHelm(chainlink.New(1, nil)). + AddHelm(mockservercfg.New(nil)). + AddHelm(mockserver.New(nil)). + Run() + defer func() { + errr := e.Shutdown() + panic(errr) + }() + if err != nil { + panic(err) + } +} diff --git a/env/examples/multistage/someData.txt b/env/examples/multistage/someData.txt new file mode 100644 index 000000000..690eb16b2 --- /dev/null +++ b/env/examples/multistage/someData.txt @@ -0,0 +1 @@ +data to copy \ No newline at end of file diff --git a/env/examples/quick-debug/env.go b/env/examples/quick-debug/env.go new file mode 100644 index 000000000..d2e811db1 --- /dev/null +++ b/env/examples/quick-debug/env.go @@ -0,0 +1,22 @@ +package main + +import ( + "github.com/smartcontractkit/chainlink-testing-framework/env/environment" + "github.com/smartcontractkit/chainlink-testing-framework/env/pkg/helm/chainlink" + "github.com/smartcontractkit/chainlink-testing-framework/env/pkg/helm/ethereum" +) + +func main() { + err := environment.New(&environment.Config{ + Labels: []string{"type=construction-in-progress"}, + NamespacePrefix: "new-environment", + KeepConnection: true, + RemoveOnInterrupt: true, + }). + AddHelm(ethereum.New(nil)). + AddHelm(chainlink.New(0, nil)). + Run() + if err != nil { + panic(err) + } +} diff --git a/env/examples/remote-test-runner/env.go b/env/examples/remote-test-runner/env.go new file mode 100644 index 000000000..e472d0c7c --- /dev/null +++ b/env/examples/remote-test-runner/env.go @@ -0,0 +1,34 @@ +package main + +import ( + "os" + + "github.com/smartcontractkit/chainlink-testing-framework/env/config" + "github.com/smartcontractkit/chainlink-testing-framework/env/environment" + "github.com/smartcontractkit/chainlink-testing-framework/env/pkg/helm/chainlink" + "github.com/smartcontractkit/chainlink-testing-framework/env/pkg/helm/ethereum" + "github.com/smartcontractkit/chainlink-testing-framework/env/pkg/helm/mockserver" + mockservercfg "github.com/smartcontractkit/chainlink-testing-framework/env/pkg/helm/mockserver-cfg" +) + +func main() { + // see REMOTE_RUN.md for tutorial + e := environment.New(&environment.Config{ + NamespacePrefix: "zmytest", + }). + AddHelm(mockservercfg.New(nil)). + AddHelm(mockserver.New(nil)). + AddHelm(ethereum.New(nil)). + AddHelm(chainlink.New(0, map[string]interface{}{ + "replicas": 1, + "chainlink": map[string]interface{}{ + "image": map[string]interface{}{ + "image": os.Getenv(config.EnvVarCLImage), + "version": os.Getenv(config.EnvVarCLTag), + }, + }, + })) + if err := e.Run(); err != nil { + panic(err) + } +} diff --git a/env/examples/resources/env.go b/env/examples/resources/env.go new file mode 100644 index 000000000..e7430b572 --- /dev/null +++ b/env/examples/resources/env.go @@ -0,0 +1,30 @@ +package main + +import ( + "fmt" + + "github.com/rs/zerolog/log" + "github.com/smartcontractkit/chainlink-testing-framework/env/environment" + "github.com/smartcontractkit/chainlink-testing-framework/env/pkg" + "github.com/smartcontractkit/chainlink-testing-framework/env/pkg/helm/chainlink" + "github.com/smartcontractkit/chainlink-testing-framework/env/pkg/helm/ethereum" +) + +func main() { + e := environment.New(&environment.Config{ + Labels: []string{fmt.Sprintf("envType=%s", pkg.EnvTypeEVM5)}, + }). + AddHelm(ethereum.New(nil)). + AddHelm(chainlink.New(0, nil)) + err := e.Run() + if err != nil { + panic(err) + } + // default k8s selector + summ, err := e.ResourcesSummary("app in (chainlink-0, geth)") + if err != nil { + panic(err) + } + log.Warn().Interface("Resources", summ).Send() + e.Shutdown() +} diff --git a/env/examples/simple/env.go b/env/examples/simple/env.go new file mode 100644 index 000000000..9b2a55fff --- /dev/null +++ b/env/examples/simple/env.go @@ -0,0 +1,27 @@ +package main + +import ( + "github.com/smartcontractkit/chainlink-testing-framework/env/environment" + "github.com/smartcontractkit/chainlink-testing-framework/env/pkg/helm/chainlink" + "github.com/smartcontractkit/chainlink-testing-framework/env/pkg/helm/ethereum" + "github.com/smartcontractkit/chainlink-testing-framework/env/pkg/helm/mockserver" + mockservercfg "github.com/smartcontractkit/chainlink-testing-framework/env/pkg/helm/mockserver-cfg" +) + +func main() { + err := environment.New(&environment.Config{ + NamespacePrefix: "ztest", + KeepConnection: true, + RemoveOnInterrupt: true, + }). + AddHelm(mockservercfg.New(nil)). + AddHelm(mockserver.New(nil)). + AddHelm(ethereum.New(nil)). + AddHelm(chainlink.New(0, map[string]interface{}{ + "replicas": 1, + })). + Run() + if err != nil { + panic(err) + } +} diff --git a/env/grafana/cl_insights.json b/env/grafana/cl_insights.json new file mode 100644 index 000000000..5de13cc2a --- /dev/null +++ b/env/grafana/cl_insights.json @@ -0,0 +1,3021 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "datasource", + "uid": "grafana" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "target": { + "limit": 100, + "matchAny": false, + "tags": [], + "type": "dashboard" + }, + "type": "dashboard" + } + ] + }, + "description": "A look at the components of Chainlink Integration tests", + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "iteration": 1662412920215, + "links": [], + "liveNow": false, + "panels": [ + { + "collapsed": true, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 161, + "panels": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "description": "Components health", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 20, + "w": 24, + "x": 0, + "y": 1 + }, + "id": 163, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "last" + ], + "fields": "", + "values": false + }, + "text": { + "titleSize": 14, + "valueSize": 14 + }, + "textMode": "name" + }, + "pluginVersion": "8.3.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "exemplar": true, + "expr": "health{namespace=\"$namespace\", pod=\"$cl_node\"}", + "interval": "", + "legendFormat": "service: {{service_id}}", + "refId": "A" + } + ], + "title": "Components health", + "transparent": true, + "type": "stat" + } + ], + "title": "Components health", + "type": "row" + }, + { + "collapsed": true, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 1 + }, + "id": 181, + "panels": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "description": "Overall log count by type", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 2 + }, + "id": 179, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "right" + }, + "tooltip": { + "mode": "single" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "exemplar": true, + "expr": "log_error_count{namespace=\"$namespace\"}", + "interval": "", + "legendFormat": "WARN, pod: {{pod}}", + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "exemplar": true, + "expr": "log_warn_count{namespace=\"$namespace\"}", + "hide": false, + "interval": "", + "legendFormat": "ERROR, pod: {{pod}}", + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "exemplar": true, + "expr": "log_panic_count{namespace=\"$namespace\"}", + "hide": false, + "interval": "", + "legendFormat": "PANIC, pod: {{pod}}", + "refId": "C" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "exemplar": true, + "expr": "log_critical_count{namespace=\"$namespace\"}", + "hide": false, + "interval": "", + "legendFormat": "CRITICAL, pod: {{pod}}", + "refId": "D" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "exemplar": true, + "expr": "log_fatal_count{namespace=\"$namespace\"}", + "hide": false, + "interval": "", + "legendFormat": "FATAL, pod: {{pod}}", + "refId": "E" + } + ], + "title": "Overall log count by type", + "transparent": true, + "type": "timeseries" + } + ], + "title": "Overall metrics across all CL nodes", + "type": "row" + }, + { + "collapsed": true, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 2 + }, + "id": 169, + "panels": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 24, + "x": 0, + "y": 3 + }, + "id": 167, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "8.3.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "exemplar": true, + "expr": "pipeline_tasks_total_finished{namespace=\"$namespace\", pod=\"$cl_node\"}", + "interval": "", + "legendFormat": "type: {{task_type}}, jobID: {{job_id}}, status: {{status}}", + "refId": "A" + } + ], + "title": "Pipeline tasks", + "transparent": true, + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 7 + }, + "id": 171, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "exemplar": true, + "expr": "pipeline_task_runs_queued{namespace=\"$namespace\", pod=\"$cl_node\"}", + "interval": "", + "legendFormat": "Tasks", + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "exemplar": true, + "expr": "pipeline_runs_queued{namespace=\"$namespace\", pod=\"$cl_node\"}", + "hide": false, + "interval": "", + "legendFormat": "Pipelines", + "refId": "B" + } + ], + "title": "Queued tasks and pipelines", + "transparent": true, + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "description": "Pipeline avg time to completion", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "Duration, ms", + "axisPlacement": "left", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 7 + }, + "id": 173, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "exemplar": true, + "expr": "pipeline_run_total_time_to_completion{namespace=\"$namespace\", pod=\"$cl_node\"} * 1e-6", + "interval": "", + "legendFormat": "jobID: {{job_id}}", + "refId": "A" + } + ], + "title": "Pipeline avg time to completion", + "transparent": true, + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "description": "Pipeline fetch avg bytes", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "Size, Bytes", + "axisPlacement": "left", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 15 + }, + "id": 177, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "exemplar": true, + "expr": "pipeline_task_http_response_body_size{namespace=\"$namespace\", pod=\"$cl_node\"}", + "interval": "", + "legendFormat": "Task type: {{pipeline_task_spec_id}}", + "refId": "A" + } + ], + "title": "Pipeline fetch avg bytes", + "transparent": true, + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "description": "Task execution time by type", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "Duration, ms", + "axisPlacement": "left", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 15 + }, + "id": 175, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "exemplar": true, + "expr": "pipeline_task_execution_time{namespace=\"$namespace\", pod=\"$cl_node\"} * 1e-6", + "interval": "", + "legendFormat": "type: {{task_type}}", + "refId": "A" + } + ], + "title": "Task execution time by type", + "transparent": true, + "type": "timeseries" + } + ], + "title": "Pipeline tasks ($cl_node)", + "type": "row" + }, + { + "collapsed": true, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 3 + }, + "id": 147, + "panels": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 4 + }, + "id": 159, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "exemplar": true, + "expr": "rate(evm_pool_rpc_node_polls_success{namespace=\"$namespace\", pod=\"$cl_node\"} [2m])", + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "title": "EVM node polls", + "transparent": true, + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "description": "RPC calls hist", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 4 + }, + "id": 157, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "exemplar": true, + "expr": "histogram_quantile(0.95, sum(rate(evm_pool_rpc_node_rpc_call_time_bucket{pod=\"$cl_node\", rpcCallName=\"CallContext\"}[2m])) by (le)) * 1e-6", + "interval": "", + "legendFormat": "CallContext - 95", + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "exemplar": true, + "expr": "histogram_quantile(0.5, sum(rate(evm_pool_rpc_node_rpc_call_time_bucket{pod=\"$cl_node\", rpcCallName=\"CallContext\"}[2m])) by (le)) * 1e-6", + "hide": false, + "interval": "", + "legendFormat": "CallContext - 50", + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "exemplar": true, + "expr": "histogram_quantile(0.95, sum(rate(evm_pool_rpc_node_rpc_call_time_bucket{rpcCallName=\"BatchCallContext\"}[2m])) by (le)) * 1e-6", + "hide": false, + "interval": "", + "legendFormat": "BatchCallContext - 95", + "refId": "C" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "exemplar": true, + "expr": "histogram_quantile(0.5, sum(rate(evm_pool_rpc_node_rpc_call_time_bucket{rpcCallName=\"BatchCallContext\"}[2m])) by (le)) * 1e-6", + "hide": false, + "interval": "", + "legendFormat": "BatchCallContext - 50", + "refId": "D" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "exemplar": true, + "expr": "histogram_quantile(0.95, sum(rate(evm_pool_rpc_node_rpc_call_time_bucket{rpcCallName=\"BalanceAt\"}[2m])) by (le)) * 1e-6", + "hide": false, + "interval": "", + "legendFormat": "BalanceAt - 95", + "refId": "E" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "exemplar": true, + "expr": "histogram_quantile(0.50, sum(rate(evm_pool_rpc_node_rpc_call_time_bucket{rpcCallName=\"BalanceAt\"}[2m])) by (le)) * 1e-6", + "hide": false, + "interval": "", + "legendFormat": "BalanceAt - 50", + "refId": "F" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "exemplar": true, + "expr": "histogram_quantile(0.95, sum(rate(evm_pool_rpc_node_rpc_call_time_bucket{rpcCallName=\"PendingNonceAt\"}[2m])) by (le)) * 1e-6", + "hide": false, + "interval": "", + "legendFormat": "PendingNonceAt - 95", + "refId": "G" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "exemplar": true, + "expr": "histogram_quantile(0.50, sum(rate(evm_pool_rpc_node_rpc_call_time_bucket{rpcCallName=\"PendingNonceAt\"}[2m])) by (le)) * 1e-6", + "hide": false, + "interval": "", + "legendFormat": "PendingNonceAt - 50", + "refId": "H" + } + ], + "title": "RPC calls hist", + "transparent": true, + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "description": "RPC node states", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 12 + }, + "id": 153, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "exemplar": true, + "expr": "evm_pool_rpc_node_states{namespace=\"$namespace\", pod=\"$cl_node\"}", + "interval": "", + "legendFormat": "chainId: {{evmChainID}} pod: {{pod}} state: {{state}}", + "refId": "A" + } + ], + "title": "RPC node states", + "transparent": true, + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 12 + }, + "id": 151, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "pluginVersion": "8.3.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "exemplar": true, + "expr": "evm_pool_rpc_node_num_transitions_to_alive{namespace=\"$namespace\", pod=\"$cl_node\"}", + "interval": "", + "legendFormat": "chainId: {{evmChainID}} pod: {{pod}}", + "refId": "A" + } + ], + "title": "RPC node alive statuses", + "transparent": true, + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "description": "RPC calls total (rate)", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 20 + }, + "id": 145, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "exemplar": true, + "expr": "rate(evm_pool_rpc_node_calls_total{namespace=\"$namespace\", pod=\"$cl_node\"}[2m])", + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "title": "RPC calls total (rate)", + "transparent": true, + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 20 + }, + "id": 155, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "exemplar": true, + "expr": "rate(evm_pool_rpc_node_verifies{namespace=\"$namespace\", pod=\"$cl_node\"} [2m])", + "interval": "", + "legendFormat": "Success, chainId: {{evmChainID}} nodeName: {{nodeName }} instance: {{instance}}", + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "exemplar": true, + "expr": "rate(evm_pool_rpc_node_verifies_success{namespace=\"$namespace\", pod=\"$cl_node\"} [2m])", + "hide": false, + "interval": "", + "legendFormat": "Total, chainId: {{evmChainID}} nodeName: {{nodeName }} instance: {{instance}}", + "refId": "B" + } + ], + "title": "Total verifications (success/errors)", + "transparent": true, + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "description": "ETH account value", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "left", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineStyle": { + "fill": "solid" + }, + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 28 + }, + "id": 165, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "exemplar": false, + "expr": "eth_balance{namespace=\"$namespace\", pod=\"$cl_node\"}", + "interval": "", + "intervalFactor": 1, + "legendFormat": "account: {{account}}", + "refId": "A" + } + ], + "title": "ETH account value", + "transparent": true, + "type": "timeseries" + } + ], + "title": "EVM CL node metrics ($cl_node)", + "type": "row" + }, + { + "collapsed": true, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 4 + }, + "id": 183, + "panels": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "description": "TXns count (confirmed/unconfirmed)", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 5 + }, + "id": 185, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "exemplar": true, + "expr": "unconfirmed_transactions{namespace=\"$namespace\", pod=\"$cl_node\"}", + "interval": "", + "legendFormat": "Unconfirmed, Pod: {{pod}}", + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "exemplar": true, + "expr": "tx_manager_num_confirmed_transactions{namespace=\"$namespace\", pod=\"$cl_node\"}", + "hide": false, + "interval": "", + "legendFormat": "Confirmed, Pod: {{pod}}", + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "exemplar": true, + "expr": "tx_manager_num_successful_transactions{namespace=\"$namespace\", pod=\"$cl_node\"}", + "hide": false, + "interval": "", + "legendFormat": "Successful, Pod: {{pod}}", + "refId": "C" + } + ], + "title": "TXns count (confirmed/unconfirmed)", + "transparent": true, + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "Duration, ms", + "axisPlacement": "left", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 5 + }, + "id": 187, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "exemplar": true, + "expr": "histogram_quantile(0.95, sum(rate(tx_manager_time_until_tx_confirmed_bucket [2m])) by (le)) * 1e-6", + "instant": false, + "interval": "", + "legendFormat": "TxConfirmed - 95", + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "exemplar": true, + "expr": "histogram_quantile(0.50, sum(rate(tx_manager_time_until_tx_confirmed_bucket [2m])) by (le)) * 1e-6", + "hide": false, + "interval": "", + "legendFormat": "TxConfirmed - 50", + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "exemplar": true, + "expr": "histogram_quantile(0.95, sum(rate(tx_manager_time_until_tx_broadcast_bucket [2m])) by (le)) * 1e-6", + "hide": false, + "interval": "", + "legendFormat": "TxBroadcast -95", + "refId": "C" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "exemplar": true, + "expr": "histogram_quantile(0.50, sum(rate(tx_manager_time_until_tx_broadcast_bucket [2m])) by (le)) * 1e-6", + "hide": false, + "interval": "", + "legendFormat": "TxBroadcast -50", + "refId": "D" + } + ], + "title": "TXns times", + "transparent": true, + "type": "timeseries" + } + ], + "title": "TX manager ($cl_node)", + "type": "row" + }, + { + "collapsed": true, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 5 + }, + "id": 35, + "panels": [ + { + "description": "All logs of the Chainlink node", + "gridPos": { + "h": 10, + "w": 12, + "x": 0, + "y": 6 + }, + "id": 33, + "options": { + "dedupStrategy": "none", + "enableLogDetails": true, + "prettifyLogMessage": false, + "showCommonLabels": false, + "showLabels": false, + "showTime": false, + "sortOrder": "Descending", + "wrapLogMessage": false + }, + "pluginVersion": "8.5.0", + "targets": [ + { + "datasource": { + "type": "loki", + "uid": "grafanacloud-logs" + }, + "expr": "{namespace=\"$namespace\", container=\"node\", pod=\"$cl_node\"}", + "queryType": "range", + "refId": "A" + } + ], + "title": "Chainlink Node Logs", + "transparent": true, + "type": "logs" + }, + { + "description": "All [ERROR] logs from the Chainlink node.", + "gridPos": { + "h": 10, + "w": 12, + "x": 12, + "y": 6 + }, + "id": 38, + "options": { + "dedupStrategy": "none", + "enableLogDetails": true, + "prettifyLogMessage": false, + "showCommonLabels": false, + "showLabels": false, + "showTime": false, + "sortOrder": "Descending", + "wrapLogMessage": false + }, + "pluginVersion": "8.5.0", + "targets": [ + { + "datasource": { + "type": "loki", + "uid": "grafanacloud-logs" + }, + "expr": "{namespace=\"$namespace\", container=\"node\", pod=\"$cl_node\"} | json | level=~\"error|crit\"", + "queryType": "range", + "refId": "A" + } + ], + "title": "Chainlink Node Errors", + "transparent": true, + "type": "logs" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "description": "Chainlink CPU usage and limit", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "CPU Power", + "axisPlacement": "left", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 5, + "gradientMode": "opacity", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineStyle": { + "fill": "solid" + }, + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 6, + "x": 0, + "y": 16 + }, + "id": 41, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "exemplar": true, + "expr": "kube_pod_container_resource_limits{container=\"node\", pod=\"$cl_node\", resource=\"cpu\"}", + "interval": "", + "legendFormat": "", + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "exemplar": true, + "expr": "container_cpu_load_average_10s{namespace=\"$namespace\", container=\"node\", pod=\"$cl_node\"}", + "hide": false, + "interval": "", + "legendFormat": "", + "refId": "B" + } + ], + "title": "CPU", + "transparent": true, + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "description": "Chainlink RAM usage and limit", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "MiB", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 5, + "gradientMode": "opacity", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 6, + "x": 6, + "y": 16 + }, + "id": 42, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "exemplar": true, + "expr": "kube_pod_container_resource_limits{container=\"node\", pod=\"$cl_node\", resource=\"memory\"} / 1024 / 1024", + "interval": "", + "legendFormat": "Limits, container: {{container}} pod: {{pod}}", + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "exemplar": true, + "expr": "container_memory_usage_bytes{container=\"node\", pod=\"$cl_node\"} / 1024 / 1024", + "hide": false, + "interval": "", + "legendFormat": "Used, container: {{container}} pod: {{pod}}", + "refId": "B" + } + ], + "title": "RAM", + "transparent": true, + "type": "timeseries" + }, + { + "description": "All [WARN] logs from the Chainlink node.", + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 16 + }, + "id": 102, + "options": { + "dedupStrategy": "none", + "enableLogDetails": true, + "prettifyLogMessage": false, + "showCommonLabels": false, + "showLabels": false, + "showTime": false, + "sortOrder": "Descending", + "wrapLogMessage": false + }, + "pluginVersion": "8.5.0", + "targets": [ + { + "datasource": { + "type": "loki", + "uid": "grafanacloud-logs" + }, + "expr": "{namespace=\"$namespace\", container=\"node\", pod=\"$cl_node\"} | json | level=~\"warn\" | msg!=\"Disk space is not enough to log into disk any longer, required disk space\"", + "queryType": "range", + "refId": "A" + } + ], + "title": "Chainlink Node Warnings", + "transparent": true, + "type": "logs" + } + ], + "repeat": "cl_node", + "title": "CL node metrics ($cl_node)", + "type": "row" + }, + { + "collapsed": true, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 6 + }, + "id": 104, + "panels": [ + { + "gridPos": { + "h": 12, + "w": 18, + "x": 0, + "y": 7 + }, + "id": 106, + "options": { + "dedupStrategy": "none", + "enableLogDetails": true, + "prettifyLogMessage": false, + "showCommonLabels": false, + "showLabels": false, + "showTime": false, + "sortOrder": "Descending", + "wrapLogMessage": false + }, + "pluginVersion": "8.5.5", + "targets": [ + { + "datasource": { + "type": "loki", + "uid": "grafanacloud-logs" + }, + "expr": "{namespace=\"$namespace\", container=~\"geth-network|starknetdev\", pod=\"$geth_node\"}", + "refId": "A" + } + ], + "title": "Geth Logs", + "transparent": true, + "type": "logs" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "description": "Geth CPU usage and limit", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "CPU Power", + "axisPlacement": "left", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 5, + "gradientMode": "opacity", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineStyle": { + "fill": "solid" + }, + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 6, + "x": 18, + "y": 7 + }, + "id": 107, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "exemplar": true, + "expr": "kube_pod_container_resource_limits{exported_namespace=\"$namespace\", container=\"geth-network\", resource=\"cpu\"}", + "interval": "", + "legendFormat": "", + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "exemplar": true, + "expr": "container_cpu_load_average_10s{namespace=\"$namespace\", container=~\"geth-network|starknetdev\"}", + "hide": false, + "interval": "", + "legendFormat": "", + "refId": "B" + } + ], + "title": "Geth CPU", + "transparent": true, + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "description": "Geth RAM usage and limit", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "MiB", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 5, + "gradientMode": "opacity", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 6, + "x": 18, + "y": 13 + }, + "id": 108, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "exemplar": true, + "expr": "kube_pod_container_resource_limits{exported_namespace=\"$namespace\", container=~\"geth-network|starknetdev\", resource=\"memory\"} / 1024 / 1024", + "interval": "", + "legendFormat": "", + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "exemplar": true, + "expr": "container_memory_usage_bytes{namespace=\"$namespace\", container=~\"geth-network|starknetdev\"} / 1024 / 1024", + "hide": false, + "interval": "", + "legendFormat": "", + "refId": "B" + } + ], + "title": "Geth RAM", + "transparent": true, + "type": "timeseries" + } + ], + "repeat": "geth_node", + "title": "Simulated network metrics ($geth_node)", + "type": "row" + }, + { + "collapsed": true, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 7 + }, + "id": 76, + "panels": [ + { + "description": "Logs of the mockserver", + "gridPos": { + "h": 12, + "w": 18, + "x": 0, + "y": 8 + }, + "id": 70, + "options": { + "dedupStrategy": "none", + "enableLogDetails": true, + "prettifyLogMessage": false, + "showCommonLabels": false, + "showLabels": false, + "showTime": true, + "sortOrder": "Descending", + "wrapLogMessage": false + }, + "pluginVersion": "8.5.0", + "targets": [ + { + "datasource": { + "type": "loki", + "uid": "grafanacloud-logs" + }, + "expr": "{namespace=\"$namespace\", container=\"mockserver\"}", + "refId": "A" + } + ], + "title": "Mock Server Logs", + "transparent": true, + "type": "logs" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "description": "Mock Server CPU usage and limit", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "CPU Power", + "axisPlacement": "left", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 5, + "gradientMode": "opacity", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineStyle": { + "fill": "solid" + }, + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 6, + "x": 18, + "y": 8 + }, + "id": 71, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "exemplar": true, + "expr": "kube_pod_container_resource_limits{exported_namespace=\"$namespace\", container=\"mockserver\", resource=\"cpu\"}", + "interval": "", + "legendFormat": "", + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "exemplar": true, + "expr": "container_cpu_load_average_10s{namespace=\"$namespace\", container=\"mockserver\"}", + "hide": false, + "interval": "", + "legendFormat": "", + "refId": "B" + } + ], + "title": "Mock Server CPU", + "transparent": true, + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "description": "Mock Server RAM usage and limit", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "MiB", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 5, + "gradientMode": "opacity", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 6, + "x": 18, + "y": 14 + }, + "id": 72, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "exemplar": true, + "expr": "kube_pod_container_resource_limits{exported_namespace=\"$namespace\", container=\"mockserver\", resource=\"memory\"} / 1024 / 1024", + "interval": "", + "legendFormat": "", + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "exemplar": true, + "expr": "container_memory_usage_bytes{namespace=\"$namespace\", container=\"mockserver\"} / 1024 / 1024", + "hide": false, + "interval": "", + "legendFormat": "", + "refId": "B" + } + ], + "title": "Mock Server RAM", + "transparent": true, + "type": "timeseries" + } + ], + "title": "Mock Server", + "type": "row" + }, + { + "collapsed": true, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 8 + }, + "id": 74, + "panels": [ + { + "description": "Logs of the instance actually running the tests", + "gridPos": { + "h": 12, + "w": 18, + "x": 0, + "y": 9 + }, + "id": 36, + "options": { + "dedupStrategy": "none", + "enableLogDetails": true, + "prettifyLogMessage": false, + "showCommonLabels": false, + "showLabels": false, + "showTime": false, + "sortOrder": "Descending", + "wrapLogMessage": false + }, + "pluginVersion": "8.5.0", + "targets": [ + { + "datasource": { + "type": "loki", + "uid": "grafanacloud-logs" + }, + "expr": "{namespace=\"$namespace\", container=\"remote-test-runner\"}", + "refId": "A" + } + ], + "title": "Test Runner Logs", + "transparent": true, + "type": "logs" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "description": "Test Runner CPU usage and limit", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "CPU Power", + "axisPlacement": "left", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 5, + "gradientMode": "opacity", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineStyle": { + "fill": "solid" + }, + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 6, + "x": 18, + "y": 9 + }, + "id": 43, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "exemplar": true, + "expr": "kube_pod_container_resource_limits{exported_namespace=\"$namespace\", container=\"remote-test-runner\", resource=\"cpu\"}", + "interval": "", + "legendFormat": "", + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "exemplar": true, + "expr": "container_cpu_load_average_10s{namespace=\"$namespace\", container=\"remote-test-runner\"}", + "hide": false, + "interval": "", + "legendFormat": "", + "refId": "B" + } + ], + "title": "Runner CPU", + "transparent": true, + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "description": "Test Runner RAM usage and limit", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "MiB", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 5, + "gradientMode": "opacity", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 6, + "x": 18, + "y": 15 + }, + "id": 44, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "exemplar": true, + "expr": "kube_pod_container_resource_limits{exported_namespace=\"$namespace\", container=\"remote-test-runner\", resource=\"memory\"} / 1024 / 1024", + "interval": "", + "legendFormat": "", + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "exemplar": true, + "expr": "container_memory_usage_bytes{namespace=\"$namespace\", container=\"remote-test-runner\"} / 1024 / 1024", + "hide": false, + "interval": "", + "legendFormat": "", + "refId": "B" + } + ], + "title": "Runner RAM", + "transparent": true, + "type": "timeseries" + }, + { + "description": "Errors and Warnings found in Test Runner", + "gridPos": { + "h": 5, + "w": 8, + "x": 0, + "y": 21 + }, + "id": 139, + "options": { + "dedupStrategy": "none", + "enableLogDetails": true, + "prettifyLogMessage": false, + "showCommonLabels": false, + "showLabels": false, + "showTime": false, + "sortOrder": "Descending", + "wrapLogMessage": false + }, + "pluginVersion": "8.5.0", + "targets": [ + { + "datasource": { + "type": "loki", + "uid": "grafanacloud-logs" + }, + "expr": "{namespace=\"$namespace\", container=\"remote-test-runner\"} |~ \"WRN|ERR\"", + "refId": "A" + } + ], + "title": "Test Runner Errors and Warnings", + "transparent": true, + "type": "logs" + }, + { + "description": "Info logs", + "gridPos": { + "h": 5, + "w": 8, + "x": 8, + "y": 21 + }, + "id": 140, + "options": { + "dedupStrategy": "none", + "enableLogDetails": true, + "prettifyLogMessage": false, + "showCommonLabels": false, + "showLabels": false, + "showTime": false, + "sortOrder": "Descending", + "wrapLogMessage": false + }, + "pluginVersion": "8.5.0", + "targets": [ + { + "datasource": { + "type": "loki", + "uid": "grafanacloud-logs" + }, + "expr": "{namespace=\"$namespace\", container=\"remote-test-runner\"} |= \"INF\"", + "refId": "A" + } + ], + "title": "Test Runner Info", + "transparent": true, + "type": "logs" + }, + { + "description": "Debugs", + "gridPos": { + "h": 5, + "w": 8, + "x": 16, + "y": 21 + }, + "id": 141, + "options": { + "dedupStrategy": "none", + "enableLogDetails": true, + "prettifyLogMessage": false, + "showCommonLabels": false, + "showLabels": false, + "showTime": false, + "sortOrder": "Descending", + "wrapLogMessage": false + }, + "pluginVersion": "8.5.0", + "targets": [ + { + "datasource": { + "type": "loki", + "uid": "grafanacloud-logs" + }, + "expr": "{namespace=\"$namespace\", container=\"remote-test-runner\"} |~ \"DBG\"", + "refId": "A" + } + ], + "title": "Test Runner Debugs", + "transparent": true, + "type": "logs" + } + ], + "title": "Test runner", + "type": "row" + } + ], + "refresh": "5s", + "schemaVersion": 34, + "style": "dark", + "tags": [ + "tests" + ], + "templating": { + "list": [ + { + "current": { + "selected": false, + "text": "chainlink-test-env-3735f", + "value": "chainlink-test-env-3735f" + }, + "definition": "label_values(namespace)", + "description": "Namespace", + "hide": 0, + "includeAll": false, + "label": "Namespace", + "multi": false, + "name": "namespace", + "options": [], + "query": "label_values(namespace)", + "refresh": 1, + "regex": "chainlink-.*|.*-soak-.*|.*performance-.*|.*-chaos-.*", + "skipUrlSync": false, + "sort": 0, + "type": "query" + }, + { + "current": { + "selected": true, + "text": [ + "chainlink-0-98744888d-r9n6r" + ], + "value": [ + "chainlink-0-98744888d-r9n6r" + ] + }, + "definition": "label_values({namespace=\"$namespace\"}, pod)", + "description": "The specific Chainlink node to get insight into", + "hide": 0, + "includeAll": false, + "label": "Chainlink Node", + "multi": true, + "name": "cl_node", + "options": [], + "query": "label_values({namespace=\"$namespace\"}, pod)", + "refresh": 1, + "regex": "chainlink-.*", + "skipUrlSync": false, + "sort": 0, + "type": "query" + }, + { + "current": { + "selected": false, + "text": "geth-6469b5b5f8-smd2z", + "value": "geth-6469b5b5f8-smd2z" + }, + "definition": "label_values({namespace=\"$namespace\"}, pod)", + "description": "If launched, a simulated instance of Geth", + "hide": 0, + "includeAll": false, + "label": "Simulated Geth Node", + "multi": false, + "name": "geth_node", + "options": [], + "query": "label_values({namespace=\"$namespace\"}, pod)", + "refresh": 1, + "regex": "geth-|starknet.*", + "skipUrlSync": false, + "sort": 0, + "type": "query" + } + ] + }, + "time": { + "from": "now-30m", + "to": "now" + }, + "timepicker": {}, + "timezone": "", + "title": "Chainlink Testing Insights", + "uid": "AFATC9A7k", + "version": 1, + "weekStart": "" +} \ No newline at end of file diff --git a/env/grafana/values.yml b/env/grafana/values.yml new file mode 100644 index 000000000..dc16a75c2 --- /dev/null +++ b/env/grafana/values.yml @@ -0,0 +1,20 @@ +grafana: + adminUser: admin + adminPassword: sdkfh26!@bHasdZ2 + dashboardProviders: + dashboardproviders.yaml: + apiVersion: 1 + providers: + - name: 'default' + orgId: 1 + folder: '' + type: file + disableDeletion: false + editable: true + options: + path: /var/lib/grafana/dashboards/default + dashboards: + default: + cl_insights: + json: | + {"annotations":{"list":[{"builtIn":1,"datasource":{"type":"datasource","uid":"grafana"},"enable":true,"hide":true,"iconColor":"rgba(0, 211, 255, 1)","name":"Annotations & Alerts","target":{"limit":100,"matchAny":false,"tags":[],"type":"dashboard"},"type":"dashboard"}]},"description":"A look at the components of Chainlink Integration tests","editable":true,"fiscalYearStartMonth":0,"graphTooltip":0,"iteration":1662412920215,"links":[],"liveNow":false,"panels":[{"collapsed":true,"gridPos":{"h":1,"w":24,"x":0,"y":0},"id":161,"panels":[{"datasource":{"type":"prometheus","uid":"PBFA97CFB590B2093"},"description":"Components health","fieldConfig":{"defaults":{"color":{"mode":"thresholds"},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"green","value":null},{"color":"red","value":80}]}},"overrides":[]},"gridPos":{"h":20,"w":24,"x":0,"y":1},"id":163,"options":{"colorMode":"value","graphMode":"area","justifyMode":"auto","orientation":"auto","reduceOptions":{"calcs":["last"],"fields":"","values":false},"text":{"titleSize":14,"valueSize":14},"textMode":"name"},"pluginVersion":"8.3.5","targets":[{"datasource":{"type":"prometheus","uid":"PBFA97CFB590B2093"},"exemplar":true,"expr":"health{namespace=\"$namespace\", pod=\"$cl_node\"}","interval":"","legendFormat":"service: {{service_id}}","refId":"A"}],"title":"Components health","transparent":true,"type":"stat"}],"title":"Components health","type":"row"},{"collapsed":true,"gridPos":{"h":1,"w":24,"x":0,"y":1},"id":181,"panels":[{"datasource":{"type":"prometheus","uid":"PBFA97CFB590B2093"},"description":"Overall log count by type","fieldConfig":{"defaults":{"color":{"mode":"palette-classic"},"custom":{"axisLabel":"","axisPlacement":"auto","barAlignment":0,"drawStyle":"line","fillOpacity":0,"gradientMode":"none","hideFrom":{"legend":false,"tooltip":false,"viz":false},"lineInterpolation":"linear","lineWidth":1,"pointSize":5,"scaleDistribution":{"type":"linear"},"showPoints":"auto","spanNulls":false,"stacking":{"group":"A","mode":"none"},"thresholdsStyle":{"mode":"off"}},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"green","value":null},{"color":"red","value":80}]}},"overrides":[]},"gridPos":{"h":8,"w":12,"x":0,"y":2},"id":179,"options":{"legend":{"calcs":[],"displayMode":"list","placement":"right"},"tooltip":{"mode":"single"}},"targets":[{"datasource":{"type":"prometheus","uid":"PBFA97CFB590B2093"},"exemplar":true,"expr":"log_error_count{namespace=\"$namespace\"}","interval":"","legendFormat":"WARN, pod: {{pod}}","refId":"A"},{"datasource":{"type":"prometheus","uid":"PBFA97CFB590B2093"},"exemplar":true,"expr":"log_warn_count{namespace=\"$namespace\"}","hide":false,"interval":"","legendFormat":"ERROR, pod: {{pod}}","refId":"B"},{"datasource":{"type":"prometheus","uid":"PBFA97CFB590B2093"},"exemplar":true,"expr":"log_panic_count{namespace=\"$namespace\"}","hide":false,"interval":"","legendFormat":"PANIC, pod: {{pod}}","refId":"C"},{"datasource":{"type":"prometheus","uid":"PBFA97CFB590B2093"},"exemplar":true,"expr":"log_critical_count{namespace=\"$namespace\"}","hide":false,"interval":"","legendFormat":"CRITICAL, pod: {{pod}}","refId":"D"},{"datasource":{"type":"prometheus","uid":"PBFA97CFB590B2093"},"exemplar":true,"expr":"log_fatal_count{namespace=\"$namespace\"}","hide":false,"interval":"","legendFormat":"FATAL, pod: {{pod}}","refId":"E"}],"title":"Overall log count by type","transparent":true,"type":"timeseries"}],"title":"Overall metrics across all CL nodes","type":"row"},{"collapsed":true,"gridPos":{"h":1,"w":24,"x":0,"y":2},"id":169,"panels":[{"datasource":{"type":"prometheus","uid":"PBFA97CFB590B2093"},"fieldConfig":{"defaults":{"color":{"mode":"thresholds"},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"green","value":null},{"color":"red","value":80}]}},"overrides":[]},"gridPos":{"h":4,"w":24,"x":0,"y":3},"id":167,"options":{"colorMode":"value","graphMode":"area","justifyMode":"auto","orientation":"auto","reduceOptions":{"calcs":["lastNotNull"],"fields":"","values":false},"textMode":"auto"},"pluginVersion":"8.3.5","targets":[{"datasource":{"type":"prometheus","uid":"PBFA97CFB590B2093"},"exemplar":true,"expr":"pipeline_tasks_total_finished{namespace=\"$namespace\", pod=\"$cl_node\"}","interval":"","legendFormat":"type: {{task_type}}, jobID: {{job_id}}, status: {{status}}","refId":"A"}],"title":"Pipeline tasks","transparent":true,"type":"stat"},{"datasource":{"type":"prometheus","uid":"PBFA97CFB590B2093"},"fieldConfig":{"defaults":{"color":{"mode":"palette-classic"},"custom":{"axisLabel":"","axisPlacement":"auto","barAlignment":0,"drawStyle":"line","fillOpacity":0,"gradientMode":"none","hideFrom":{"legend":false,"tooltip":false,"viz":false},"lineInterpolation":"linear","lineWidth":1,"pointSize":5,"scaleDistribution":{"type":"linear"},"showPoints":"auto","spanNulls":false,"stacking":{"group":"A","mode":"none"},"thresholdsStyle":{"mode":"off"}},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"green","value":null},{"color":"red","value":80}]}},"overrides":[]},"gridPos":{"h":8,"w":12,"x":0,"y":7},"id":171,"options":{"legend":{"calcs":[],"displayMode":"list","placement":"bottom"},"tooltip":{"mode":"single"}},"targets":[{"datasource":{"type":"prometheus","uid":"PBFA97CFB590B2093"},"exemplar":true,"expr":"pipeline_task_runs_queued{namespace=\"$namespace\", pod=\"$cl_node\"}","interval":"","legendFormat":"Tasks","refId":"A"},{"datasource":{"type":"prometheus","uid":"PBFA97CFB590B2093"},"exemplar":true,"expr":"pipeline_runs_queued{namespace=\"$namespace\", pod=\"$cl_node\"}","hide":false,"interval":"","legendFormat":"Pipelines","refId":"B"}],"title":"Queued tasks and pipelines","transparent":true,"type":"timeseries"},{"datasource":{"type":"prometheus","uid":"PBFA97CFB590B2093"},"description":"Pipeline avg time to completion","fieldConfig":{"defaults":{"color":{"mode":"palette-classic"},"custom":{"axisLabel":"Duration, ms","axisPlacement":"left","barAlignment":0,"drawStyle":"line","fillOpacity":0,"gradientMode":"none","hideFrom":{"legend":false,"tooltip":false,"viz":false},"lineInterpolation":"linear","lineWidth":1,"pointSize":5,"scaleDistribution":{"type":"linear"},"showPoints":"auto","spanNulls":false,"stacking":{"group":"A","mode":"none"},"thresholdsStyle":{"mode":"off"}},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"green","value":null},{"color":"red","value":80}]}},"overrides":[]},"gridPos":{"h":8,"w":12,"x":12,"y":7},"id":173,"options":{"legend":{"calcs":[],"displayMode":"list","placement":"bottom"},"tooltip":{"mode":"single"}},"targets":[{"datasource":{"type":"prometheus","uid":"PBFA97CFB590B2093"},"exemplar":true,"expr":"pipeline_run_total_time_to_completion{namespace=\"$namespace\", pod=\"$cl_node\"} * 1e-6","interval":"","legendFormat":"jobID: {{job_id}}","refId":"A"}],"title":"Pipeline avg time to completion","transparent":true,"type":"timeseries"},{"datasource":{"type":"prometheus","uid":"PBFA97CFB590B2093"},"description":"Pipeline fetch avg bytes","fieldConfig":{"defaults":{"color":{"mode":"palette-classic"},"custom":{"axisLabel":"Size, Bytes","axisPlacement":"left","barAlignment":0,"drawStyle":"line","fillOpacity":0,"gradientMode":"none","hideFrom":{"legend":false,"tooltip":false,"viz":false},"lineInterpolation":"linear","lineWidth":1,"pointSize":5,"scaleDistribution":{"type":"linear"},"showPoints":"auto","spanNulls":false,"stacking":{"group":"A","mode":"none"},"thresholdsStyle":{"mode":"off"}},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"green","value":null},{"color":"red","value":80}]}},"overrides":[]},"gridPos":{"h":8,"w":12,"x":0,"y":15},"id":177,"options":{"legend":{"calcs":[],"displayMode":"list","placement":"bottom"},"tooltip":{"mode":"single"}},"targets":[{"datasource":{"type":"prometheus","uid":"PBFA97CFB590B2093"},"exemplar":true,"expr":"pipeline_task_http_response_body_size{namespace=\"$namespace\", pod=\"$cl_node\"}","interval":"","legendFormat":"Task type: {{pipeline_task_spec_id}}","refId":"A"}],"title":"Pipeline fetch avg bytes","transparent":true,"type":"timeseries"},{"datasource":{"type":"prometheus","uid":"PBFA97CFB590B2093"},"description":"Task execution time by type","fieldConfig":{"defaults":{"color":{"mode":"palette-classic"},"custom":{"axisLabel":"Duration, ms","axisPlacement":"left","barAlignment":0,"drawStyle":"line","fillOpacity":0,"gradientMode":"none","hideFrom":{"legend":false,"tooltip":false,"viz":false},"lineInterpolation":"linear","lineWidth":1,"pointSize":5,"scaleDistribution":{"type":"linear"},"showPoints":"auto","spanNulls":false,"stacking":{"group":"A","mode":"none"},"thresholdsStyle":{"mode":"off"}},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"green","value":null},{"color":"red","value":80}]}},"overrides":[]},"gridPos":{"h":8,"w":12,"x":12,"y":15},"id":175,"options":{"legend":{"calcs":[],"displayMode":"list","placement":"bottom"},"tooltip":{"mode":"single"}},"targets":[{"datasource":{"type":"prometheus","uid":"PBFA97CFB590B2093"},"exemplar":true,"expr":"pipeline_task_execution_time{namespace=\"$namespace\", pod=\"$cl_node\"} * 1e-6","interval":"","legendFormat":"type: {{task_type}}","refId":"A"}],"title":"Task execution time by type","transparent":true,"type":"timeseries"}],"title":"Pipeline tasks ($cl_node)","type":"row"},{"collapsed":true,"gridPos":{"h":1,"w":24,"x":0,"y":3},"id":147,"panels":[{"datasource":{"type":"prometheus","uid":"PBFA97CFB590B2093"},"fieldConfig":{"defaults":{"color":{"mode":"palette-classic"},"custom":{"axisLabel":"","axisPlacement":"auto","barAlignment":0,"drawStyle":"line","fillOpacity":0,"gradientMode":"none","hideFrom":{"legend":false,"tooltip":false,"viz":false},"lineInterpolation":"linear","lineWidth":1,"pointSize":5,"scaleDistribution":{"type":"linear"},"showPoints":"auto","spanNulls":false,"stacking":{"group":"A","mode":"none"},"thresholdsStyle":{"mode":"off"}},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"green","value":null},{"color":"red","value":80}]}},"overrides":[]},"gridPos":{"h":8,"w":12,"x":0,"y":4},"id":159,"options":{"legend":{"calcs":[],"displayMode":"list","placement":"bottom"},"tooltip":{"mode":"single"}},"targets":[{"datasource":{"type":"prometheus","uid":"PBFA97CFB590B2093"},"exemplar":true,"expr":"rate(evm_pool_rpc_node_polls_success{namespace=\"$namespace\", pod=\"$cl_node\"} [2m])","interval":"","legendFormat":"","refId":"A"}],"title":"EVM node polls","transparent":true,"type":"timeseries"},{"datasource":{"type":"prometheus","uid":"PBFA97CFB590B2093"},"description":"RPC calls hist","fieldConfig":{"defaults":{"color":{"mode":"palette-classic"},"custom":{"axisLabel":"","axisPlacement":"auto","barAlignment":0,"drawStyle":"line","fillOpacity":0,"gradientMode":"none","hideFrom":{"legend":false,"tooltip":false,"viz":false},"lineInterpolation":"linear","lineWidth":1,"pointSize":5,"scaleDistribution":{"type":"linear"},"showPoints":"auto","spanNulls":false,"stacking":{"group":"A","mode":"none"},"thresholdsStyle":{"mode":"off"}},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"green","value":null},{"color":"red","value":80}]}},"overrides":[]},"gridPos":{"h":8,"w":12,"x":12,"y":4},"id":157,"options":{"legend":{"calcs":[],"displayMode":"list","placement":"bottom"},"tooltip":{"mode":"single"}},"targets":[{"datasource":{"type":"prometheus","uid":"PBFA97CFB590B2093"},"exemplar":true,"expr":"histogram_quantile(0.95, sum(rate(evm_pool_rpc_node_rpc_call_time_bucket{pod=\"$cl_node\", rpcCallName=\"CallContext\"}[2m])) by (le)) * 1e-6","interval":"","legendFormat":"CallContext - 95","refId":"A"},{"datasource":{"type":"prometheus","uid":"PBFA97CFB590B2093"},"exemplar":true,"expr":"histogram_quantile(0.5, sum(rate(evm_pool_rpc_node_rpc_call_time_bucket{pod=\"$cl_node\", rpcCallName=\"CallContext\"}[2m])) by (le)) * 1e-6","hide":false,"interval":"","legendFormat":"CallContext - 50","refId":"B"},{"datasource":{"type":"prometheus","uid":"PBFA97CFB590B2093"},"exemplar":true,"expr":"histogram_quantile(0.95, sum(rate(evm_pool_rpc_node_rpc_call_time_bucket{rpcCallName=\"BatchCallContext\"}[2m])) by (le)) * 1e-6","hide":false,"interval":"","legendFormat":"BatchCallContext - 95","refId":"C"},{"datasource":{"type":"prometheus","uid":"PBFA97CFB590B2093"},"exemplar":true,"expr":"histogram_quantile(0.5, sum(rate(evm_pool_rpc_node_rpc_call_time_bucket{rpcCallName=\"BatchCallContext\"}[2m])) by (le)) * 1e-6","hide":false,"interval":"","legendFormat":"BatchCallContext - 50","refId":"D"},{"datasource":{"type":"prometheus","uid":"PBFA97CFB590B2093"},"exemplar":true,"expr":"histogram_quantile(0.95, sum(rate(evm_pool_rpc_node_rpc_call_time_bucket{rpcCallName=\"BalanceAt\"}[2m])) by (le)) * 1e-6","hide":false,"interval":"","legendFormat":"BalanceAt - 95","refId":"E"},{"datasource":{"type":"prometheus","uid":"PBFA97CFB590B2093"},"exemplar":true,"expr":"histogram_quantile(0.50, sum(rate(evm_pool_rpc_node_rpc_call_time_bucket{rpcCallName=\"BalanceAt\"}[2m])) by (le)) * 1e-6","hide":false,"interval":"","legendFormat":"BalanceAt - 50","refId":"F"},{"datasource":{"type":"prometheus","uid":"PBFA97CFB590B2093"},"exemplar":true,"expr":"histogram_quantile(0.95, sum(rate(evm_pool_rpc_node_rpc_call_time_bucket{rpcCallName=\"PendingNonceAt\"}[2m])) by (le)) * 1e-6","hide":false,"interval":"","legendFormat":"PendingNonceAt - 95","refId":"G"},{"datasource":{"type":"prometheus","uid":"PBFA97CFB590B2093"},"exemplar":true,"expr":"histogram_quantile(0.50, sum(rate(evm_pool_rpc_node_rpc_call_time_bucket{rpcCallName=\"PendingNonceAt\"}[2m])) by (le)) * 1e-6","hide":false,"interval":"","legendFormat":"PendingNonceAt - 50","refId":"H"}],"title":"RPC calls hist","transparent":true,"type":"timeseries"},{"datasource":{"type":"prometheus","uid":"PBFA97CFB590B2093"},"description":"RPC node states","fieldConfig":{"defaults":{"color":{"mode":"palette-classic"},"custom":{"axisLabel":"","axisPlacement":"auto","barAlignment":0,"drawStyle":"line","fillOpacity":0,"gradientMode":"none","hideFrom":{"legend":false,"tooltip":false,"viz":false},"lineInterpolation":"linear","lineWidth":1,"pointSize":5,"scaleDistribution":{"type":"linear"},"showPoints":"auto","spanNulls":false,"stacking":{"group":"A","mode":"none"},"thresholdsStyle":{"mode":"off"}},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"green","value":null},{"color":"red","value":80}]}},"overrides":[]},"gridPos":{"h":8,"w":12,"x":0,"y":12},"id":153,"options":{"legend":{"calcs":[],"displayMode":"list","placement":"bottom"},"tooltip":{"mode":"single"}},"targets":[{"datasource":{"type":"prometheus","uid":"PBFA97CFB590B2093"},"exemplar":true,"expr":"evm_pool_rpc_node_states{namespace=\"$namespace\", pod=\"$cl_node\"}","interval":"","legendFormat":"chainId: {{evmChainID}} pod: {{pod}} state: {{state}}","refId":"A"}],"title":"RPC node states","transparent":true,"type":"timeseries"},{"datasource":{"type":"prometheus","uid":"PBFA97CFB590B2093"},"fieldConfig":{"defaults":{"color":{"mode":"palette-classic"},"custom":{"axisLabel":"","axisPlacement":"auto","barAlignment":0,"drawStyle":"line","fillOpacity":0,"gradientMode":"none","hideFrom":{"legend":false,"tooltip":false,"viz":false},"lineInterpolation":"linear","lineWidth":1,"pointSize":5,"scaleDistribution":{"type":"linear"},"showPoints":"auto","spanNulls":false,"stacking":{"group":"A","mode":"none"},"thresholdsStyle":{"mode":"off"}},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"green","value":null},{"color":"red","value":80}]}},"overrides":[]},"gridPos":{"h":8,"w":12,"x":12,"y":12},"id":151,"options":{"legend":{"calcs":[],"displayMode":"list","placement":"bottom"},"tooltip":{"mode":"single"}},"pluginVersion":"8.3.5","targets":[{"datasource":{"type":"prometheus","uid":"PBFA97CFB590B2093"},"exemplar":true,"expr":"evm_pool_rpc_node_num_transitions_to_alive{namespace=\"$namespace\", pod=\"$cl_node\"}","interval":"","legendFormat":"chainId: {{evmChainID}} pod: {{pod}}","refId":"A"}],"title":"RPC node alive statuses","transparent":true,"type":"timeseries"},{"datasource":{"type":"prometheus","uid":"PBFA97CFB590B2093"},"description":"RPC calls total (rate)","fieldConfig":{"defaults":{"color":{"mode":"palette-classic"},"custom":{"axisLabel":"","axisPlacement":"auto","barAlignment":0,"drawStyle":"line","fillOpacity":0,"gradientMode":"none","hideFrom":{"legend":false,"tooltip":false,"viz":false},"lineInterpolation":"linear","lineWidth":1,"pointSize":5,"scaleDistribution":{"type":"linear"},"showPoints":"auto","spanNulls":false,"stacking":{"group":"A","mode":"none"},"thresholdsStyle":{"mode":"off"}},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"green","value":null},{"color":"red","value":80}]}},"overrides":[]},"gridPos":{"h":8,"w":12,"x":0,"y":20},"id":145,"options":{"legend":{"calcs":[],"displayMode":"list","placement":"bottom"},"tooltip":{"mode":"single"}},"targets":[{"datasource":{"type":"prometheus","uid":"PBFA97CFB590B2093"},"exemplar":true,"expr":"rate(evm_pool_rpc_node_calls_total{namespace=\"$namespace\", pod=\"$cl_node\"}[2m])","interval":"","legendFormat":"","refId":"A"}],"title":"RPC calls total (rate)","transparent":true,"type":"timeseries"},{"datasource":{"type":"prometheus","uid":"PBFA97CFB590B2093"},"fieldConfig":{"defaults":{"color":{"mode":"palette-classic"},"custom":{"axisLabel":"","axisPlacement":"auto","barAlignment":0,"drawStyle":"line","fillOpacity":0,"gradientMode":"none","hideFrom":{"legend":false,"tooltip":false,"viz":false},"lineInterpolation":"linear","lineWidth":1,"pointSize":5,"scaleDistribution":{"type":"linear"},"showPoints":"auto","spanNulls":false,"stacking":{"group":"A","mode":"none"},"thresholdsStyle":{"mode":"off"}},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"green","value":null},{"color":"red","value":80}]}},"overrides":[]},"gridPos":{"h":8,"w":12,"x":12,"y":20},"id":155,"options":{"legend":{"calcs":[],"displayMode":"list","placement":"bottom"},"tooltip":{"mode":"single"}},"targets":[{"datasource":{"type":"prometheus","uid":"PBFA97CFB590B2093"},"exemplar":true,"expr":"rate(evm_pool_rpc_node_verifies{namespace=\"$namespace\", pod=\"$cl_node\"} [2m])","interval":"","legendFormat":"Success, chainId: {{evmChainID}} nodeName: {{nodeName }} instance: {{instance}}","refId":"A"},{"datasource":{"type":"prometheus","uid":"PBFA97CFB590B2093"},"exemplar":true,"expr":"rate(evm_pool_rpc_node_verifies_success{namespace=\"$namespace\", pod=\"$cl_node\"} [2m])","hide":false,"interval":"","legendFormat":"Total, chainId: {{evmChainID}} nodeName: {{nodeName }} instance: {{instance}}","refId":"B"}],"title":"Total verifications (success/errors)","transparent":true,"type":"timeseries"},{"datasource":{"type":"prometheus","uid":"PBFA97CFB590B2093"},"description":"ETH account value","fieldConfig":{"defaults":{"color":{"mode":"palette-classic"},"custom":{"axisLabel":"","axisPlacement":"left","barAlignment":0,"drawStyle":"line","fillOpacity":0,"gradientMode":"none","hideFrom":{"legend":false,"tooltip":false,"viz":false},"lineInterpolation":"linear","lineStyle":{"fill":"solid"},"lineWidth":1,"pointSize":5,"scaleDistribution":{"type":"linear"},"showPoints":"auto","spanNulls":false,"stacking":{"group":"A","mode":"none"},"thresholdsStyle":{"mode":"off"}},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"green","value":null},{"color":"red","value":80}]}},"overrides":[]},"gridPos":{"h":8,"w":12,"x":0,"y":28},"id":165,"options":{"legend":{"calcs":[],"displayMode":"list","placement":"bottom"},"tooltip":{"mode":"single"}},"targets":[{"datasource":{"type":"prometheus","uid":"PBFA97CFB590B2093"},"exemplar":false,"expr":"eth_balance{namespace=\"$namespace\", pod=\"$cl_node\"}","interval":"","intervalFactor":1,"legendFormat":"account: {{account}}","refId":"A"}],"title":"ETH account value","transparent":true,"type":"timeseries"}],"title":"EVM CL node metrics ($cl_node)","type":"row"},{"collapsed":true,"gridPos":{"h":1,"w":24,"x":0,"y":4},"id":183,"panels":[{"datasource":{"type":"prometheus","uid":"PBFA97CFB590B2093"},"description":"TXns count (confirmed/unconfirmed)","fieldConfig":{"defaults":{"color":{"mode":"palette-classic"},"custom":{"axisLabel":"","axisPlacement":"auto","barAlignment":0,"drawStyle":"line","fillOpacity":0,"gradientMode":"none","hideFrom":{"legend":false,"tooltip":false,"viz":false},"lineInterpolation":"linear","lineWidth":1,"pointSize":5,"scaleDistribution":{"type":"linear"},"showPoints":"auto","spanNulls":false,"stacking":{"group":"A","mode":"none"},"thresholdsStyle":{"mode":"off"}},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"green","value":null},{"color":"red","value":80}]}},"overrides":[]},"gridPos":{"h":8,"w":12,"x":0,"y":5},"id":185,"options":{"legend":{"calcs":[],"displayMode":"list","placement":"bottom"},"tooltip":{"mode":"single"}},"targets":[{"datasource":{"type":"prometheus","uid":"PBFA97CFB590B2093"},"exemplar":true,"expr":"unconfirmed_transactions{namespace=\"$namespace\", pod=\"$cl_node\"}","interval":"","legendFormat":"Unconfirmed, Pod: {{pod}}","refId":"A"},{"datasource":{"type":"prometheus","uid":"PBFA97CFB590B2093"},"exemplar":true,"expr":"tx_manager_num_confirmed_transactions{namespace=\"$namespace\", pod=\"$cl_node\"}","hide":false,"interval":"","legendFormat":"Confirmed, Pod: {{pod}}","refId":"B"},{"datasource":{"type":"prometheus","uid":"PBFA97CFB590B2093"},"exemplar":true,"expr":"tx_manager_num_successful_transactions{namespace=\"$namespace\", pod=\"$cl_node\"}","hide":false,"interval":"","legendFormat":"Successful, Pod: {{pod}}","refId":"C"}],"title":"TXns count (confirmed/unconfirmed)","transparent":true,"type":"timeseries"},{"datasource":{"type":"prometheus","uid":"PBFA97CFB590B2093"},"fieldConfig":{"defaults":{"color":{"mode":"palette-classic"},"custom":{"axisLabel":"Duration, ms","axisPlacement":"left","barAlignment":0,"drawStyle":"line","fillOpacity":0,"gradientMode":"none","hideFrom":{"legend":false,"tooltip":false,"viz":false},"lineInterpolation":"linear","lineWidth":1,"pointSize":5,"scaleDistribution":{"type":"linear"},"showPoints":"auto","spanNulls":false,"stacking":{"group":"A","mode":"none"},"thresholdsStyle":{"mode":"off"}},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"green","value":null},{"color":"red","value":80}]}},"overrides":[]},"gridPos":{"h":8,"w":12,"x":12,"y":5},"id":187,"options":{"legend":{"calcs":[],"displayMode":"list","placement":"bottom"},"tooltip":{"mode":"single"}},"targets":[{"datasource":{"type":"prometheus","uid":"PBFA97CFB590B2093"},"exemplar":true,"expr":"histogram_quantile(0.95, sum(rate(tx_manager_time_until_tx_confirmed_bucket [2m])) by (le)) * 1e-6","instant":false,"interval":"","legendFormat":"TxConfirmed - 95","refId":"A"},{"datasource":{"type":"prometheus","uid":"PBFA97CFB590B2093"},"exemplar":true,"expr":"histogram_quantile(0.50, sum(rate(tx_manager_time_until_tx_confirmed_bucket [2m])) by (le)) * 1e-6","hide":false,"interval":"","legendFormat":"TxConfirmed - 50","refId":"B"},{"datasource":{"type":"prometheus","uid":"PBFA97CFB590B2093"},"exemplar":true,"expr":"histogram_quantile(0.95, sum(rate(tx_manager_time_until_tx_broadcast_bucket [2m])) by (le)) * 1e-6","hide":false,"interval":"","legendFormat":"TxBroadcast -95","refId":"C"},{"datasource":{"type":"prometheus","uid":"PBFA97CFB590B2093"},"exemplar":true,"expr":"histogram_quantile(0.50, sum(rate(tx_manager_time_until_tx_broadcast_bucket [2m])) by (le)) * 1e-6","hide":false,"interval":"","legendFormat":"TxBroadcast -50","refId":"D"}],"title":"TXns times","transparent":true,"type":"timeseries"}],"title":"TX manager ($cl_node)","type":"row"},{"collapsed":true,"gridPos":{"h":1,"w":24,"x":0,"y":5},"id":35,"panels":[{"description":"All logs of the Chainlink node","gridPos":{"h":10,"w":12,"x":0,"y":6},"id":33,"options":{"dedupStrategy":"none","enableLogDetails":true,"prettifyLogMessage":false,"showCommonLabels":false,"showLabels":false,"showTime":false,"sortOrder":"Descending","wrapLogMessage":false},"pluginVersion":"8.5.0","targets":[{"datasource":{"type":"loki","uid":"grafanacloud-logs"},"expr":"{namespace=\"$namespace\", container=\"node\", pod=\"$cl_node\"}","queryType":"range","refId":"A"}],"title":"Chainlink Node Logs","transparent":true,"type":"logs"},{"description":"All [ERROR] logs from the Chainlink node.","gridPos":{"h":10,"w":12,"x":12,"y":6},"id":38,"options":{"dedupStrategy":"none","enableLogDetails":true,"prettifyLogMessage":false,"showCommonLabels":false,"showLabels":false,"showTime":false,"sortOrder":"Descending","wrapLogMessage":false},"pluginVersion":"8.5.0","targets":[{"datasource":{"type":"loki","uid":"grafanacloud-logs"},"expr":"{namespace=\"$namespace\", container=\"node\", pod=\"$cl_node\"} | json | level=~\"error|crit\"","queryType":"range","refId":"A"}],"title":"Chainlink Node Errors","transparent":true,"type":"logs"},{"datasource":{"type":"prometheus","uid":"PBFA97CFB590B2093"},"description":"Chainlink CPU usage and limit","fieldConfig":{"defaults":{"color":{"mode":"palette-classic"},"custom":{"axisLabel":"CPU Power","axisPlacement":"left","barAlignment":0,"drawStyle":"line","fillOpacity":5,"gradientMode":"opacity","hideFrom":{"legend":false,"tooltip":false,"viz":false},"lineInterpolation":"linear","lineStyle":{"fill":"solid"},"lineWidth":2,"pointSize":5,"scaleDistribution":{"type":"linear"},"showPoints":"auto","spanNulls":false,"stacking":{"group":"A","mode":"none"},"thresholdsStyle":{"mode":"off"}},"mappings":[],"min":0,"thresholds":{"mode":"absolute","steps":[{"color":"green","value":null},{"color":"red","value":80}]}},"overrides":[]},"gridPos":{"h":8,"w":6,"x":0,"y":16},"id":41,"options":{"legend":{"calcs":[],"displayMode":"list","placement":"bottom","showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"targets":[{"datasource":{"type":"prometheus","uid":"PBFA97CFB590B2093"},"exemplar":true,"expr":"kube_pod_container_resource_limits{container=\"node\", pod=\"$cl_node\", resource=\"cpu\"}","interval":"","legendFormat":"","refId":"A"},{"datasource":{"type":"prometheus","uid":"PBFA97CFB590B2093"},"exemplar":true,"expr":"container_cpu_load_average_10s{namespace=\"$namespace\", container=\"node\", pod=\"$cl_node\"}","hide":false,"interval":"","legendFormat":"","refId":"B"}],"title":"CPU","transparent":true,"type":"timeseries"},{"datasource":{"type":"prometheus","uid":"PBFA97CFB590B2093"},"description":"Chainlink RAM usage and limit","fieldConfig":{"defaults":{"color":{"mode":"palette-classic"},"custom":{"axisLabel":"MiB","axisPlacement":"auto","barAlignment":0,"drawStyle":"line","fillOpacity":5,"gradientMode":"opacity","hideFrom":{"legend":false,"tooltip":false,"viz":false},"lineInterpolation":"linear","lineWidth":2,"pointSize":5,"scaleDistribution":{"type":"linear"},"showPoints":"auto","spanNulls":false,"stacking":{"group":"A","mode":"none"},"thresholdsStyle":{"mode":"off"}},"mappings":[],"min":0,"thresholds":{"mode":"absolute","steps":[{"color":"green","value":null},{"color":"red","value":80}]}},"overrides":[]},"gridPos":{"h":8,"w":6,"x":6,"y":16},"id":42,"options":{"legend":{"calcs":[],"displayMode":"list","placement":"bottom","showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"targets":[{"datasource":{"type":"prometheus","uid":"PBFA97CFB590B2093"},"exemplar":true,"expr":"kube_pod_container_resource_limits{container=\"node\", pod=\"$cl_node\", resource=\"memory\"} / 1024 / 1024","interval":"","legendFormat":"Limits, container: {{container}} pod: {{pod}}","refId":"A"},{"datasource":{"type":"prometheus","uid":"PBFA97CFB590B2093"},"exemplar":true,"expr":"container_memory_usage_bytes{container=\"node\", pod=\"$cl_node\"} / 1024 / 1024","hide":false,"interval":"","legendFormat":"Used, container: {{container}} pod: {{pod}}","refId":"B"}],"title":"RAM","transparent":true,"type":"timeseries"},{"description":"All [WARN] logs from the Chainlink node.","gridPos":{"h":8,"w":12,"x":12,"y":16},"id":102,"options":{"dedupStrategy":"none","enableLogDetails":true,"prettifyLogMessage":false,"showCommonLabels":false,"showLabels":false,"showTime":false,"sortOrder":"Descending","wrapLogMessage":false},"pluginVersion":"8.5.0","targets":[{"datasource":{"type":"loki","uid":"grafanacloud-logs"},"expr":"{namespace=\"$namespace\", container=\"node\", pod=\"$cl_node\"} | json | level=~\"warn\" | msg!=\"Disk space is not enough to log into disk any longer, required disk space\"","queryType":"range","refId":"A"}],"title":"Chainlink Node Warnings","transparent":true,"type":"logs"}],"repeat":"cl_node","title":"CL node metrics ($cl_node)","type":"row"},{"collapsed":true,"gridPos":{"h":1,"w":24,"x":0,"y":6},"id":104,"panels":[{"gridPos":{"h":12,"w":18,"x":0,"y":7},"id":106,"options":{"dedupStrategy":"none","enableLogDetails":true,"prettifyLogMessage":false,"showCommonLabels":false,"showLabels":false,"showTime":false,"sortOrder":"Descending","wrapLogMessage":false},"pluginVersion":"8.5.5","targets":[{"datasource":{"type":"loki","uid":"grafanacloud-logs"},"expr":"{namespace=\"$namespace\", container=~\"geth-network|starknetdev\", pod=\"$geth_node\"}","refId":"A"}],"title":"Geth Logs","transparent":true,"type":"logs"},{"datasource":{"type":"prometheus","uid":"PBFA97CFB590B2093"},"description":"Geth CPU usage and limit","fieldConfig":{"defaults":{"color":{"mode":"palette-classic"},"custom":{"axisLabel":"CPU Power","axisPlacement":"left","barAlignment":0,"drawStyle":"line","fillOpacity":5,"gradientMode":"opacity","hideFrom":{"legend":false,"tooltip":false,"viz":false},"lineInterpolation":"linear","lineStyle":{"fill":"solid"},"lineWidth":2,"pointSize":5,"scaleDistribution":{"type":"linear"},"showPoints":"auto","spanNulls":false,"stacking":{"group":"A","mode":"none"},"thresholdsStyle":{"mode":"off"}},"mappings":[],"min":0,"thresholds":{"mode":"absolute","steps":[{"color":"green","value":null},{"color":"red","value":80}]}},"overrides":[]},"gridPos":{"h":6,"w":6,"x":18,"y":7},"id":107,"options":{"legend":{"calcs":[],"displayMode":"list","placement":"bottom","showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"targets":[{"datasource":{"type":"prometheus","uid":"PBFA97CFB590B2093"},"exemplar":true,"expr":"kube_pod_container_resource_limits{exported_namespace=\"$namespace\", container=\"geth-network\", resource=\"cpu\"}","interval":"","legendFormat":"","refId":"A"},{"datasource":{"type":"prometheus","uid":"PBFA97CFB590B2093"},"exemplar":true,"expr":"container_cpu_load_average_10s{namespace=\"$namespace\", container=~\"geth-network|starknetdev\"}","hide":false,"interval":"","legendFormat":"","refId":"B"}],"title":"Geth CPU","transparent":true,"type":"timeseries"},{"datasource":{"type":"prometheus","uid":"PBFA97CFB590B2093"},"description":"Geth RAM usage and limit","fieldConfig":{"defaults":{"color":{"mode":"palette-classic"},"custom":{"axisLabel":"MiB","axisPlacement":"auto","barAlignment":0,"drawStyle":"line","fillOpacity":5,"gradientMode":"opacity","hideFrom":{"legend":false,"tooltip":false,"viz":false},"lineInterpolation":"linear","lineWidth":2,"pointSize":5,"scaleDistribution":{"type":"linear"},"showPoints":"auto","spanNulls":false,"stacking":{"group":"A","mode":"none"},"thresholdsStyle":{"mode":"off"}},"mappings":[],"min":0,"thresholds":{"mode":"absolute","steps":[{"color":"green","value":null},{"color":"red","value":80}]}},"overrides":[]},"gridPos":{"h":6,"w":6,"x":18,"y":13},"id":108,"options":{"legend":{"calcs":[],"displayMode":"list","placement":"bottom","showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"targets":[{"datasource":{"type":"prometheus","uid":"PBFA97CFB590B2093"},"exemplar":true,"expr":"kube_pod_container_resource_limits{exported_namespace=\"$namespace\", container=~\"geth-network|starknetdev\", resource=\"memory\"} / 1024 / 1024","interval":"","legendFormat":"","refId":"A"},{"datasource":{"type":"prometheus","uid":"PBFA97CFB590B2093"},"exemplar":true,"expr":"container_memory_usage_bytes{namespace=\"$namespace\", container=~\"geth-network|starknetdev\"} / 1024 / 1024","hide":false,"interval":"","legendFormat":"","refId":"B"}],"title":"Geth RAM","transparent":true,"type":"timeseries"}],"repeat":"geth_node","title":"Simulated network metrics ($geth_node)","type":"row"},{"collapsed":true,"gridPos":{"h":1,"w":24,"x":0,"y":7},"id":76,"panels":[{"description":"Logs of the mockserver","gridPos":{"h":12,"w":18,"x":0,"y":8},"id":70,"options":{"dedupStrategy":"none","enableLogDetails":true,"prettifyLogMessage":false,"showCommonLabels":false,"showLabels":false,"showTime":true,"sortOrder":"Descending","wrapLogMessage":false},"pluginVersion":"8.5.0","targets":[{"datasource":{"type":"loki","uid":"grafanacloud-logs"},"expr":"{namespace=\"$namespace\", container=\"mockserver\"}","refId":"A"}],"title":"Mock Server Logs","transparent":true,"type":"logs"},{"datasource":{"type":"prometheus","uid":"PBFA97CFB590B2093"},"description":"Mock Server CPU usage and limit","fieldConfig":{"defaults":{"color":{"mode":"palette-classic"},"custom":{"axisLabel":"CPU Power","axisPlacement":"left","barAlignment":0,"drawStyle":"line","fillOpacity":5,"gradientMode":"opacity","hideFrom":{"legend":false,"tooltip":false,"viz":false},"lineInterpolation":"linear","lineStyle":{"fill":"solid"},"lineWidth":2,"pointSize":5,"scaleDistribution":{"type":"linear"},"showPoints":"auto","spanNulls":false,"stacking":{"group":"A","mode":"none"},"thresholdsStyle":{"mode":"off"}},"mappings":[],"min":0,"thresholds":{"mode":"absolute","steps":[{"color":"green","value":null},{"color":"red","value":80}]}},"overrides":[]},"gridPos":{"h":6,"w":6,"x":18,"y":8},"id":71,"options":{"legend":{"calcs":[],"displayMode":"list","placement":"bottom","showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"targets":[{"datasource":{"type":"prometheus","uid":"PBFA97CFB590B2093"},"exemplar":true,"expr":"kube_pod_container_resource_limits{exported_namespace=\"$namespace\", container=\"mockserver\", resource=\"cpu\"}","interval":"","legendFormat":"","refId":"A"},{"datasource":{"type":"prometheus","uid":"PBFA97CFB590B2093"},"exemplar":true,"expr":"container_cpu_load_average_10s{namespace=\"$namespace\", container=\"mockserver\"}","hide":false,"interval":"","legendFormat":"","refId":"B"}],"title":"Mock Server CPU","transparent":true,"type":"timeseries"},{"datasource":{"type":"prometheus","uid":"PBFA97CFB590B2093"},"description":"Mock Server RAM usage and limit","fieldConfig":{"defaults":{"color":{"mode":"palette-classic"},"custom":{"axisLabel":"MiB","axisPlacement":"auto","barAlignment":0,"drawStyle":"line","fillOpacity":5,"gradientMode":"opacity","hideFrom":{"legend":false,"tooltip":false,"viz":false},"lineInterpolation":"linear","lineWidth":2,"pointSize":5,"scaleDistribution":{"type":"linear"},"showPoints":"auto","spanNulls":false,"stacking":{"group":"A","mode":"none"},"thresholdsStyle":{"mode":"off"}},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"green","value":null},{"color":"red","value":80}]}},"overrides":[]},"gridPos":{"h":6,"w":6,"x":18,"y":14},"id":72,"options":{"legend":{"calcs":[],"displayMode":"list","placement":"bottom","showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"targets":[{"datasource":{"type":"prometheus","uid":"PBFA97CFB590B2093"},"exemplar":true,"expr":"kube_pod_container_resource_limits{exported_namespace=\"$namespace\", container=\"mockserver\", resource=\"memory\"} / 1024 / 1024","interval":"","legendFormat":"","refId":"A"},{"datasource":{"type":"prometheus","uid":"PBFA97CFB590B2093"},"exemplar":true,"expr":"container_memory_usage_bytes{namespace=\"$namespace\", container=\"mockserver\"} / 1024 / 1024","hide":false,"interval":"","legendFormat":"","refId":"B"}],"title":"Mock Server RAM","transparent":true,"type":"timeseries"}],"title":"Mock Server","type":"row"},{"collapsed":true,"gridPos":{"h":1,"w":24,"x":0,"y":8},"id":74,"panels":[{"description":"Logs of the instance actually running the tests","gridPos":{"h":12,"w":18,"x":0,"y":9},"id":36,"options":{"dedupStrategy":"none","enableLogDetails":true,"prettifyLogMessage":false,"showCommonLabels":false,"showLabels":false,"showTime":false,"sortOrder":"Descending","wrapLogMessage":false},"pluginVersion":"8.5.0","targets":[{"datasource":{"type":"loki","uid":"grafanacloud-logs"},"expr":"{namespace=\"$namespace\", container=\"remote-test-runner\"}","refId":"A"}],"title":"Test Runner Logs","transparent":true,"type":"logs"},{"datasource":{"type":"prometheus","uid":"PBFA97CFB590B2093"},"description":"Test Runner CPU usage and limit","fieldConfig":{"defaults":{"color":{"mode":"palette-classic"},"custom":{"axisLabel":"CPU Power","axisPlacement":"left","barAlignment":0,"drawStyle":"line","fillOpacity":5,"gradientMode":"opacity","hideFrom":{"legend":false,"tooltip":false,"viz":false},"lineInterpolation":"linear","lineStyle":{"fill":"solid"},"lineWidth":2,"pointSize":5,"scaleDistribution":{"type":"linear"},"showPoints":"auto","spanNulls":false,"stacking":{"group":"A","mode":"none"},"thresholdsStyle":{"mode":"off"}},"mappings":[],"min":0,"thresholds":{"mode":"absolute","steps":[{"color":"green","value":null},{"color":"red","value":80}]}},"overrides":[]},"gridPos":{"h":6,"w":6,"x":18,"y":9},"id":43,"options":{"legend":{"calcs":[],"displayMode":"list","placement":"bottom","showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"targets":[{"datasource":{"type":"prometheus","uid":"PBFA97CFB590B2093"},"exemplar":true,"expr":"kube_pod_container_resource_limits{exported_namespace=\"$namespace\", container=\"remote-test-runner\", resource=\"cpu\"}","interval":"","legendFormat":"","refId":"A"},{"datasource":{"type":"prometheus","uid":"PBFA97CFB590B2093"},"exemplar":true,"expr":"container_cpu_load_average_10s{namespace=\"$namespace\", container=\"remote-test-runner\"}","hide":false,"interval":"","legendFormat":"","refId":"B"}],"title":"Runner CPU","transparent":true,"type":"timeseries"},{"datasource":{"type":"prometheus","uid":"PBFA97CFB590B2093"},"description":"Test Runner RAM usage and limit","fieldConfig":{"defaults":{"color":{"mode":"palette-classic"},"custom":{"axisLabel":"MiB","axisPlacement":"auto","barAlignment":0,"drawStyle":"line","fillOpacity":5,"gradientMode":"opacity","hideFrom":{"legend":false,"tooltip":false,"viz":false},"lineInterpolation":"linear","lineWidth":2,"pointSize":5,"scaleDistribution":{"type":"linear"},"showPoints":"auto","spanNulls":false,"stacking":{"group":"A","mode":"none"},"thresholdsStyle":{"mode":"off"}},"mappings":[],"min":0,"thresholds":{"mode":"absolute","steps":[{"color":"green","value":null},{"color":"red","value":80}]}},"overrides":[]},"gridPos":{"h":6,"w":6,"x":18,"y":15},"id":44,"options":{"legend":{"calcs":[],"displayMode":"list","placement":"bottom","showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"targets":[{"datasource":{"type":"prometheus","uid":"PBFA97CFB590B2093"},"exemplar":true,"expr":"kube_pod_container_resource_limits{exported_namespace=\"$namespace\", container=\"remote-test-runner\", resource=\"memory\"} / 1024 / 1024","interval":"","legendFormat":"","refId":"A"},{"datasource":{"type":"prometheus","uid":"PBFA97CFB590B2093"},"exemplar":true,"expr":"container_memory_usage_bytes{namespace=\"$namespace\", container=\"remote-test-runner\"} / 1024 / 1024","hide":false,"interval":"","legendFormat":"","refId":"B"}],"title":"Runner RAM","transparent":true,"type":"timeseries"},{"description":"Errors and Warnings found in Test Runner","gridPos":{"h":5,"w":8,"x":0,"y":21},"id":139,"options":{"dedupStrategy":"none","enableLogDetails":true,"prettifyLogMessage":false,"showCommonLabels":false,"showLabels":false,"showTime":false,"sortOrder":"Descending","wrapLogMessage":false},"pluginVersion":"8.5.0","targets":[{"datasource":{"type":"loki","uid":"grafanacloud-logs"},"expr":"{namespace=\"$namespace\", container=\"remote-test-runner\"} |~ \"WRN|ERR\"","refId":"A"}],"title":"Test Runner Errors and Warnings","transparent":true,"type":"logs"},{"description":"Info logs","gridPos":{"h":5,"w":8,"x":8,"y":21},"id":140,"options":{"dedupStrategy":"none","enableLogDetails":true,"prettifyLogMessage":false,"showCommonLabels":false,"showLabels":false,"showTime":false,"sortOrder":"Descending","wrapLogMessage":false},"pluginVersion":"8.5.0","targets":[{"datasource":{"type":"loki","uid":"grafanacloud-logs"},"expr":"{namespace=\"$namespace\", container=\"remote-test-runner\"} |= \"INF\"","refId":"A"}],"title":"Test Runner Info","transparent":true,"type":"logs"},{"description":"Debugs","gridPos":{"h":5,"w":8,"x":16,"y":21},"id":141,"options":{"dedupStrategy":"none","enableLogDetails":true,"prettifyLogMessage":false,"showCommonLabels":false,"showLabels":false,"showTime":false,"sortOrder":"Descending","wrapLogMessage":false},"pluginVersion":"8.5.0","targets":[{"datasource":{"type":"loki","uid":"grafanacloud-logs"},"expr":"{namespace=\"$namespace\", container=\"remote-test-runner\"} |~ \"DBG\"","refId":"A"}],"title":"Test Runner Debugs","transparent":true,"type":"logs"}],"title":"Test runner","type":"row"}],"refresh":"5s","schemaVersion":34,"style":"dark","tags":["tests"],"templating":{"list":[{"current":{"selected":false,"text":"chainlink-test-env-3735f","value":"chainlink-test-env-3735f"},"definition":"label_values(namespace)","description":"Namespace","hide":0,"includeAll":false,"label":"Namespace","multi":false,"name":"namespace","options":[],"query":"label_values(namespace)","refresh":1,"regex":"chainlink-.*|.*-soak-.*|.*performance-.*|.*-chaos-.*","skipUrlSync":false,"sort":0,"type":"query"},{"current":{"selected":true,"text":["chainlink-0-98744888d-r9n6r"],"value":["chainlink-0-98744888d-r9n6r"]},"definition":"label_values({namespace=\"$namespace\"}, pod)","description":"The specific Chainlink node to get insight into","hide":0,"includeAll":false,"label":"Chainlink Node","multi":true,"name":"cl_node","options":[],"query":"label_values({namespace=\"$namespace\"}, pod)","refresh":1,"regex":"chainlink-.*","skipUrlSync":false,"sort":0,"type":"query"},{"current":{"selected":false,"text":"geth-6469b5b5f8-smd2z","value":"geth-6469b5b5f8-smd2z"},"definition":"label_values({namespace=\"$namespace\"}, pod)","description":"If launched, a simulated instance of Geth","hide":0,"includeAll":false,"label":"Simulated Geth Node","multi":false,"name":"geth_node","options":[],"query":"label_values({namespace=\"$namespace\"}, pod)","refresh":1,"regex":"geth-|starknet.*","skipUrlSync":false,"sort":0,"type":"query"}]},"time":{"from":"now-30m","to":"now"},"timepicker":{},"timezone":"","title":"Chainlink Testing Insights","uid":"AFATC9A7k","version":1,"weekStart":""} \ No newline at end of file diff --git a/env/imports/k8s/httpchaos/chaosmeshorg/chaosmeshorg.go b/env/imports/k8s/httpchaos/chaosmeshorg/chaosmeshorg.go new file mode 100644 index 000000000..0a7bc1cae --- /dev/null +++ b/env/imports/k8s/httpchaos/chaosmeshorg/chaosmeshorg.go @@ -0,0 +1,452 @@ +// chaos-meshorg +package chaosmeshorg + +import ( + _jsii_ "github.com/aws/jsii-runtime-go/runtime" + _init_ "github.com/smartcontractkit/chainlink-testing-framework/env/imports/k8s/httpchaos/chaosmeshorg/jsii" + + "github.com/aws/constructs-go/constructs/v10" + "github.com/cdk8s-team/cdk8s-core-go/cdk8s/v2" + "github.com/smartcontractkit/chainlink-testing-framework/env/imports/k8s/httpchaos/chaosmeshorg/internal" +) + +// HTTPChaos is the Schema for the HTTPchaos API. +type HttpChaos interface { + cdk8s.ApiObject + // The group portion of the API version (e.g. `authorization.k8s.io`). + ApiGroup() *string + // The object's API version (e.g. `authorization.k8s.io/v1`). + ApiVersion() *string + // The chart in which this object is defined. + Chart() cdk8s.Chart + // The object kind. + Kind() *string + // Metadata associated with this API object. + Metadata() cdk8s.ApiObjectMetadataDefinition + // The name of the API object. + // + // If a name is specified in `metadata.name` this will be the name returned. + // Otherwise, a name will be generated by calling + // `Chart.of(this).generatedObjectName(this)`, which by default uses the + // construct path to generate a DNS-compatible name for the resource. + Name() *string + // The tree node. + Node() constructs.Node + // Create a dependency between this ApiObject and other constructs. + // + // These can be other ApiObjects, Charts, or custom. + AddDependency(dependencies ...constructs.IConstruct) + // Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. + // + // Example: + // kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true)); + // + AddJsonPatch(ops ...cdk8s.JsonPatch) + // Renders the object to Kubernetes JSON. + ToJson() interface{} + // Returns a string representation of this construct. + ToString() *string +} + +// The jsii proxy struct for HttpChaos +type jsiiProxy_HttpChaos struct { + internal.Type__cdk8sApiObject +} + +func (j *jsiiProxy_HttpChaos) ApiGroup() *string { + var returns *string + _jsii_.Get( + j, + "apiGroup", + &returns, + ) + return returns +} + +func (j *jsiiProxy_HttpChaos) ApiVersion() *string { + var returns *string + _jsii_.Get( + j, + "apiVersion", + &returns, + ) + return returns +} + +func (j *jsiiProxy_HttpChaos) Chart() cdk8s.Chart { + var returns cdk8s.Chart + _jsii_.Get( + j, + "chart", + &returns, + ) + return returns +} + +func (j *jsiiProxy_HttpChaos) Kind() *string { + var returns *string + _jsii_.Get( + j, + "kind", + &returns, + ) + return returns +} + +func (j *jsiiProxy_HttpChaos) Metadata() cdk8s.ApiObjectMetadataDefinition { + var returns cdk8s.ApiObjectMetadataDefinition + _jsii_.Get( + j, + "metadata", + &returns, + ) + return returns +} + +func (j *jsiiProxy_HttpChaos) Name() *string { + var returns *string + _jsii_.Get( + j, + "name", + &returns, + ) + return returns +} + +func (j *jsiiProxy_HttpChaos) Node() constructs.Node { + var returns constructs.Node + _jsii_.Get( + j, + "node", + &returns, + ) + return returns +} + +// Defines a "HTTPChaos" API object. +func NewHttpChaos(scope constructs.Construct, id *string, props *HttpChaosProps) HttpChaos { + _init_.Initialize() + + j := jsiiProxy_HttpChaos{} + + _jsii_.Create( + "chaos-meshorg.HttpChaos", + []interface{}{scope, id, props}, + &j, + ) + + return &j +} + +// Defines a "HTTPChaos" API object. +func NewHttpChaos_Override(h HttpChaos, scope constructs.Construct, id *string, props *HttpChaosProps) { + _init_.Initialize() + + _jsii_.Create( + "chaos-meshorg.HttpChaos", + []interface{}{scope, id, props}, + h, + ) +} + +// Checks if `x` is a construct. +// +// Use this method instead of `instanceof` to properly detect `Construct` +// instances, even when the construct library is symlinked. +// +// Explanation: in JavaScript, multiple copies of the `constructs` library on +// disk are seen as independent, completely different libraries. As a +// consequence, the class `Construct` in each copy of the `constructs` library +// is seen as a different class, and an instance of one class will not test as +// `instanceof` the other class. `npm install` will not create installations +// like this, but users may manually symlink construct libraries together or +// use a monorepo tool: in those cases, multiple copies of the `constructs` +// library can be accidentally installed, and `instanceof` will behave +// unpredictably. It is safest to avoid using `instanceof`, and using +// this type-testing method instead. +// +// Returns: true if `x` is an object created from a class which extends `Construct`. +func HttpChaos_IsConstruct(x interface{}) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "chaos-meshorg.HttpChaos", + "isConstruct", + []interface{}{x}, + &returns, + ) + + return returns +} + +// Renders a Kubernetes manifest for "HTTPChaos". +// +// This can be used to inline resource manifests inside other objects (e.g. as templates). +func HttpChaos_Manifest(props *HttpChaosProps) interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "chaos-meshorg.HttpChaos", + "manifest", + []interface{}{props}, + &returns, + ) + + return returns +} + +// Returns the `ApiObject` named `Resource` which is a child of the given construct. +// +// If `c` is an `ApiObject`, it is returned directly. Throws an +// exception if the construct does not have a child named `Default` _or_ if +// this child is not an `ApiObject`. +func HttpChaos_Of(c constructs.IConstruct) cdk8s.ApiObject { + _init_.Initialize() + + var returns cdk8s.ApiObject + + _jsii_.StaticInvoke( + "chaos-meshorg.HttpChaos", + "of", + []interface{}{c}, + &returns, + ) + + return returns +} + +func HttpChaos_GVK() *cdk8s.GroupVersionKind { + _init_.Initialize() + var returns *cdk8s.GroupVersionKind + _jsii_.StaticGet( + "chaos-meshorg.HttpChaos", + "GVK", + &returns, + ) + return returns +} + +func (h *jsiiProxy_HttpChaos) AddDependency(dependencies ...constructs.IConstruct) { + args := []interface{}{} + for _, a := range dependencies { + args = append(args, a) + } + + _jsii_.InvokeVoid( + h, + "addDependency", + args, + ) +} + +func (h *jsiiProxy_HttpChaos) AddJsonPatch(ops ...cdk8s.JsonPatch) { + args := []interface{}{} + for _, a := range ops { + args = append(args, a) + } + + _jsii_.InvokeVoid( + h, + "addJsonPatch", + args, + ) +} + +func (h *jsiiProxy_HttpChaos) ToJson() interface{} { + var returns interface{} + + _jsii_.Invoke( + h, + "toJson", + nil, // no parameters + &returns, + ) + + return returns +} + +func (h *jsiiProxy_HttpChaos) ToString() *string { + var returns *string + + _jsii_.Invoke( + h, + "toString", + nil, // no parameters + &returns, + ) + + return returns +} + +// HTTPChaos is the Schema for the HTTPchaos API. +type HttpChaosProps struct { + Metadata *cdk8s.ApiObjectMetadata `field:"optional" json:"metadata" yaml:"metadata"` + Spec *HttpChaosSpec `field:"optional" json:"spec" yaml:"spec"` +} + +type HttpChaosSpec struct { + // Mode defines the mode to run chaos action. + // + // Supported mode: one / all / fixed / fixed-percent / random-max-percent. + Mode HttpChaosSpecMode `field:"required" json:"mode" yaml:"mode"` + // Selector is used to select pods that are used to inject chaos action. + Selector *HttpChaosSpecSelector `field:"required" json:"selector" yaml:"selector"` + // Target is the object to be selected and injected. + Target HttpChaosSpecTarget `field:"required" json:"target" yaml:"target"` + // Abort is a rule to abort a http session. + Abort *bool `field:"optional" json:"abort" yaml:"abort"` + // Code is a rule to select target by http status code in response. + Code *float64 `field:"optional" json:"code" yaml:"code"` + // Delay represents the delay of the target request/response. + // + // A duration string is a possibly unsigned sequence of decimal numbers, each with optional fraction and a unit suffix, such as "300ms", "2h45m". Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h". + Delay *string `field:"optional" json:"delay" yaml:"delay"` + // Duration represents the duration of the chaos action. + Duration *string `field:"optional" json:"duration" yaml:"duration"` + // Method is a rule to select target by http method in request. + Method *string `field:"optional" json:"method" yaml:"method"` + // Patch is a rule to patch some contents in target. + Patch *HttpChaosSpecPatch `field:"optional" json:"patch" yaml:"patch"` + // Path is a rule to select target by uri path in http request. + Path *string `field:"optional" json:"path" yaml:"path"` + // Port represents the target port to be proxy of. + Port *float64 `field:"optional" json:"port" yaml:"port"` + // Replace is a rule to replace some contents in target. + Replace *HttpChaosSpecReplace `field:"optional" json:"replace" yaml:"replace"` + // RequestHeaders is a rule to select target by http headers in request. + // + // The key-value pairs represent header name and header value pairs. + RequestHeaders *map[string]*string `field:"optional" json:"requestHeaders" yaml:"requestHeaders"` + // ResponseHeaders is a rule to select target by http headers in response. + // + // The key-value pairs represent header name and header value pairs. + ResponseHeaders *map[string]*string `field:"optional" json:"responseHeaders" yaml:"responseHeaders"` + // Value is required when the mode is set to `FixedPodMode` / `FixedPercentPodMod` / `RandomMaxPercentPodMod`. + // + // If `FixedPodMode`, provide an integer of pods to do chaos action. If `FixedPercentPodMod`, provide a number from 0-100 to specify the percent of pods the server can do chaos action. IF `RandomMaxPercentPodMod`, provide a number from 0-100 to specify the max percent of pods to do chaos action + Value *string `field:"optional" json:"value" yaml:"value"` +} + +// Mode defines the mode to run chaos action. +// +// Supported mode: one / all / fixed / fixed-percent / random-max-percent. +type HttpChaosSpecMode string + +const ( + // one. + HttpChaosSpecMode_ONE HttpChaosSpecMode = "ONE" + // all. + HttpChaosSpecMode_ALL HttpChaosSpecMode = "ALL" + // fixed. + HttpChaosSpecMode_FIXED HttpChaosSpecMode = "FIXED" + // fixed-percent. + HttpChaosSpecMode_FIXED_PERCENT HttpChaosSpecMode = "FIXED_PERCENT" + // random-max-percent. + HttpChaosSpecMode_RANDOM_MAX_PERCENT HttpChaosSpecMode = "RANDOM_MAX_PERCENT" +) + +// Patch is a rule to patch some contents in target. +type HttpChaosSpecPatch struct { + // Body is a rule to patch message body of target. + Body *HttpChaosSpecPatchBody `field:"optional" json:"body" yaml:"body"` + // Headers is a rule to append http headers of target. + // + // For example: `[["Set-Cookie", ""], ["Set-Cookie", ""]]`. + Headers *[]*[]*string `field:"optional" json:"headers" yaml:"headers"` + // Queries is a rule to append uri queries of target(Request only). + // + // For example: `[["foo", "bar"], ["foo", "unknown"]]`. + Queries *[]*[]*string `field:"optional" json:"queries" yaml:"queries"` +} + +// Body is a rule to patch message body of target. +type HttpChaosSpecPatchBody struct { + // Type represents the patch type, only support `JSON` as [merge patch json](https://tools.ietf.org/html/rfc7396) currently. + Type *string `field:"required" json:"type" yaml:"type"` + // Value is the patch contents. + Value *string `field:"required" json:"value" yaml:"value"` +} + +// Replace is a rule to replace some contents in target. +type HttpChaosSpecReplace struct { + // Body is a rule to replace http message body in target. + Body *string `field:"optional" json:"body" yaml:"body"` + // Code is a rule to replace http status code in response. + Code *float64 `field:"optional" json:"code" yaml:"code"` + // Headers is a rule to replace http headers of target. + // + // The key-value pairs represent header name and header value pairs. + Headers *map[string]*string `field:"optional" json:"headers" yaml:"headers"` + // Method is a rule to replace http method in request. + Method *string `field:"optional" json:"method" yaml:"method"` + // Path is rule to to replace uri path in http request. + Path *string `field:"optional" json:"path" yaml:"path"` + // Queries is a rule to replace uri queries in http request. + // + // For example, with value `{ "foo": "unknown" }`, the `/?foo=bar` will be altered to `/?foo=unknown`, + Queries *map[string]*string `field:"optional" json:"queries" yaml:"queries"` +} + +// Selector is used to select pods that are used to inject chaos action. +type HttpChaosSpecSelector struct { + // Map of string keys and values that can be used to select objects. + // + // A selector based on annotations. + AnnotationSelectors *map[string]*string `field:"optional" json:"annotationSelectors" yaml:"annotationSelectors"` + // a slice of label selector expressions that can be used to select objects. + // + // A list of selectors based on set-based label expressions. + ExpressionSelectors *[]*HttpChaosSpecSelectorExpressionSelectors `field:"optional" json:"expressionSelectors" yaml:"expressionSelectors"` + // Map of string keys and values that can be used to select objects. + // + // A selector based on fields. + FieldSelectors *map[string]*string `field:"optional" json:"fieldSelectors" yaml:"fieldSelectors"` + // Map of string keys and values that can be used to select objects. + // + // A selector based on labels. + LabelSelectors *map[string]*string `field:"optional" json:"labelSelectors" yaml:"labelSelectors"` + // Namespaces is a set of namespace to which objects belong. + Namespaces *[]*string `field:"optional" json:"namespaces" yaml:"namespaces"` + // Nodes is a set of node name and objects must belong to these nodes. + Nodes *[]*string `field:"optional" json:"nodes" yaml:"nodes"` + // Map of string keys and values that can be used to select nodes. + // + // Selector which must match a node's labels, and objects must belong to these selected nodes. + NodeSelectors *map[string]*string `field:"optional" json:"nodeSelectors" yaml:"nodeSelectors"` + // PodPhaseSelectors is a set of condition of a pod at the current time. + // + // supported value: Pending / Running / Succeeded / Failed / Unknown. + PodPhaseSelectors *[]*string `field:"optional" json:"podPhaseSelectors" yaml:"podPhaseSelectors"` + // Pods is a map of string keys and a set values that used to select pods. + // + // The key defines the namespace which pods belong, and the each values is a set of pod names. + Pods *map[string]*[]*string `field:"optional" json:"pods" yaml:"pods"` +} + +// A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. +type HttpChaosSpecSelectorExpressionSelectors struct { + // key is the label key that the selector applies to. + Key *string `field:"required" json:"key" yaml:"key"` + // operator represents a key's relationship to a set of values. + // + // Valid operators are In, NotIn, Exists and DoesNotExist. + Operator *string `field:"required" json:"operator" yaml:"operator"` + // 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. + Values *[]*string `field:"optional" json:"values" yaml:"values"` +} + +// Target is the object to be selected and injected. +type HttpChaosSpecTarget string + +const ( + // Request. + HttpChaosSpecTarget_REQUEST HttpChaosSpecTarget = "REQUEST" + // Response. + HttpChaosSpecTarget_RESPONSE HttpChaosSpecTarget = "RESPONSE" +) diff --git a/env/imports/k8s/httpchaos/chaosmeshorg/chaosmeshorg.init.go b/env/imports/k8s/httpchaos/chaosmeshorg/chaosmeshorg.init.go new file mode 100644 index 000000000..ad29eff16 --- /dev/null +++ b/env/imports/k8s/httpchaos/chaosmeshorg/chaosmeshorg.init.go @@ -0,0 +1,79 @@ +package chaosmeshorg + +import ( + "reflect" + + _jsii_ "github.com/aws/jsii-runtime-go/runtime" +) + +func init() { + _jsii_.RegisterClass( + "chaos-meshorg.HttpChaos", + reflect.TypeOf((*HttpChaos)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "addDependency", GoMethod: "AddDependency"}, + _jsii_.MemberMethod{JsiiMethod: "addJsonPatch", GoMethod: "AddJsonPatch"}, + _jsii_.MemberProperty{JsiiProperty: "apiGroup", GoGetter: "ApiGroup"}, + _jsii_.MemberProperty{JsiiProperty: "apiVersion", GoGetter: "ApiVersion"}, + _jsii_.MemberProperty{JsiiProperty: "chart", GoGetter: "Chart"}, + _jsii_.MemberProperty{JsiiProperty: "kind", GoGetter: "Kind"}, + _jsii_.MemberProperty{JsiiProperty: "metadata", GoGetter: "Metadata"}, + _jsii_.MemberProperty{JsiiProperty: "name", GoGetter: "Name"}, + _jsii_.MemberProperty{JsiiProperty: "node", GoGetter: "Node"}, + _jsii_.MemberMethod{JsiiMethod: "toJson", GoMethod: "ToJson"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + }, + func() interface{} { + j := jsiiProxy_HttpChaos{} + _jsii_.InitJsiiProxy(&j.Type__cdk8sApiObject) + return &j + }, + ) + _jsii_.RegisterStruct( + "chaos-meshorg.HttpChaosProps", + reflect.TypeOf((*HttpChaosProps)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "chaos-meshorg.HttpChaosSpec", + reflect.TypeOf((*HttpChaosSpec)(nil)).Elem(), + ) + _jsii_.RegisterEnum( + "chaos-meshorg.HttpChaosSpecMode", + reflect.TypeOf((*HttpChaosSpecMode)(nil)).Elem(), + map[string]interface{}{ + "ONE": HttpChaosSpecMode_ONE, + "ALL": HttpChaosSpecMode_ALL, + "FIXED": HttpChaosSpecMode_FIXED, + "FIXED_PERCENT": HttpChaosSpecMode_FIXED_PERCENT, + "RANDOM_MAX_PERCENT": HttpChaosSpecMode_RANDOM_MAX_PERCENT, + }, + ) + _jsii_.RegisterStruct( + "chaos-meshorg.HttpChaosSpecPatch", + reflect.TypeOf((*HttpChaosSpecPatch)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "chaos-meshorg.HttpChaosSpecPatchBody", + reflect.TypeOf((*HttpChaosSpecPatchBody)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "chaos-meshorg.HttpChaosSpecReplace", + reflect.TypeOf((*HttpChaosSpecReplace)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "chaos-meshorg.HttpChaosSpecSelector", + reflect.TypeOf((*HttpChaosSpecSelector)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "chaos-meshorg.HttpChaosSpecSelectorExpressionSelectors", + reflect.TypeOf((*HttpChaosSpecSelectorExpressionSelectors)(nil)).Elem(), + ) + _jsii_.RegisterEnum( + "chaos-meshorg.HttpChaosSpecTarget", + reflect.TypeOf((*HttpChaosSpecTarget)(nil)).Elem(), + map[string]interface{}{ + "REQUEST": HttpChaosSpecTarget_REQUEST, + "RESPONSE": HttpChaosSpecTarget_RESPONSE, + }, + ) +} diff --git a/env/imports/k8s/httpchaos/chaosmeshorg/internal/types.go b/env/imports/k8s/httpchaos/chaosmeshorg/internal/types.go new file mode 100644 index 000000000..de3a04f73 --- /dev/null +++ b/env/imports/k8s/httpchaos/chaosmeshorg/internal/types.go @@ -0,0 +1,5 @@ +package internal +import ( + "github.com/cdk8s-team/cdk8s-core-go/cdk8s/v2" +) +type Type__cdk8sApiObject = cdk8s.ApiObject diff --git a/env/imports/k8s/httpchaos/chaosmeshorg/jsii/chaos-meshorg-0.0.0.tgz b/env/imports/k8s/httpchaos/chaosmeshorg/jsii/chaos-meshorg-0.0.0.tgz new file mode 100644 index 000000000..67623dd12 Binary files /dev/null and b/env/imports/k8s/httpchaos/chaosmeshorg/jsii/chaos-meshorg-0.0.0.tgz differ diff --git a/env/imports/k8s/httpchaos/chaosmeshorg/jsii/jsii.go b/env/imports/k8s/httpchaos/chaosmeshorg/jsii/jsii.go new file mode 100644 index 000000000..319ef3f24 --- /dev/null +++ b/env/imports/k8s/httpchaos/chaosmeshorg/jsii/jsii.go @@ -0,0 +1,28 @@ +// Package jsii contains the functionaility needed for jsii packages to +// initialize their dependencies and themselves. Users should never need to use this package +// directly. If you find you need to - please report a bug at +// https://github.com/aws/jsii/issues/new/choose +package jsii + +import ( + _ "embed" + + _jsii_ "github.com/aws/jsii-runtime-go/runtime" + + constructs "github.com/aws/constructs-go/constructs/v10/jsii" + cdk8s "github.com/cdk8s-team/cdk8s-core-go/cdk8s/v2/jsii" +) + +//go:embed chaos-meshorg-0.0.0.tgz +var tarball []byte + +// Initialize loads the necessary packages in the @jsii/kernel to support the enclosing module. +// The implementation is idempotent (and hence safe to be called over and over). +func Initialize() { + // Ensure all dependencies are initialized + cdk8s.Initialize() + constructs.Initialize() + + // Load this library into the kernel + _jsii_.Load("chaos-meshorg", "0.0.0", tarball) +} diff --git a/env/imports/k8s/httpchaos/chaosmeshorg/version b/env/imports/k8s/httpchaos/chaosmeshorg/version new file mode 100644 index 000000000..77d6f4ca2 --- /dev/null +++ b/env/imports/k8s/httpchaos/chaosmeshorg/version @@ -0,0 +1 @@ +0.0.0 diff --git a/env/imports/k8s/internal/types.go b/env/imports/k8s/internal/types.go new file mode 100644 index 000000000..de3a04f73 --- /dev/null +++ b/env/imports/k8s/internal/types.go @@ -0,0 +1,5 @@ +package internal +import ( + "github.com/cdk8s-team/cdk8s-core-go/cdk8s/v2" +) +type Type__cdk8sApiObject = cdk8s.ApiObject diff --git a/env/imports/k8s/iochaos/chaosmeshorg/chaosmeshorg.go b/env/imports/k8s/iochaos/chaosmeshorg/chaosmeshorg.go new file mode 100644 index 000000000..8d3fdf136 --- /dev/null +++ b/env/imports/k8s/iochaos/chaosmeshorg/chaosmeshorg.go @@ -0,0 +1,482 @@ +// chaos-meshorg +package chaosmeshorg + +import ( + _jsii_ "github.com/aws/jsii-runtime-go/runtime" + _init_ "github.com/smartcontractkit/chainlink-testing-framework/env/imports/k8s/iochaos/chaosmeshorg/jsii" + + "github.com/aws/constructs-go/constructs/v10" + "github.com/cdk8s-team/cdk8s-core-go/cdk8s/v2" + "github.com/smartcontractkit/chainlink-testing-framework/env/imports/k8s/iochaos/chaosmeshorg/internal" +) + +// IOChaos is the Schema for the iochaos API. +type IoChaos interface { + cdk8s.ApiObject + // The group portion of the API version (e.g. `authorization.k8s.io`). + ApiGroup() *string + // The object's API version (e.g. `authorization.k8s.io/v1`). + ApiVersion() *string + // The chart in which this object is defined. + Chart() cdk8s.Chart + // The object kind. + Kind() *string + // Metadata associated with this API object. + Metadata() cdk8s.ApiObjectMetadataDefinition + // The name of the API object. + // + // If a name is specified in `metadata.name` this will be the name returned. + // Otherwise, a name will be generated by calling + // `Chart.of(this).generatedObjectName(this)`, which by default uses the + // construct path to generate a DNS-compatible name for the resource. + Name() *string + // The tree node. + Node() constructs.Node + // Create a dependency between this ApiObject and other constructs. + // + // These can be other ApiObjects, Charts, or custom. + AddDependency(dependencies ...constructs.IConstruct) + // Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. + // + // Example: + // kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true)); + // + AddJsonPatch(ops ...cdk8s.JsonPatch) + // Renders the object to Kubernetes JSON. + ToJson() interface{} + // Returns a string representation of this construct. + ToString() *string +} + +// The jsii proxy struct for IoChaos +type jsiiProxy_IoChaos struct { + internal.Type__cdk8sApiObject +} + +func (j *jsiiProxy_IoChaos) ApiGroup() *string { + var returns *string + _jsii_.Get( + j, + "apiGroup", + &returns, + ) + return returns +} + +func (j *jsiiProxy_IoChaos) ApiVersion() *string { + var returns *string + _jsii_.Get( + j, + "apiVersion", + &returns, + ) + return returns +} + +func (j *jsiiProxy_IoChaos) Chart() cdk8s.Chart { + var returns cdk8s.Chart + _jsii_.Get( + j, + "chart", + &returns, + ) + return returns +} + +func (j *jsiiProxy_IoChaos) Kind() *string { + var returns *string + _jsii_.Get( + j, + "kind", + &returns, + ) + return returns +} + +func (j *jsiiProxy_IoChaos) Metadata() cdk8s.ApiObjectMetadataDefinition { + var returns cdk8s.ApiObjectMetadataDefinition + _jsii_.Get( + j, + "metadata", + &returns, + ) + return returns +} + +func (j *jsiiProxy_IoChaos) Name() *string { + var returns *string + _jsii_.Get( + j, + "name", + &returns, + ) + return returns +} + +func (j *jsiiProxy_IoChaos) Node() constructs.Node { + var returns constructs.Node + _jsii_.Get( + j, + "node", + &returns, + ) + return returns +} + +// Defines a "IOChaos" API object. +func NewIoChaos(scope constructs.Construct, id *string, props *IoChaosProps) IoChaos { + _init_.Initialize() + + j := jsiiProxy_IoChaos{} + + _jsii_.Create( + "chaos-meshorg.IoChaos", + []interface{}{scope, id, props}, + &j, + ) + + return &j +} + +// Defines a "IOChaos" API object. +func NewIoChaos_Override(i IoChaos, scope constructs.Construct, id *string, props *IoChaosProps) { + _init_.Initialize() + + _jsii_.Create( + "chaos-meshorg.IoChaos", + []interface{}{scope, id, props}, + i, + ) +} + +// Checks if `x` is a construct. +// +// Use this method instead of `instanceof` to properly detect `Construct` +// instances, even when the construct library is symlinked. +// +// Explanation: in JavaScript, multiple copies of the `constructs` library on +// disk are seen as independent, completely different libraries. As a +// consequence, the class `Construct` in each copy of the `constructs` library +// is seen as a different class, and an instance of one class will not test as +// `instanceof` the other class. `npm install` will not create installations +// like this, but users may manually symlink construct libraries together or +// use a monorepo tool: in those cases, multiple copies of the `constructs` +// library can be accidentally installed, and `instanceof` will behave +// unpredictably. It is safest to avoid using `instanceof`, and using +// this type-testing method instead. +// +// Returns: true if `x` is an object created from a class which extends `Construct`. +func IoChaos_IsConstruct(x interface{}) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "chaos-meshorg.IoChaos", + "isConstruct", + []interface{}{x}, + &returns, + ) + + return returns +} + +// Renders a Kubernetes manifest for "IOChaos". +// +// This can be used to inline resource manifests inside other objects (e.g. as templates). +func IoChaos_Manifest(props *IoChaosProps) interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "chaos-meshorg.IoChaos", + "manifest", + []interface{}{props}, + &returns, + ) + + return returns +} + +// Returns the `ApiObject` named `Resource` which is a child of the given construct. +// +// If `c` is an `ApiObject`, it is returned directly. Throws an +// exception if the construct does not have a child named `Default` _or_ if +// this child is not an `ApiObject`. +func IoChaos_Of(c constructs.IConstruct) cdk8s.ApiObject { + _init_.Initialize() + + var returns cdk8s.ApiObject + + _jsii_.StaticInvoke( + "chaos-meshorg.IoChaos", + "of", + []interface{}{c}, + &returns, + ) + + return returns +} + +func IoChaos_GVK() *cdk8s.GroupVersionKind { + _init_.Initialize() + var returns *cdk8s.GroupVersionKind + _jsii_.StaticGet( + "chaos-meshorg.IoChaos", + "GVK", + &returns, + ) + return returns +} + +func (i *jsiiProxy_IoChaos) AddDependency(dependencies ...constructs.IConstruct) { + args := []interface{}{} + for _, a := range dependencies { + args = append(args, a) + } + + _jsii_.InvokeVoid( + i, + "addDependency", + args, + ) +} + +func (i *jsiiProxy_IoChaos) AddJsonPatch(ops ...cdk8s.JsonPatch) { + args := []interface{}{} + for _, a := range ops { + args = append(args, a) + } + + _jsii_.InvokeVoid( + i, + "addJsonPatch", + args, + ) +} + +func (i *jsiiProxy_IoChaos) ToJson() interface{} { + var returns interface{} + + _jsii_.Invoke( + i, + "toJson", + nil, // no parameters + &returns, + ) + + return returns +} + +func (i *jsiiProxy_IoChaos) ToString() *string { + var returns *string + + _jsii_.Invoke( + i, + "toString", + nil, // no parameters + &returns, + ) + + return returns +} + +// IOChaos is the Schema for the iochaos API. +type IoChaosProps struct { + Metadata *cdk8s.ApiObjectMetadata `field:"optional" json:"metadata" yaml:"metadata"` + // IOChaosSpec defines the desired state of IOChaos. + Spec *IoChaosSpec `field:"optional" json:"spec" yaml:"spec"` +} + +// IOChaosSpec defines the desired state of IOChaos. +type IoChaosSpec struct { + // Action defines the specific pod chaos action. + // + // Supported action: latency / fault / attrOverride / mistake. + Action IoChaosSpecAction `field:"required" json:"action" yaml:"action"` + // Mode defines the mode to run chaos action. + // + // Supported mode: one / all / fixed / fixed-percent / random-max-percent. + Mode IoChaosSpecMode `field:"required" json:"mode" yaml:"mode"` + // Selector is used to select pods that are used to inject chaos action. + Selector *IoChaosSpecSelector `field:"required" json:"selector" yaml:"selector"` + // VolumePath represents the mount path of injected volume. + VolumePath *string `field:"required" json:"volumePath" yaml:"volumePath"` + // Attr defines the overrided attribution. + Attr *IoChaosSpecAttr `field:"optional" json:"attr" yaml:"attr"` + // ContainerNames indicates list of the name of affected container. + // + // If not set, all containers will be injected. + ContainerNames *[]*string `field:"optional" json:"containerNames" yaml:"containerNames"` + // Delay defines the value of I/O chaos action delay. + // + // A delay string is a possibly signed sequence of decimal numbers, each with optional fraction and a unit suffix, such as "300ms". Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h". + Delay *string `field:"optional" json:"delay" yaml:"delay"` + // Duration represents the duration of the chaos action. + // + // It is required when the action is `PodFailureAction`. A duration string is a possibly signed sequence of decimal numbers, each with optional fraction and a unit suffix, such as "300ms", "-1.5h" or "2h45m". Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h". + Duration *string `field:"optional" json:"duration" yaml:"duration"` + // Errno defines the error code that returned by I/O action. + // + // refer to: https://www-numi.fnal.gov/offline_software/srt_public_context/WebDocs/Errors/unix_system_errors.html + Errno *float64 `field:"optional" json:"errno" yaml:"errno"` + // Methods defines the I/O methods for injecting I/O chaos action. + // + // default: all I/O methods. + Methods *[]*string `field:"optional" json:"methods" yaml:"methods"` + // Mistake defines what types of incorrectness are injected to IO operations. + Mistake *IoChaosSpecMistake `field:"optional" json:"mistake" yaml:"mistake"` + // Path defines the path of files for injecting I/O chaos action. + Path *string `field:"optional" json:"path" yaml:"path"` + // Percent defines the percentage of injection errors and provides a number from 0-100. + // + // default: 100. + Percent *float64 `field:"optional" json:"percent" yaml:"percent"` + // Value is required when the mode is set to `FixedPodMode` / `FixedPercentPodMod` / `RandomMaxPercentPodMod`. + // + // If `FixedPodMode`, provide an integer of pods to do chaos action. If `FixedPercentPodMod`, provide a number from 0-100 to specify the percent of pods the server can do chaos action. IF `RandomMaxPercentPodMod`, provide a number from 0-100 to specify the max percent of pods to do chaos action + Value *string `field:"optional" json:"value" yaml:"value"` +} + +// Action defines the specific pod chaos action. +// +// Supported action: latency / fault / attrOverride / mistake. +type IoChaosSpecAction string + +const ( + // latency. + IoChaosSpecAction_LATENCY IoChaosSpecAction = "LATENCY" + // fault. + IoChaosSpecAction_FAULT IoChaosSpecAction = "FAULT" + // attrOverride. + IoChaosSpecAction_ATTR_OVERRIDE IoChaosSpecAction = "ATTR_OVERRIDE" + // mistake. + IoChaosSpecAction_MISTAKE IoChaosSpecAction = "MISTAKE" +) + +// Attr defines the overrided attribution. +type IoChaosSpecAttr struct { + // Timespec represents a time. + Atime *IoChaosSpecAttrAtime `field:"optional" json:"atime" yaml:"atime"` + Blocks *float64 `field:"optional" json:"blocks" yaml:"blocks"` + // Timespec represents a time. + Ctime *IoChaosSpecAttrCtime `field:"optional" json:"ctime" yaml:"ctime"` + Gid *float64 `field:"optional" json:"gid" yaml:"gid"` + Ino *float64 `field:"optional" json:"ino" yaml:"ino"` + // FileType represents type of a file. + Kind *string `field:"optional" json:"kind" yaml:"kind"` + // Timespec represents a time. + Mtime *IoChaosSpecAttrMtime `field:"optional" json:"mtime" yaml:"mtime"` + Nlink *float64 `field:"optional" json:"nlink" yaml:"nlink"` + Perm *float64 `field:"optional" json:"perm" yaml:"perm"` + Rdev *float64 `field:"optional" json:"rdev" yaml:"rdev"` + Size *float64 `field:"optional" json:"size" yaml:"size"` + Uid *float64 `field:"optional" json:"uid" yaml:"uid"` +} + +// Timespec represents a time. +type IoChaosSpecAttrAtime struct { + Nsec *float64 `field:"required" json:"nsec" yaml:"nsec"` + Sec *float64 `field:"required" json:"sec" yaml:"sec"` +} + +// Timespec represents a time. +type IoChaosSpecAttrCtime struct { + Nsec *float64 `field:"required" json:"nsec" yaml:"nsec"` + Sec *float64 `field:"required" json:"sec" yaml:"sec"` +} + +// Timespec represents a time. +type IoChaosSpecAttrMtime struct { + Nsec *float64 `field:"required" json:"nsec" yaml:"nsec"` + Sec *float64 `field:"required" json:"sec" yaml:"sec"` +} + +// Mistake defines what types of incorrectness are injected to IO operations. +type IoChaosSpecMistake struct { + // Filling determines what is filled in the miskate data. + Filling IoChaosSpecMistakeFilling `field:"optional" json:"filling" yaml:"filling"` + // Max length of each wrong data segment in bytes. + MaxLength *float64 `field:"optional" json:"maxLength" yaml:"maxLength"` + // There will be [1, MaxOccurrences] segments of wrong data. + MaxOccurrences *float64 `field:"optional" json:"maxOccurrences" yaml:"maxOccurrences"` +} + +// Filling determines what is filled in the miskate data. +type IoChaosSpecMistakeFilling string + +const ( + // zero. + IoChaosSpecMistakeFilling_ZERO IoChaosSpecMistakeFilling = "ZERO" + // random. + IoChaosSpecMistakeFilling_RANDOM IoChaosSpecMistakeFilling = "RANDOM" +) + +// Mode defines the mode to run chaos action. +// +// Supported mode: one / all / fixed / fixed-percent / random-max-percent. +type IoChaosSpecMode string + +const ( + // one. + IoChaosSpecMode_ONE IoChaosSpecMode = "ONE" + // all. + IoChaosSpecMode_ALL IoChaosSpecMode = "ALL" + // fixed. + IoChaosSpecMode_FIXED IoChaosSpecMode = "FIXED" + // fixed-percent. + IoChaosSpecMode_FIXED_PERCENT IoChaosSpecMode = "FIXED_PERCENT" + // random-max-percent. + IoChaosSpecMode_RANDOM_MAX_PERCENT IoChaosSpecMode = "RANDOM_MAX_PERCENT" +) + +// Selector is used to select pods that are used to inject chaos action. +type IoChaosSpecSelector struct { + // Map of string keys and values that can be used to select objects. + // + // A selector based on annotations. + AnnotationSelectors *map[string]*string `field:"optional" json:"annotationSelectors" yaml:"annotationSelectors"` + // a slice of label selector expressions that can be used to select objects. + // + // A list of selectors based on set-based label expressions. + ExpressionSelectors *[]*IoChaosSpecSelectorExpressionSelectors `field:"optional" json:"expressionSelectors" yaml:"expressionSelectors"` + // Map of string keys and values that can be used to select objects. + // + // A selector based on fields. + FieldSelectors *map[string]*string `field:"optional" json:"fieldSelectors" yaml:"fieldSelectors"` + // Map of string keys and values that can be used to select objects. + // + // A selector based on labels. + LabelSelectors *map[string]*string `field:"optional" json:"labelSelectors" yaml:"labelSelectors"` + // Namespaces is a set of namespace to which objects belong. + Namespaces *[]*string `field:"optional" json:"namespaces" yaml:"namespaces"` + // Nodes is a set of node name and objects must belong to these nodes. + Nodes *[]*string `field:"optional" json:"nodes" yaml:"nodes"` + // Map of string keys and values that can be used to select nodes. + // + // Selector which must match a node's labels, and objects must belong to these selected nodes. + NodeSelectors *map[string]*string `field:"optional" json:"nodeSelectors" yaml:"nodeSelectors"` + // PodPhaseSelectors is a set of condition of a pod at the current time. + // + // supported value: Pending / Running / Succeeded / Failed / Unknown. + PodPhaseSelectors *[]*string `field:"optional" json:"podPhaseSelectors" yaml:"podPhaseSelectors"` + // Pods is a map of string keys and a set values that used to select pods. + // + // The key defines the namespace which pods belong, and the each values is a set of pod names. + Pods *map[string]*[]*string `field:"optional" json:"pods" yaml:"pods"` +} + +// A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. +type IoChaosSpecSelectorExpressionSelectors struct { + // key is the label key that the selector applies to. + Key *string `field:"required" json:"key" yaml:"key"` + // operator represents a key's relationship to a set of values. + // + // Valid operators are In, NotIn, Exists and DoesNotExist. + Operator *string `field:"required" json:"operator" yaml:"operator"` + // 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. + Values *[]*string `field:"optional" json:"values" yaml:"values"` +} diff --git a/env/imports/k8s/iochaos/chaosmeshorg/chaosmeshorg.init.go b/env/imports/k8s/iochaos/chaosmeshorg/chaosmeshorg.init.go new file mode 100644 index 000000000..88351c962 --- /dev/null +++ b/env/imports/k8s/iochaos/chaosmeshorg/chaosmeshorg.init.go @@ -0,0 +1,97 @@ +package chaosmeshorg + +import ( + "reflect" + + _jsii_ "github.com/aws/jsii-runtime-go/runtime" +) + +func init() { + _jsii_.RegisterClass( + "chaos-meshorg.IoChaos", + reflect.TypeOf((*IoChaos)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "addDependency", GoMethod: "AddDependency"}, + _jsii_.MemberMethod{JsiiMethod: "addJsonPatch", GoMethod: "AddJsonPatch"}, + _jsii_.MemberProperty{JsiiProperty: "apiGroup", GoGetter: "ApiGroup"}, + _jsii_.MemberProperty{JsiiProperty: "apiVersion", GoGetter: "ApiVersion"}, + _jsii_.MemberProperty{JsiiProperty: "chart", GoGetter: "Chart"}, + _jsii_.MemberProperty{JsiiProperty: "kind", GoGetter: "Kind"}, + _jsii_.MemberProperty{JsiiProperty: "metadata", GoGetter: "Metadata"}, + _jsii_.MemberProperty{JsiiProperty: "name", GoGetter: "Name"}, + _jsii_.MemberProperty{JsiiProperty: "node", GoGetter: "Node"}, + _jsii_.MemberMethod{JsiiMethod: "toJson", GoMethod: "ToJson"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + }, + func() interface{} { + j := jsiiProxy_IoChaos{} + _jsii_.InitJsiiProxy(&j.Type__cdk8sApiObject) + return &j + }, + ) + _jsii_.RegisterStruct( + "chaos-meshorg.IoChaosProps", + reflect.TypeOf((*IoChaosProps)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "chaos-meshorg.IoChaosSpec", + reflect.TypeOf((*IoChaosSpec)(nil)).Elem(), + ) + _jsii_.RegisterEnum( + "chaos-meshorg.IoChaosSpecAction", + reflect.TypeOf((*IoChaosSpecAction)(nil)).Elem(), + map[string]interface{}{ + "LATENCY": IoChaosSpecAction_LATENCY, + "FAULT": IoChaosSpecAction_FAULT, + "ATTR_OVERRIDE": IoChaosSpecAction_ATTR_OVERRIDE, + "MISTAKE": IoChaosSpecAction_MISTAKE, + }, + ) + _jsii_.RegisterStruct( + "chaos-meshorg.IoChaosSpecAttr", + reflect.TypeOf((*IoChaosSpecAttr)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "chaos-meshorg.IoChaosSpecAttrAtime", + reflect.TypeOf((*IoChaosSpecAttrAtime)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "chaos-meshorg.IoChaosSpecAttrCtime", + reflect.TypeOf((*IoChaosSpecAttrCtime)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "chaos-meshorg.IoChaosSpecAttrMtime", + reflect.TypeOf((*IoChaosSpecAttrMtime)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "chaos-meshorg.IoChaosSpecMistake", + reflect.TypeOf((*IoChaosSpecMistake)(nil)).Elem(), + ) + _jsii_.RegisterEnum( + "chaos-meshorg.IoChaosSpecMistakeFilling", + reflect.TypeOf((*IoChaosSpecMistakeFilling)(nil)).Elem(), + map[string]interface{}{ + "ZERO": IoChaosSpecMistakeFilling_ZERO, + "RANDOM": IoChaosSpecMistakeFilling_RANDOM, + }, + ) + _jsii_.RegisterEnum( + "chaos-meshorg.IoChaosSpecMode", + reflect.TypeOf((*IoChaosSpecMode)(nil)).Elem(), + map[string]interface{}{ + "ONE": IoChaosSpecMode_ONE, + "ALL": IoChaosSpecMode_ALL, + "FIXED": IoChaosSpecMode_FIXED, + "FIXED_PERCENT": IoChaosSpecMode_FIXED_PERCENT, + "RANDOM_MAX_PERCENT": IoChaosSpecMode_RANDOM_MAX_PERCENT, + }, + ) + _jsii_.RegisterStruct( + "chaos-meshorg.IoChaosSpecSelector", + reflect.TypeOf((*IoChaosSpecSelector)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "chaos-meshorg.IoChaosSpecSelectorExpressionSelectors", + reflect.TypeOf((*IoChaosSpecSelectorExpressionSelectors)(nil)).Elem(), + ) +} diff --git a/env/imports/k8s/iochaos/chaosmeshorg/internal/types.go b/env/imports/k8s/iochaos/chaosmeshorg/internal/types.go new file mode 100644 index 000000000..de3a04f73 --- /dev/null +++ b/env/imports/k8s/iochaos/chaosmeshorg/internal/types.go @@ -0,0 +1,5 @@ +package internal +import ( + "github.com/cdk8s-team/cdk8s-core-go/cdk8s/v2" +) +type Type__cdk8sApiObject = cdk8s.ApiObject diff --git a/env/imports/k8s/iochaos/chaosmeshorg/jsii/chaos-meshorg-0.0.0.tgz b/env/imports/k8s/iochaos/chaosmeshorg/jsii/chaos-meshorg-0.0.0.tgz new file mode 100644 index 000000000..ba6340c62 Binary files /dev/null and b/env/imports/k8s/iochaos/chaosmeshorg/jsii/chaos-meshorg-0.0.0.tgz differ diff --git a/env/imports/k8s/iochaos/chaosmeshorg/jsii/jsii.go b/env/imports/k8s/iochaos/chaosmeshorg/jsii/jsii.go new file mode 100644 index 000000000..319ef3f24 --- /dev/null +++ b/env/imports/k8s/iochaos/chaosmeshorg/jsii/jsii.go @@ -0,0 +1,28 @@ +// Package jsii contains the functionaility needed for jsii packages to +// initialize their dependencies and themselves. Users should never need to use this package +// directly. If you find you need to - please report a bug at +// https://github.com/aws/jsii/issues/new/choose +package jsii + +import ( + _ "embed" + + _jsii_ "github.com/aws/jsii-runtime-go/runtime" + + constructs "github.com/aws/constructs-go/constructs/v10/jsii" + cdk8s "github.com/cdk8s-team/cdk8s-core-go/cdk8s/v2/jsii" +) + +//go:embed chaos-meshorg-0.0.0.tgz +var tarball []byte + +// Initialize loads the necessary packages in the @jsii/kernel to support the enclosing module. +// The implementation is idempotent (and hence safe to be called over and over). +func Initialize() { + // Ensure all dependencies are initialized + cdk8s.Initialize() + constructs.Initialize() + + // Load this library into the kernel + _jsii_.Load("chaos-meshorg", "0.0.0", tarball) +} diff --git a/env/imports/k8s/iochaos/chaosmeshorg/version b/env/imports/k8s/iochaos/chaosmeshorg/version new file mode 100644 index 000000000..77d6f4ca2 --- /dev/null +++ b/env/imports/k8s/iochaos/chaosmeshorg/version @@ -0,0 +1 @@ +0.0.0 diff --git a/env/imports/k8s/jsii/jsii.go b/env/imports/k8s/jsii/jsii.go new file mode 100644 index 000000000..7d3b07906 --- /dev/null +++ b/env/imports/k8s/jsii/jsii.go @@ -0,0 +1,28 @@ +// Package jsii contains the functionaility needed for jsii packages to +// initialize their dependencies and themselves. Users should never need to use this package +// directly. If you find you need to - please report a bug at +// https://github.com/aws/jsii/issues/new/choose +package jsii + +import ( + _ "embed" + + _jsii_ "github.com/aws/jsii-runtime-go/runtime" + + constructs "github.com/aws/constructs-go/constructs/v10/jsii" + cdk8s "github.com/cdk8s-team/cdk8s-core-go/cdk8s/v2/jsii" +) + +//go:embed k8s-0.0.0.tgz +var tarball []byte + +// Initialize loads the necessary packages in the @jsii/kernel to support the enclosing module. +// The implementation is idempotent (and hence safe to be called over and over). +func Initialize() { + // Ensure all dependencies are initialized + cdk8s.Initialize() + constructs.Initialize() + + // Load this library into the kernel + _jsii_.Load("k8s", "0.0.0", tarball) +} diff --git a/env/imports/k8s/jsii/k8s-0.0.0.tgz b/env/imports/k8s/jsii/k8s-0.0.0.tgz new file mode 100644 index 000000000..b5cb2605a Binary files /dev/null and b/env/imports/k8s/jsii/k8s-0.0.0.tgz differ diff --git a/env/imports/k8s/k8s.go b/env/imports/k8s/k8s.go new file mode 100644 index 000000000..030bbe2a3 --- /dev/null +++ b/env/imports/k8s/k8s.go @@ -0,0 +1,45508 @@ +// k8s +package k8s + +import ( + "time" + + _jsii_ "github.com/aws/jsii-runtime-go/runtime" + _init_ "github.com/smartcontractkit/chainlink-testing-framework/env/imports/k8s/jsii" + + "github.com/aws/constructs-go/constructs/v10" + "github.com/cdk8s-team/cdk8s-core-go/cdk8s/v2" + "github.com/smartcontractkit/chainlink-testing-framework/env/imports/k8s/internal" +) + +// Affinity is a group of affinity scheduling rules. +type Affinity struct { + // Describes node affinity scheduling rules for the pod. + NodeAffinity *NodeAffinity `field:"optional" json:"nodeAffinity" yaml:"nodeAffinity"` + // Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). + PodAffinity *PodAffinity `field:"optional" json:"podAffinity" yaml:"podAffinity"` + // Describes pod anti-affinity scheduling rules (e.g. avoid putting this pod in the same node, zone, etc. as some other pod(s)). + PodAntiAffinity *PodAntiAffinity `field:"optional" json:"podAntiAffinity" yaml:"podAntiAffinity"` +} + +// AggregationRule describes how to locate ClusterRoles to aggregate into the ClusterRole. +type AggregationRule struct { + // ClusterRoleSelectors holds a list of selectors which will be used to find ClusterRoles and create the rules. + // + // If any of the selectors match, then the ClusterRole's permissions will be added. + ClusterRoleSelectors *[]*LabelSelector `field:"optional" json:"clusterRoleSelectors" yaml:"clusterRoleSelectors"` +} + +// AggregationRule describes how to locate ClusterRoles to aggregate into the ClusterRole. +type AggregationRuleV1Alpha1 struct { + // ClusterRoleSelectors holds a list of selectors which will be used to find ClusterRoles and create the rules. + // + // If any of the selectors match, then the ClusterRole's permissions will be added. + ClusterRoleSelectors *[]*LabelSelector `field:"optional" json:"clusterRoleSelectors" yaml:"clusterRoleSelectors"` +} + +// AllowedCSIDriver represents a single inline CSI Driver that is allowed to be used. +type AllowedCsiDriverV1Beta1 struct { + // Name is the registered name of the CSI driver. + Name *string `field:"required" json:"name" yaml:"name"` +} + +// AllowedFlexVolume represents a single Flexvolume that is allowed to be used. +type AllowedFlexVolumeV1Beta1 struct { + // driver is the name of the Flexvolume driver. + Driver *string `field:"required" json:"driver" yaml:"driver"` +} + +// AllowedHostPath defines the host volume conditions that will be enabled by a policy for pods to use. +// +// It requires the path prefix to be defined. +type AllowedHostPathV1Beta1 struct { + // pathPrefix is the path prefix that the host volume must match. + // + // It does not support `*`. Trailing slashes are trimmed when validating the path prefix with a host path. + // + // Examples: `/foo` would allow `/foo`, `/foo/` and `/foo/bar` `/foo` would not allow `/food` or `/etc/foo`. + PathPrefix *string `field:"optional" json:"pathPrefix" yaml:"pathPrefix"` + // when set to true, will allow host volumes matching the pathPrefix only if all volume mounts are readOnly. + ReadOnly *bool `field:"optional" json:"readOnly" yaml:"readOnly"` +} + +// APIServiceSpec contains information for locating and communicating with a server. +// +// Only https is supported, though you are able to disable certificate verification. +type ApiServiceSpec struct { + // GroupPriorityMininum is the priority this group should have at least. + // + // Higher priority means that the group is preferred by clients over lower priority ones. Note that other versions of this group might specify even higher GroupPriorityMininum values such that the whole group gets a higher priority. The primary sort is based on GroupPriorityMinimum, ordered highest number to lowest (20 before 10). The secondary sort is based on the alphabetical comparison of the name of the object. (v1.bar before v1.foo) We'd recommend something like: *.k8s.io (except extensions) at 18000 and PaaSes (OpenShift, Deis) are recommended to be in the 2000s + GroupPriorityMinimum *float64 `field:"required" json:"groupPriorityMinimum" yaml:"groupPriorityMinimum"` + // VersionPriority controls the ordering of this API version inside of its group. + // + // Must be greater than zero. The primary sort is based on VersionPriority, ordered highest to lowest (20 before 10). Since it's inside of a group, the number can be small, probably in the 10s. In case of equal version priorities, the version string will be used to compute the order inside a group. If the version string is "kube-like", it will sort above non "kube-like" version strings, which are ordered lexicographically. "Kube-like" versions start with a "v", then are followed by a number (the major version), then optionally the string "alpha" or "beta" and another number (the minor version). These are sorted first by GA > beta > alpha (where GA is a version with no suffix such as beta or alpha), and then by comparing major version, then minor version. An example sorted list of versions: v10, v2, v1, v11beta2, v10beta3, v3beta1, v12alpha1, v11alpha2, foo1, foo10. + VersionPriority *float64 `field:"required" json:"versionPriority" yaml:"versionPriority"` + // CABundle is a PEM encoded CA bundle which will be used to validate an API server's serving certificate. + // + // If unspecified, system trust roots on the apiserver are used. + CaBundle *string `field:"optional" json:"caBundle" yaml:"caBundle"` + // Group is the API group name this server hosts. + Group *string `field:"optional" json:"group" yaml:"group"` + // InsecureSkipTLSVerify disables TLS certificate verification when communicating with this server. + // + // This is strongly discouraged. You should use the CABundle instead. + InsecureSkipTlsVerify *bool `field:"optional" json:"insecureSkipTlsVerify" yaml:"insecureSkipTlsVerify"` + // Service is a reference to the service for this API server. + // + // It must communicate on port 443. If the Service is nil, that means the handling for the API groupversion is handled locally on this server. The call will simply delegate to the normal handler chain to be fulfilled. + Service *ServiceReference `field:"optional" json:"service" yaml:"service"` + // Version is the API version this server hosts. + // + // For example, "v1". + Version *string `field:"optional" json:"version" yaml:"version"` +} + +// Represents a Persistent Disk resource in AWS. +// +// An AWS EBS disk must exist before mounting to a container. The disk must also be in the same AWS zone as the kubelet. An AWS EBS disk can only be mounted as read/write once. AWS EBS volumes support ownership management and SELinux relabeling. +type AwsElasticBlockStoreVolumeSource struct { + // Unique ID of the persistent disk resource in AWS (Amazon EBS volume). + // + // More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore + VolumeId *string `field:"required" json:"volumeId" yaml:"volumeId"` + // Filesystem type of the volume that you want to mount. + // + // Tip: Ensure that the filesystem type is supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore + FsType *string `field:"optional" json:"fsType" yaml:"fsType"` + // The partition in the volume that you want to mount. + // + // If omitted, the default is to mount by volume name. Examples: For volume /dev/sda1, you specify the partition as "1". Similarly, the volume partition for /dev/sda is "0" (or you can leave the property empty). + Partition *float64 `field:"optional" json:"partition" yaml:"partition"` + // Specify "true" to force and set the ReadOnly property in VolumeMounts to "true". + // + // If omitted, the default is "false". More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore + ReadOnly *bool `field:"optional" json:"readOnly" yaml:"readOnly"` +} + +// AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod. +type AzureDiskVolumeSource struct { + // The Name of the data disk in the blob storage. + DiskName *string `field:"required" json:"diskName" yaml:"diskName"` + // The URI the data disk in the blob storage. + DiskUri *string `field:"required" json:"diskUri" yaml:"diskUri"` + // Host Caching mode: None, Read Only, Read Write. + CachingMode *string `field:"optional" json:"cachingMode" yaml:"cachingMode"` + // Filesystem type to mount. + // + // Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + FsType *string `field:"optional" json:"fsType" yaml:"fsType"` + // Expected values Shared: multiple blob disks per storage account Dedicated: single blob disk per storage account Managed: azure managed data disk (only in managed availability set). + // + // defaults to shared. + Kind *string `field:"optional" json:"kind" yaml:"kind"` + // Defaults to false (read/write). + // + // ReadOnly here will force the ReadOnly setting in VolumeMounts. + ReadOnly *bool `field:"optional" json:"readOnly" yaml:"readOnly"` +} + +// AzureFile represents an Azure File Service mount on the host and bind mount to the pod. +type AzureFilePersistentVolumeSource struct { + // the name of secret that contains Azure Storage Account Name and Key. + SecretName *string `field:"required" json:"secretName" yaml:"secretName"` + // Share Name. + ShareName *string `field:"required" json:"shareName" yaml:"shareName"` + // Defaults to false (read/write). + // + // ReadOnly here will force the ReadOnly setting in VolumeMounts. + ReadOnly *bool `field:"optional" json:"readOnly" yaml:"readOnly"` + // the namespace of the secret that contains Azure Storage Account Name and Key default is the same as the Pod. + SecretNamespace *string `field:"optional" json:"secretNamespace" yaml:"secretNamespace"` +} + +// AzureFile represents an Azure File Service mount on the host and bind mount to the pod. +type AzureFileVolumeSource struct { + // the name of secret that contains Azure Storage Account Name and Key. + SecretName *string `field:"required" json:"secretName" yaml:"secretName"` + // Share Name. + ShareName *string `field:"required" json:"shareName" yaml:"shareName"` + // Defaults to false (read/write). + // + // ReadOnly here will force the ReadOnly setting in VolumeMounts. + ReadOnly *bool `field:"optional" json:"readOnly" yaml:"readOnly"` +} + +// BoundObjectReference is a reference to an object that a token is bound to. +type BoundObjectReference struct { + // API version of the referent. + ApiVersion *string `field:"optional" json:"apiVersion" yaml:"apiVersion"` + // Kind of the referent. + // + // Valid kinds are 'Pod' and 'Secret'. + Kind *string `field:"optional" json:"kind" yaml:"kind"` + // Name of the referent. + Name *string `field:"optional" json:"name" yaml:"name"` + // UID of the referent. + Uid *string `field:"optional" json:"uid" yaml:"uid"` +} + +// Adds and removes POSIX capabilities from running containers. +type Capabilities struct { + // Added capabilities. + Add *[]*string `field:"optional" json:"add" yaml:"add"` + // Removed capabilities. + Drop *[]*string `field:"optional" json:"drop" yaml:"drop"` +} + +// Represents a Ceph Filesystem mount that lasts the lifetime of a pod Cephfs volumes do not support ownership management or SELinux relabeling. +type CephFsPersistentVolumeSource struct { + // Required: Monitors is a collection of Ceph monitors More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it. + Monitors *[]*string `field:"required" json:"monitors" yaml:"monitors"` + // Optional: Used as the mounted root, rather than the full Ceph tree, default is /. + Path *string `field:"optional" json:"path" yaml:"path"` + // Optional: Defaults to false (read/write). + // + // ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it + ReadOnly *bool `field:"optional" json:"readOnly" yaml:"readOnly"` + // Optional: SecretFile is the path to key ring for User, default is /etc/ceph/user.secret More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it. + SecretFile *string `field:"optional" json:"secretFile" yaml:"secretFile"` + // Optional: SecretRef is reference to the authentication secret for User, default is empty. + // + // More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it + SecretRef *SecretReference `field:"optional" json:"secretRef" yaml:"secretRef"` + // Optional: User is the rados user name, default is admin More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it. + User *string `field:"optional" json:"user" yaml:"user"` +} + +// Represents a Ceph Filesystem mount that lasts the lifetime of a pod Cephfs volumes do not support ownership management or SELinux relabeling. +type CephFsVolumeSource struct { + // Required: Monitors is a collection of Ceph monitors More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it. + Monitors *[]*string `field:"required" json:"monitors" yaml:"monitors"` + // Optional: Used as the mounted root, rather than the full Ceph tree, default is /. + Path *string `field:"optional" json:"path" yaml:"path"` + // Optional: Defaults to false (read/write). + // + // ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it + ReadOnly *bool `field:"optional" json:"readOnly" yaml:"readOnly"` + // Optional: SecretFile is the path to key ring for User, default is /etc/ceph/user.secret More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it. + SecretFile *string `field:"optional" json:"secretFile" yaml:"secretFile"` + // Optional: SecretRef is reference to the authentication secret for User, default is empty. + // + // More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it + SecretRef *LocalObjectReference `field:"optional" json:"secretRef" yaml:"secretRef"` + // Optional: User is the rados user name, default is admin More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it. + User *string `field:"optional" json:"user" yaml:"user"` +} + +// CertificateSigningRequestSpec contains the certificate request. +type CertificateSigningRequestSpec struct { + // request contains an x509 certificate signing request encoded in a "CERTIFICATE REQUEST" PEM block. + // + // When serialized as JSON or YAML, the data is additionally base64-encoded. + Request *string `field:"required" json:"request" yaml:"request"` + // signerName indicates the requested signer, and is a qualified name. + // + // List/watch requests for CertificateSigningRequests can filter on this field using a "spec.signerName=NAME" fieldSelector. + // + // Well-known Kubernetes signers are: + // 1. "kubernetes.io/kube-apiserver-client": issues client certificates that can be used to authenticate to kube-apiserver. + // Requests for this signer are never auto-approved by kube-controller-manager, can be issued by the "csrsigning" controller in kube-controller-manager. + // 2. "kubernetes.io/kube-apiserver-client-kubelet": issues client certificates that kubelets use to authenticate to kube-apiserver. + // Requests for this signer can be auto-approved by the "csrapproving" controller in kube-controller-manager, and can be issued by the "csrsigning" controller in kube-controller-manager. + // 3. "kubernetes.io/kubelet-serving" issues serving certificates that kubelets use to serve TLS endpoints, which kube-apiserver can connect to securely. + // Requests for this signer are never auto-approved by kube-controller-manager, and can be issued by the "csrsigning" controller in kube-controller-manager. + // + // More details are available at https://k8s.io/docs/reference/access-authn-authz/certificate-signing-requests/#kubernetes-signers + // + // Custom signerNames can also be specified. The signer defines: + // 1. Trust distribution: how trust (CA bundles) are distributed. + // 2. Permitted subjects: and behavior when a disallowed subject is requested. + // 3. Required, permitted, or forbidden x509 extensions in the request (including whether subjectAltNames are allowed, which types, restrictions on allowed values) and behavior when a disallowed extension is requested. + // 4. Required, permitted, or forbidden key usages / extended key usages. + // 5. Expiration/certificate lifetime: whether it is fixed by the signer, configurable by the admin. + // 6. Whether or not requests for CA certificates are allowed. + SignerName *string `field:"required" json:"signerName" yaml:"signerName"` + // expirationSeconds is the requested duration of validity of the issued certificate. + // + // The certificate signer may issue a certificate with a different validity duration so a client must check the delta between the notBefore and and notAfter fields in the issued certificate to determine the actual duration. + // + // The v1.22+ in-tree implementations of the well-known Kubernetes signers will honor this field as long as the requested duration is not greater than the maximum duration they will honor per the --cluster-signing-duration CLI flag to the Kubernetes controller manager. + // + // Certificate signers may not honor this field for various reasons: + // + // 1. Old signer that is unaware of the field (such as the in-tree + // implementations prior to v1.22) + // 2. Signer whose configured maximum is shorter than the requested duration + // 3. Signer whose configured minimum is longer than the requested duration + // + // The minimum valid value for expirationSeconds is 600, i.e. 10 minutes. + // + // As of v1.22, this field is beta and is controlled via the CSRDuration feature gate. + ExpirationSeconds *float64 `field:"optional" json:"expirationSeconds" yaml:"expirationSeconds"` + // extra contains extra attributes of the user that created the CertificateSigningRequest. + // + // Populated by the API server on creation and immutable. + Extra *map[string]*[]*string `field:"optional" json:"extra" yaml:"extra"` + // groups contains group membership of the user that created the CertificateSigningRequest. + // + // Populated by the API server on creation and immutable. + Groups *[]*string `field:"optional" json:"groups" yaml:"groups"` + // uid contains the uid of the user that created the CertificateSigningRequest. + // + // Populated by the API server on creation and immutable. + Uid *string `field:"optional" json:"uid" yaml:"uid"` + // usages specifies a set of key usages requested in the issued certificate. + // + // Requests for TLS client certificates typically request: "digital signature", "key encipherment", "client auth". + // + // Requests for TLS serving certificates typically request: "key encipherment", "digital signature", "server auth". + // + // Valid values are: + // "signing", "digital signature", "content commitment", + // "key encipherment", "key agreement", "data encipherment", + // "cert sign", "crl sign", "encipher only", "decipher only", "any", + // "server auth", "client auth", + // "code signing", "email protection", "s/mime", + // "ipsec end system", "ipsec tunnel", "ipsec user", + // "timestamping", "ocsp signing", "microsoft sgc", "netscape sgc". + Usages *[]*string `field:"optional" json:"usages" yaml:"usages"` + // username contains the name of the user that created the CertificateSigningRequest. + // + // Populated by the API server on creation and immutable. + Username *string `field:"optional" json:"username" yaml:"username"` +} + +// Represents a cinder volume resource in Openstack. +// +// A Cinder volume must exist before mounting to a container. The volume must also be in the same region as the kubelet. Cinder volumes support ownership management and SELinux relabeling. +type CinderPersistentVolumeSource struct { + // volume id used to identify the volume in cinder. + // + // More info: https://examples.k8s.io/mysql-cinder-pd/README.md + VolumeId *string `field:"required" json:"volumeId" yaml:"volumeId"` + // Filesystem type to mount. + // + // Must be a filesystem type supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: https://examples.k8s.io/mysql-cinder-pd/README.md + FsType *string `field:"optional" json:"fsType" yaml:"fsType"` + // Optional: Defaults to false (read/write). + // + // ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://examples.k8s.io/mysql-cinder-pd/README.md + ReadOnly *bool `field:"optional" json:"readOnly" yaml:"readOnly"` + // Optional: points to a secret object containing parameters used to connect to OpenStack. + SecretRef *SecretReference `field:"optional" json:"secretRef" yaml:"secretRef"` +} + +// Represents a cinder volume resource in Openstack. +// +// A Cinder volume must exist before mounting to a container. The volume must also be in the same region as the kubelet. Cinder volumes support ownership management and SELinux relabeling. +type CinderVolumeSource struct { + // volume id used to identify the volume in cinder. + // + // More info: https://examples.k8s.io/mysql-cinder-pd/README.md + VolumeId *string `field:"required" json:"volumeId" yaml:"volumeId"` + // Filesystem type to mount. + // + // Must be a filesystem type supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: https://examples.k8s.io/mysql-cinder-pd/README.md + FsType *string `field:"optional" json:"fsType" yaml:"fsType"` + // Optional: Defaults to false (read/write). + // + // ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://examples.k8s.io/mysql-cinder-pd/README.md + ReadOnly *bool `field:"optional" json:"readOnly" yaml:"readOnly"` + // Optional: points to a secret object containing parameters used to connect to OpenStack. + SecretRef *LocalObjectReference `field:"optional" json:"secretRef" yaml:"secretRef"` +} + +// ClientIPConfig represents the configurations of Client IP based session affinity. +type ClientIpConfig struct { + // timeoutSeconds specifies the seconds of ClientIP type session sticky time. + // + // The value must be >0 && <=86400(for 1 day) if ServiceAffinity == "ClientIP". Default value is 10800(for 3 hours). + TimeoutSeconds *float64 `field:"optional" json:"timeoutSeconds" yaml:"timeoutSeconds"` +} + +// Information about the condition of a component. +type ComponentCondition struct { + // Status of the condition for a component. + // + // Valid values for "Healthy": "True", "False", or "Unknown". + Status *string `field:"required" json:"status" yaml:"status"` + // Type of condition for a component. + // + // Valid value: "Healthy". + Type *string `field:"required" json:"type" yaml:"type"` + // Condition error code for a component. + // + // For example, a health check error code. + Error *string `field:"optional" json:"error" yaml:"error"` + // Message about the condition for a component. + // + // For example, information about a health check. + Message *string `field:"optional" json:"message" yaml:"message"` +} + +// ConfigMapEnvSource selects a ConfigMap to populate the environment variables with. +// +// The contents of the target ConfigMap's Data field will represent the key-value pairs as environment variables. +type ConfigMapEnvSource struct { + // Name of the referent. + // + // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + Name *string `field:"optional" json:"name" yaml:"name"` + // Specify whether the ConfigMap must be defined. + Optional *bool `field:"optional" json:"optional" yaml:"optional"` +} + +// Selects a key from a ConfigMap. +type ConfigMapKeySelector struct { + // The key to select. + Key *string `field:"required" json:"key" yaml:"key"` + // Name of the referent. + // + // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + Name *string `field:"optional" json:"name" yaml:"name"` + // Specify whether the ConfigMap or its key must be defined. + Optional *bool `field:"optional" json:"optional" yaml:"optional"` +} + +// ConfigMapNodeConfigSource contains the information to reference a ConfigMap as a config source for the Node. +// +// This API is deprecated since 1.22: https://git.k8s.io/enhancements/keps/sig-node/281-dynamic-kubelet-configuration +type ConfigMapNodeConfigSource struct { + // KubeletConfigKey declares which key of the referenced ConfigMap corresponds to the KubeletConfiguration structure This field is required in all cases. + KubeletConfigKey *string `field:"required" json:"kubeletConfigKey" yaml:"kubeletConfigKey"` + // Name is the metadata.name of the referenced ConfigMap. This field is required in all cases. + Name *string `field:"required" json:"name" yaml:"name"` + // Namespace is the metadata.namespace of the referenced ConfigMap. This field is required in all cases. + Namespace *string `field:"required" json:"namespace" yaml:"namespace"` + // ResourceVersion is the metadata.ResourceVersion of the referenced ConfigMap. This field is forbidden in Node.Spec, and required in Node.Status. + ResourceVersion *string `field:"optional" json:"resourceVersion" yaml:"resourceVersion"` + // UID is the metadata.UID of the referenced ConfigMap. This field is forbidden in Node.Spec, and required in Node.Status. + Uid *string `field:"optional" json:"uid" yaml:"uid"` +} + +// Adapts a ConfigMap into a projected volume. +// +// The contents of the target ConfigMap's Data field will be presented in a projected volume as files using the keys in the Data field as the file names, unless the items element is populated with specific mappings of keys to paths. Note that this is identical to a configmap volume source without the default mode. +type ConfigMapProjection struct { + // If unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. + // + // If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'. + Items *[]*KeyToPath `field:"optional" json:"items" yaml:"items"` + // Name of the referent. + // + // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + Name *string `field:"optional" json:"name" yaml:"name"` + // Specify whether the ConfigMap or its keys must be defined. + Optional *bool `field:"optional" json:"optional" yaml:"optional"` +} + +// Adapts a ConfigMap into a volume. +// +// The contents of the target ConfigMap's Data field will be presented in a volume as files using the keys in the Data field as the file names, unless the items element is populated with specific mappings of keys to paths. ConfigMap volumes support ownership management and SELinux relabeling. +type ConfigMapVolumeSource struct { + // Optional: mode bits used to set permissions on created files by default. + // + // Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set. + DefaultMode *float64 `field:"optional" json:"defaultMode" yaml:"defaultMode"` + // If unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. + // + // If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'. + Items *[]*KeyToPath `field:"optional" json:"items" yaml:"items"` + // Name of the referent. + // + // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + Name *string `field:"optional" json:"name" yaml:"name"` + // Specify whether the ConfigMap or its keys must be defined. + Optional *bool `field:"optional" json:"optional" yaml:"optional"` +} + +// A single application container that you want to run within a pod. +type Container struct { + // Name of the container specified as a DNS_LABEL. + // + // Each container in a pod must have a unique name (DNS_LABEL). Cannot be updated. + Name *string `field:"required" json:"name" yaml:"name"` + // Arguments to the entrypoint. + // + // The docker image's CMD is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell + Args *[]*string `field:"optional" json:"args" yaml:"args"` + // Entrypoint array. + // + // Not executed within a shell. The docker image's ENTRYPOINT is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell + Command *[]*string `field:"optional" json:"command" yaml:"command"` + // List of environment variables to set in the container. + // + // Cannot be updated. + Env *[]*EnvVar `field:"optional" json:"env" yaml:"env"` + // List of sources to populate environment variables in the container. + // + // The keys defined within a source must be a C_IDENTIFIER. All invalid keys will be reported as an event when the container is starting. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated. + EnvFrom *[]*EnvFromSource `field:"optional" json:"envFrom" yaml:"envFrom"` + // Docker image name. + // + // More info: https://kubernetes.io/docs/concepts/containers/images This field is optional to allow higher level config management to default or override container images in workload controllers like Deployments and StatefulSets. + Image *string `field:"optional" json:"image" yaml:"image"` + // Image pull policy. + // + // One of Always, Never, IfNotPresent. Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/images#updating-images + ImagePullPolicy *string `field:"optional" json:"imagePullPolicy" yaml:"imagePullPolicy"` + // Actions that the management system should take in response to container lifecycle events. + // + // Cannot be updated. + Lifecycle *Lifecycle `field:"optional" json:"lifecycle" yaml:"lifecycle"` + // Periodic probe of container liveness. + // + // Container will be restarted if the probe fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + LivenessProbe *Probe `field:"optional" json:"livenessProbe" yaml:"livenessProbe"` + // List of ports to expose from the container. + // + // Exposing a port here gives the system additional information about the network connections a container uses, but is primarily informational. Not specifying a port here DOES NOT prevent that port from being exposed. Any port which is listening on the default "0.0.0.0" address inside a container will be accessible from the network. Cannot be updated. + Ports *[]*ContainerPort `field:"optional" json:"ports" yaml:"ports"` + // Periodic probe of container service readiness. + // + // Container will be removed from service endpoints if the probe fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + ReadinessProbe *Probe `field:"optional" json:"readinessProbe" yaml:"readinessProbe"` + // Compute Resources required by this container. + // + // Cannot be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + Resources *ResourceRequirements `field:"optional" json:"resources" yaml:"resources"` + // SecurityContext defines the security options the container should be run with. + // + // If set, the fields of SecurityContext override the equivalent fields of PodSecurityContext. More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ + SecurityContext *SecurityContext `field:"optional" json:"securityContext" yaml:"securityContext"` + // StartupProbe indicates that the Pod has successfully initialized. + // + // If specified, no other probes are executed until this completes successfully. If this probe fails, the Pod will be restarted, just as if the livenessProbe failed. This can be used to provide different probe parameters at the beginning of a Pod's lifecycle, when it might take a long time to load data or warm a cache, than during steady-state operation. This cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + StartupProbe *Probe `field:"optional" json:"startupProbe" yaml:"startupProbe"` + // Whether this container should allocate a buffer for stdin in the container runtime. + // + // If this is not set, reads from stdin in the container will always result in EOF. Default is false. + Stdin *bool `field:"optional" json:"stdin" yaml:"stdin"` + // Whether the container runtime should close the stdin channel after it has been opened by a single attach. + // + // When stdin is true the stdin stream will remain open across multiple attach sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the first client attaches to stdin, and then remains open and accepts data until the client disconnects, at which time stdin is closed and remains closed until the container is restarted. If this flag is false, a container processes that reads from stdin will never receive an EOF. Default is false + StdinOnce *bool `field:"optional" json:"stdinOnce" yaml:"stdinOnce"` + // Optional: Path at which the file to which the container's termination message will be written is mounted into the container's filesystem. + // + // Message written is intended to be brief final status, such as an assertion failure message. Will be truncated by the node if greater than 4096 bytes. The total message length across all containers will be limited to 12kb. Defaults to /dev/termination-log. Cannot be updated. + TerminationMessagePath *string `field:"optional" json:"terminationMessagePath" yaml:"terminationMessagePath"` + // Indicate how the termination message should be populated. + // + // File will use the contents of terminationMessagePath to populate the container status message on both success and failure. FallbackToLogsOnError will use the last chunk of container log output if the termination message file is empty and the container exited with an error. The log output is limited to 2048 bytes or 80 lines, whichever is smaller. Defaults to File. Cannot be updated. + TerminationMessagePolicy *string `field:"optional" json:"terminationMessagePolicy" yaml:"terminationMessagePolicy"` + // Whether this container should allocate a TTY for itself, also requires 'stdin' to be true. + // + // Default is false. + Tty *bool `field:"optional" json:"tty" yaml:"tty"` + // volumeDevices is the list of block devices to be used by the container. + VolumeDevices *[]*VolumeDevice `field:"optional" json:"volumeDevices" yaml:"volumeDevices"` + // Pod volumes to mount into the container's filesystem. + // + // Cannot be updated. + VolumeMounts *[]*VolumeMount `field:"optional" json:"volumeMounts" yaml:"volumeMounts"` + // Container's working directory. + // + // If not specified, the container runtime's default will be used, which might be configured in the container image. Cannot be updated. + WorkingDir *string `field:"optional" json:"workingDir" yaml:"workingDir"` +} + +// ContainerPort represents a network port in a single container. +type ContainerPort struct { + // Number of port to expose on the pod's IP address. + // + // This must be a valid port number, 0 < x < 65536. + ContainerPort *float64 `field:"required" json:"containerPort" yaml:"containerPort"` + // What host IP to bind the external port to. + HostIp *string `field:"optional" json:"hostIp" yaml:"hostIp"` + // Number of port to expose on the host. + // + // If specified, this must be a valid port number, 0 < x < 65536. If HostNetwork is specified, this must match ContainerPort. Most containers do not need this. + HostPort *float64 `field:"optional" json:"hostPort" yaml:"hostPort"` + // If specified, this must be an IANA_SVC_NAME and unique within the pod. + // + // Each named port in a pod must have a unique name. Name for the port that can be referred to by services. + Name *string `field:"optional" json:"name" yaml:"name"` + // Protocol for port. + // + // Must be UDP, TCP, or SCTP. Defaults to "TCP". + Protocol *string `field:"optional" json:"protocol" yaml:"protocol"` +} + +// ContainerResourceMetricSource indicates how to scale on a resource metric known to Kubernetes, as specified in requests and limits, describing each pod in the current scale target (e.g. CPU or memory). The values will be averaged together before being compared to the target. Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the "pods" source. Only one "target" type should be set. +type ContainerResourceMetricSourceV2Beta1 struct { + // container is the name of the container in the pods of the scaling target. + Container *string `field:"required" json:"container" yaml:"container"` + // name is the name of the resource in question. + Name *string `field:"required" json:"name" yaml:"name"` + // targetAverageUtilization is the target value of the average of the resource metric across all relevant pods, represented as a percentage of the requested value of the resource for the pods. + TargetAverageUtilization *float64 `field:"optional" json:"targetAverageUtilization" yaml:"targetAverageUtilization"` + // targetAverageValue is the target value of the average of the resource metric across all relevant pods, as a raw value (instead of as a percentage of the request), similar to the "pods" metric source type. + TargetAverageValue Quantity `field:"optional" json:"targetAverageValue" yaml:"targetAverageValue"` +} + +// ContainerResourceMetricSource indicates how to scale on a resource metric known to Kubernetes, as specified in requests and limits, describing each pod in the current scale target (e.g. CPU or memory). The values will be averaged together before being compared to the target. Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the "pods" source. Only one "target" type should be set. +type ContainerResourceMetricSourceV2Beta2 struct { + // container is the name of the container in the pods of the scaling target. + Container *string `field:"required" json:"container" yaml:"container"` + // name is the name of the resource in question. + Name *string `field:"required" json:"name" yaml:"name"` + // target specifies the target value for the given metric. + Target *MetricTargetV2Beta2 `field:"required" json:"target" yaml:"target"` +} + +// CronJobSpec describes how the job execution will look like and when it will actually run. +type CronJobSpec struct { + // Specifies the job that will be created when executing a CronJob. + JobTemplate *JobTemplateSpec `field:"required" json:"jobTemplate" yaml:"jobTemplate"` + // The schedule in Cron format, see https://en.wikipedia.org/wiki/Cron. + Schedule *string `field:"required" json:"schedule" yaml:"schedule"` + // Specifies how to treat concurrent executions of a Job. + // + // Valid values are: - "Allow" (default): allows CronJobs to run concurrently; - "Forbid": forbids concurrent runs, skipping next run if previous run hasn't finished yet; - "Replace": cancels currently running job and replaces it with a new one. + ConcurrencyPolicy *string `field:"optional" json:"concurrencyPolicy" yaml:"concurrencyPolicy"` + // The number of failed finished jobs to retain. + // + // Value must be non-negative integer. Defaults to 1. + FailedJobsHistoryLimit *float64 `field:"optional" json:"failedJobsHistoryLimit" yaml:"failedJobsHistoryLimit"` + // Optional deadline in seconds for starting the job if it misses scheduled time for any reason. + // + // Missed jobs executions will be counted as failed ones. + StartingDeadlineSeconds *float64 `field:"optional" json:"startingDeadlineSeconds" yaml:"startingDeadlineSeconds"` + // The number of successful finished jobs to retain. + // + // Value must be non-negative integer. Defaults to 3. + SuccessfulJobsHistoryLimit *float64 `field:"optional" json:"successfulJobsHistoryLimit" yaml:"successfulJobsHistoryLimit"` + // This flag tells the controller to suspend subsequent executions, it does not apply to already started executions. + // + // Defaults to false. + Suspend *bool `field:"optional" json:"suspend" yaml:"suspend"` +} + +// CronJobSpec describes how the job execution will look like and when it will actually run. +type CronJobSpecV1Beta1 struct { + // Specifies the job that will be created when executing a CronJob. + JobTemplate *JobTemplateSpecV1Beta1 `field:"required" json:"jobTemplate" yaml:"jobTemplate"` + // The schedule in Cron format, see https://en.wikipedia.org/wiki/Cron. + Schedule *string `field:"required" json:"schedule" yaml:"schedule"` + // Specifies how to treat concurrent executions of a Job. + // + // Valid values are: - "Allow" (default): allows CronJobs to run concurrently; - "Forbid": forbids concurrent runs, skipping next run if previous run hasn't finished yet; - "Replace": cancels currently running job and replaces it with a new one. + ConcurrencyPolicy *string `field:"optional" json:"concurrencyPolicy" yaml:"concurrencyPolicy"` + // The number of failed finished jobs to retain. + // + // This is a pointer to distinguish between explicit zero and not specified. Defaults to 1. + FailedJobsHistoryLimit *float64 `field:"optional" json:"failedJobsHistoryLimit" yaml:"failedJobsHistoryLimit"` + // Optional deadline in seconds for starting the job if it misses scheduled time for any reason. + // + // Missed jobs executions will be counted as failed ones. + StartingDeadlineSeconds *float64 `field:"optional" json:"startingDeadlineSeconds" yaml:"startingDeadlineSeconds"` + // The number of successful finished jobs to retain. + // + // This is a pointer to distinguish between explicit zero and not specified. Defaults to 3. + SuccessfulJobsHistoryLimit *float64 `field:"optional" json:"successfulJobsHistoryLimit" yaml:"successfulJobsHistoryLimit"` + // This flag tells the controller to suspend subsequent executions, it does not apply to already started executions. + // + // Defaults to false. + Suspend *bool `field:"optional" json:"suspend" yaml:"suspend"` +} + +// CrossVersionObjectReference contains enough information to let you identify the referred resource. +type CrossVersionObjectReference struct { + // Kind of the referent; + // + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds" + Kind *string `field:"required" json:"kind" yaml:"kind"` + // Name of the referent; + // + // More info: http://kubernetes.io/docs/user-guide/identifiers#names + Name *string `field:"required" json:"name" yaml:"name"` + // API version of the referent. + ApiVersion *string `field:"optional" json:"apiVersion" yaml:"apiVersion"` +} + +// CrossVersionObjectReference contains enough information to let you identify the referred resource. +type CrossVersionObjectReferenceV2Beta1 struct { + // Kind of the referent; + // + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds" + Kind *string `field:"required" json:"kind" yaml:"kind"` + // Name of the referent; + // + // More info: http://kubernetes.io/docs/user-guide/identifiers#names + Name *string `field:"required" json:"name" yaml:"name"` + // API version of the referent. + ApiVersion *string `field:"optional" json:"apiVersion" yaml:"apiVersion"` +} + +// CrossVersionObjectReference contains enough information to let you identify the referred resource. +type CrossVersionObjectReferenceV2Beta2 struct { + // Kind of the referent; + // + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds" + Kind *string `field:"required" json:"kind" yaml:"kind"` + // Name of the referent; + // + // More info: http://kubernetes.io/docs/user-guide/identifiers#names + Name *string `field:"required" json:"name" yaml:"name"` + // API version of the referent. + ApiVersion *string `field:"optional" json:"apiVersion" yaml:"apiVersion"` +} + +// CSIDriverSpec is the specification of a CSIDriver. +type CsiDriverSpec struct { + // attachRequired indicates this CSI volume driver requires an attach operation (because it implements the CSI ControllerPublishVolume() method), and that the Kubernetes attach detach controller should call the attach volume interface which checks the volumeattachment status and waits until the volume is attached before proceeding to mounting. + // + // The CSI external-attacher coordinates with CSI volume driver and updates the volumeattachment status when the attach operation is complete. If the CSIDriverRegistry feature gate is enabled and the value is specified to false, the attach operation will be skipped. Otherwise the attach operation will be called. + // + // This field is immutable. + AttachRequired *bool `field:"optional" json:"attachRequired" yaml:"attachRequired"` + // Defines if the underlying volume supports changing ownership and permission of the volume before being mounted. + // + // Refer to the specific FSGroupPolicy values for additional details. This field is beta, and is only honored by servers that enable the CSIVolumeFSGroupPolicy feature gate. + // + // This field is immutable. + // + // Defaults to ReadWriteOnceWithFSType, which will examine each volume to determine if Kubernetes should modify_helm ownership and permissions of the volume. With the default policy the defined fsGroup will only be applied if a fstype is defined and the volume's access mode contains ReadWriteOnce. + FsGroupPolicy *string `field:"optional" json:"fsGroupPolicy" yaml:"fsGroupPolicy"` + // If set to true, podInfoOnMount indicates this CSI volume driver requires additional pod information (like podName, podUID, etc.) during mount operations. If set to false, pod information will not be passed on mount. Default is false. The CSI driver specifies podInfoOnMount as part of driver deployment. If true, Kubelet will pass pod information as VolumeContext in the CSI NodePublishVolume() calls. The CSI driver is responsible for parsing and validating the information passed in as VolumeContext. The following VolumeConext will be passed if podInfoOnMount is set to true. This list might grow, but the prefix will be used. "csi.storage.k8s.io/pod.name": pod.Name "csi.storage.k8s.io/pod.namespace": pod.Namespace "csi.storage.k8s.io/pod.uid": string(pod.UID) "csi.storage.k8s.io/ephemeral": "true" if the volume is an ephemeral inline volume defined by a CSIVolumeSource, otherwise "false". + // + // "csi.storage.k8s.io/ephemeral" is a new feature in Kubernetes 1.16. It is only required for drivers which support both the "Persistent" and "Ephemeral" VolumeLifecycleMode. Other drivers can leave pod info disabled and/or ignore this field. As Kubernetes 1.15 doesn't support this field, drivers can only support one mode when deployed on such a cluster and the deployment determines which mode that is, for example via a command line parameter of the driver. + // + // This field is immutable. + PodInfoOnMount *bool `field:"optional" json:"podInfoOnMount" yaml:"podInfoOnMount"` + // RequiresRepublish indicates the CSI driver wants `NodePublishVolume` being periodically called to reflect any possible change in the mounted volume. + // + // This field defaults to false. + // + // Note: After a successful initial NodePublishVolume call, subsequent calls to NodePublishVolume should only update the contents of the volume. New mount points will not be seen by a running container. + RequiresRepublish *bool `field:"optional" json:"requiresRepublish" yaml:"requiresRepublish"` + // If set to true, storageCapacity indicates that the CSI volume driver wants pod scheduling to consider the storage capacity that the driver deployment will report by creating CSIStorageCapacity objects with capacity information. + // + // The check can be enabled immediately when deploying a driver. In that case, provisioning new volumes with late binding will pause until the driver deployment has published some suitable CSIStorageCapacity object. + // + // Alternatively, the driver can be deployed with the field unset or false and it can be flipped later when storage capacity information has been published. + // + // This field is immutable. + // + // This is a beta field and only available when the CSIStorageCapacity feature is enabled. The default is false. + StorageCapacity *bool `field:"optional" json:"storageCapacity" yaml:"storageCapacity"` + // TokenRequests indicates the CSI driver needs pods' service account tokens it is mounting volume for to do necessary authentication. + // + // Kubelet will pass the tokens in VolumeContext in the CSI NodePublishVolume calls. The CSI driver should parse and validate the following VolumeContext: "csi.storage.k8s.io/serviceAccount.tokens": { + // "": { + // "token": , + // "expirationTimestamp": , + // }, + // ... + // } + // + // Note: Audience in each TokenRequest should be different and at most one token is empty string. To receive a new token after expiry, RequiresRepublish can be used to trigger NodePublishVolume periodically. + TokenRequests *[]*TokenRequest `field:"optional" json:"tokenRequests" yaml:"tokenRequests"` + // volumeLifecycleModes defines what kind of volumes this CSI volume driver supports. + // + // The default if the list is empty is "Persistent", which is the usage defined by the CSI specification and implemented in Kubernetes via the usual PV/PVC mechanism. The other mode is "Ephemeral". In this mode, volumes are defined inline inside the pod spec with CSIVolumeSource and their lifecycle is tied to the lifecycle of that pod. A driver has to be aware of this because it is only going to get a NodePublishVolume call for such a volume. For more information about implementing this mode, see https://kubernetes-csi.github.io/docs/ephemeral-local-volumes.html A driver can support one or more of these modes and more modes may be added in the future. This field is beta. + // + // This field is immutable. + VolumeLifecycleModes *[]*string `field:"optional" json:"volumeLifecycleModes" yaml:"volumeLifecycleModes"` +} + +// CSINodeDriver holds information about the specification of one CSI driver installed on a node. +type CsiNodeDriver struct { + // This is the name of the CSI driver that this object refers to. + // + // This MUST be the same name returned by the CSI GetPluginName() call for that driver. + Name *string `field:"required" json:"name" yaml:"name"` + // nodeID of the node from the driver point of view. + // + // This field enables Kubernetes to communicate with storage systems that do not share the same nomenclature for nodes. For example, Kubernetes may refer to a given node as "node1", but the storage system may refer to the same node as "nodeA". When Kubernetes issues a command to the storage system to attach a volume to a specific node, it can use this field to refer to the node name using the ID that the storage system will understand, e.g. "nodeA" instead of "node1". This field is required. + NodeId *string `field:"required" json:"nodeId" yaml:"nodeId"` + // allocatable represents the volume resources of a node that are available for scheduling. + // + // This field is beta. + Allocatable *VolumeNodeResources `field:"optional" json:"allocatable" yaml:"allocatable"` + // topologyKeys is the list of keys supported by the driver. + // + // When a driver is initialized on a cluster, it provides a set of topology keys that it understands (e.g. "company.com/zone", "company.com/region"). When a driver is initialized on a node, it provides the same topology keys along with values. Kubelet will expose these topology keys as labels on its own node object. When Kubernetes does topology aware provisioning, it can use this list to determine which labels it should retrieve from the node object and pass back to the driver. It is possible for different nodes to use different topology keys. This can be empty if driver does not support topology. + TopologyKeys *[]*string `field:"optional" json:"topologyKeys" yaml:"topologyKeys"` +} + +// CSINodeSpec holds information about the specification of all CSI drivers installed on a node. +type CsiNodeSpec struct { + // drivers is a list of information of all CSI Drivers existing on a node. + // + // If all drivers in the list are uninstalled, this can become empty. + Drivers *[]*CsiNodeDriver `field:"required" json:"drivers" yaml:"drivers"` +} + +// Represents storage that is managed by an external CSI volume driver (Beta feature). +type CsiPersistentVolumeSource struct { + // Driver is the name of the driver to use for this volume. + // + // Required. + Driver *string `field:"required" json:"driver" yaml:"driver"` + // VolumeHandle is the unique volume name returned by the CSI volume plugin’s CreateVolume to refer to the volume on all subsequent calls. + // + // Required. + VolumeHandle *string `field:"required" json:"volumeHandle" yaml:"volumeHandle"` + // ControllerExpandSecretRef is a reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI ControllerExpandVolume call. + // + // This is an alpha field and requires enabling ExpandCSIVolumes feature gate. This field is optional, and may be empty if no secret is required. If the secret object contains more than one secret, all secrets are passed. + ControllerExpandSecretRef *SecretReference `field:"optional" json:"controllerExpandSecretRef" yaml:"controllerExpandSecretRef"` + // ControllerPublishSecretRef is a reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI ControllerPublishVolume and ControllerUnpublishVolume calls. + // + // This field is optional, and may be empty if no secret is required. If the secret object contains more than one secret, all secrets are passed. + ControllerPublishSecretRef *SecretReference `field:"optional" json:"controllerPublishSecretRef" yaml:"controllerPublishSecretRef"` + // Filesystem type to mount. + // + // Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". + FsType *string `field:"optional" json:"fsType" yaml:"fsType"` + // NodePublishSecretRef is a reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI NodePublishVolume and NodeUnpublishVolume calls. + // + // This field is optional, and may be empty if no secret is required. If the secret object contains more than one secret, all secrets are passed. + NodePublishSecretRef *SecretReference `field:"optional" json:"nodePublishSecretRef" yaml:"nodePublishSecretRef"` + // NodeStageSecretRef is a reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI NodeStageVolume and NodeStageVolume and NodeUnstageVolume calls. + // + // This field is optional, and may be empty if no secret is required. If the secret object contains more than one secret, all secrets are passed. + NodeStageSecretRef *SecretReference `field:"optional" json:"nodeStageSecretRef" yaml:"nodeStageSecretRef"` + // Optional: The value to pass to ControllerPublishVolumeRequest. + // + // Defaults to false (read/write). + ReadOnly *bool `field:"optional" json:"readOnly" yaml:"readOnly"` + // Attributes of the volume to publish. + VolumeAttributes *map[string]*string `field:"optional" json:"volumeAttributes" yaml:"volumeAttributes"` +} + +// Represents a source location of a volume to mount, managed by an external CSI driver. +type CsiVolumeSource struct { + // Driver is the name of the CSI driver that handles this volume. + // + // Consult with your admin for the correct name as registered in the cluster. + Driver *string `field:"required" json:"driver" yaml:"driver"` + // Filesystem type to mount. + // + // Ex. "ext4", "xfs", "ntfs". If not provided, the empty value is passed to the associated CSI driver which will determine the default filesystem to apply. + FsType *string `field:"optional" json:"fsType" yaml:"fsType"` + // NodePublishSecretRef is a reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI NodePublishVolume and NodeUnpublishVolume calls. + // + // This field is optional, and may be empty if no secret is required. If the secret object contains more than one secret, all secret references are passed. + NodePublishSecretRef *LocalObjectReference `field:"optional" json:"nodePublishSecretRef" yaml:"nodePublishSecretRef"` + // Specifies a read-only configuration for the volume. + // + // Defaults to false (read/write). + ReadOnly *bool `field:"optional" json:"readOnly" yaml:"readOnly"` + // VolumeAttributes stores driver-specific properties that are passed to the CSI driver. + // + // Consult your driver's documentation for supported values. + VolumeAttributes *map[string]*string `field:"optional" json:"volumeAttributes" yaml:"volumeAttributes"` +} + +// CustomResourceColumnDefinition specifies a column for server side printing. +type CustomResourceColumnDefinition struct { + // jsonPath is a simple JSON path (i.e. with array notation) which is evaluated against each custom resource to produce the value for this column. + JsonPath *string `field:"required" json:"jsonPath" yaml:"jsonPath"` + // name is a human readable name for the column. + Name *string `field:"required" json:"name" yaml:"name"` + // type is an OpenAPI type definition for this column. + // + // See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types for details. + Type *string `field:"required" json:"type" yaml:"type"` + // description is a human readable description of this column. + Description *string `field:"optional" json:"description" yaml:"description"` + // format is an optional OpenAPI type definition for this column. + // + // The 'name' format is applied to the primary identifier column to assist in clients identifying column is the resource name. See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types for details. + Format *string `field:"optional" json:"format" yaml:"format"` + // priority is an integer defining the relative importance of this column compared to others. + // + // Lower numbers are considered higher priority. Columns that may be omitted in limited space scenarios should be given a priority greater than 0. + Priority *float64 `field:"optional" json:"priority" yaml:"priority"` +} + +// CustomResourceConversion describes how to convert different versions of a CR. +type CustomResourceConversion struct { + // strategy specifies how custom resources are converted between versions. + // + // Allowed values are: - `None`: The converter only change the apiVersion and would not touch any other field in the custom resource. - `Webhook`: API Server will call to an external webhook to do the conversion. Additional information + // is needed for this option. This requires spec.preserveUnknownFields to be false, and spec.conversion.webhook to be set. + Strategy *string `field:"required" json:"strategy" yaml:"strategy"` + // webhook describes how to call the conversion webhook. + // + // Required when `strategy` is set to `Webhook`. + Webhook *WebhookConversion `field:"optional" json:"webhook" yaml:"webhook"` +} + +// CustomResourceDefinitionNames indicates the names to serve this CustomResourceDefinition. +type CustomResourceDefinitionNames struct { + // kind is the serialized kind of the resource. + // + // It is normally CamelCase and singular. Custom resource instances will use this value as the `kind` attribute in API calls. + Kind *string `field:"required" json:"kind" yaml:"kind"` + // plural is the plural name of the resource to serve. + // + // The custom resources are served under `/apis///.../`. Must match the name of the CustomResourceDefinition (in the form `.`). Must be all lowercase. + Plural *string `field:"required" json:"plural" yaml:"plural"` + // categories is a list of grouped resources this custom resource belongs to (e.g. 'all'). This is published in API discovery documents, and used by clients to support invocations like `kubectl get all`. + Categories *[]*string `field:"optional" json:"categories" yaml:"categories"` + // listKind is the serialized kind of the list for this resource. + // + // Defaults to "`kind`List". + ListKind *string `field:"optional" json:"listKind" yaml:"listKind"` + // shortNames are short names for the resource, exposed in API discovery documents, and used by clients to support invocations like `kubectl get `. + // + // It must be all lowercase. + ShortNames *[]*string `field:"optional" json:"shortNames" yaml:"shortNames"` + // singular is the singular name of the resource. + // + // It must be all lowercase. Defaults to lowercased `kind`. + Singular *string `field:"optional" json:"singular" yaml:"singular"` +} + +// CustomResourceDefinitionSpec describes how a user wants their resource to appear. +type CustomResourceDefinitionSpec struct { + // group is the API group of the defined custom resource. + // + // The custom resources are served under `/apis//...`. Must match the name of the CustomResourceDefinition (in the form `.`). + Group *string `field:"required" json:"group" yaml:"group"` + // names specify the resource and kind names for the custom resource. + Names *CustomResourceDefinitionNames `field:"required" json:"names" yaml:"names"` + // scope indicates whether the defined custom resource is cluster- or namespace-scoped. + // + // Allowed values are `Cluster` and `Namespaced`. + Scope *string `field:"required" json:"scope" yaml:"scope"` + // versions is the list of all API versions of the defined custom resource. + // + // Version names are used to compute the order in which served versions are listed in API discovery. If the version string is "kube-like", it will sort above non "kube-like" version strings, which are ordered lexicographically. "Kube-like" versions start with a "v", then are followed by a number (the major version), then optionally the string "alpha" or "beta" and another number (the minor version). These are sorted first by GA > beta > alpha (where GA is a version with no suffix such as beta or alpha), and then by comparing major version, then minor version. An example sorted list of versions: v10, v2, v1, v11beta2, v10beta3, v3beta1, v12alpha1, v11alpha2, foo1, foo10. + Versions *[]*CustomResourceDefinitionVersion `field:"required" json:"versions" yaml:"versions"` + // conversion defines conversion settings for the CRD. + Conversion *CustomResourceConversion `field:"optional" json:"conversion" yaml:"conversion"` + // preserveUnknownFields indicates that object fields which are not specified in the OpenAPI schema should be preserved when persisting to storage. + // + // apiVersion, kind, metadata and known fields inside metadata are always preserved. This field is deprecated in favor of setting `x-preserve-unknown-fields` to true in `spec.versions[*].schema.openAPIV3Schema`. See https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/#pruning-versus-preserving-unknown-fields for details. + PreserveUnknownFields *bool `field:"optional" json:"preserveUnknownFields" yaml:"preserveUnknownFields"` +} + +// CustomResourceDefinitionVersion describes a version for CRD. +type CustomResourceDefinitionVersion struct { + // name is the version name, e.g. “v1”, “v2beta1”, etc. The custom resources are served under this version at `/apis///...` if `served` is true. + Name *string `field:"required" json:"name" yaml:"name"` + // served is a flag enabling/disabling this version from being served via REST APIs. + Served *bool `field:"required" json:"served" yaml:"served"` + // storage indicates this version should be used when persisting custom resources to storage. + // + // There must be exactly one version with storage=true. + Storage *bool `field:"required" json:"storage" yaml:"storage"` + // additionalPrinterColumns specifies additional columns returned in Table output. + // + // See https://kubernetes.io/docs/reference/using-api/api-concepts/#receiving-resources-as-tables for details. If no columns are specified, a single column displaying the age of the custom resource is used. + AdditionalPrinterColumns *[]*CustomResourceColumnDefinition `field:"optional" json:"additionalPrinterColumns" yaml:"additionalPrinterColumns"` + // deprecated indicates this version of the custom resource API is deprecated. + // + // When set to true, API requests to this version receive a warning header in the server response. Defaults to false. + Deprecated *bool `field:"optional" json:"deprecated" yaml:"deprecated"` + // deprecationWarning overrides the default warning returned to API clients. + // + // May only be set when `deprecated` is true. The default warning indicates this version is deprecated and recommends use of the newest served version of equal or greater stability, if one exists. + DeprecationWarning *string `field:"optional" json:"deprecationWarning" yaml:"deprecationWarning"` + // schema describes the schema used for validation, pruning, and defaulting of this version of the custom resource. + Schema *CustomResourceValidation `field:"optional" json:"schema" yaml:"schema"` + // subresources specify what subresources this version of the defined custom resource have. + Subresources *CustomResourceSubresources `field:"optional" json:"subresources" yaml:"subresources"` +} + +// CustomResourceSubresourceScale defines how to serve the scale subresource for CustomResources. +type CustomResourceSubresourceScale struct { + // specReplicasPath defines the JSON path inside of a custom resource that corresponds to Scale `spec.replicas`. Only JSON paths without the array notation are allowed. Must be a JSON Path under `.spec`. If there is no value under the given path in the custom resource, the `/scale` subresource will return an error on GET. + SpecReplicasPath *string `field:"required" json:"specReplicasPath" yaml:"specReplicasPath"` + // statusReplicasPath defines the JSON path inside of a custom resource that corresponds to Scale `status.replicas`. Only JSON paths without the array notation are allowed. Must be a JSON Path under `.status`. If there is no value under the given path in the custom resource, the `status.replicas` value in the `/scale` subresource will default to 0. + StatusReplicasPath *string `field:"required" json:"statusReplicasPath" yaml:"statusReplicasPath"` + // labelSelectorPath defines the JSON path inside of a custom resource that corresponds to Scale `status.selector`. Only JSON paths without the array notation are allowed. Must be a JSON Path under `.status` or `.spec`. Must be set to work with HorizontalPodAutoscaler. The field pointed by this JSON path must be a string field (not a complex selector struct) which contains a serialized label selector in string form. More info: https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions#scale-subresource If there is no value under the given path in the custom resource, the `status.selector` value in the `/scale` subresource will default to the empty string. + LabelSelectorPath *string `field:"optional" json:"labelSelectorPath" yaml:"labelSelectorPath"` +} + +// CustomResourceSubresources defines the status and scale subresources for CustomResources. +type CustomResourceSubresources struct { + // scale indicates the custom resource should serve a `/scale` subresource that returns an `autoscaling/v1` Scale object. + Scale *CustomResourceSubresourceScale `field:"optional" json:"scale" yaml:"scale"` + // status indicates the custom resource should serve a `/status` subresource. + // + // When enabled: 1. requests to the custom resource primary endpoint ignore changes to the `status` stanza of the object. 2. requests to the custom resource `/status` subresource ignore changes to anything other than the `status` stanza of the object. + Status interface{} `field:"optional" json:"status" yaml:"status"` +} + +// CustomResourceValidation is a list of validation methods for CustomResources. +type CustomResourceValidation struct { + // openAPIV3Schema is the OpenAPI v3 schema to use for validation and pruning. + OpenApiv3Schema *JsonSchemaProps `field:"optional" json:"openApiv3Schema" yaml:"openApiv3Schema"` +} + +// DaemonSetSpec is the specification of a daemon set. +type DaemonSetSpec struct { + // A label query over pods that are managed by the daemon set. + // + // Must match in order to be controlled. It must match the pod template's labels. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors + Selector *LabelSelector `field:"required" json:"selector" yaml:"selector"` + // An object that describes the pod that will be created. + // + // The DaemonSet will create exactly one copy of this pod on every node that matches the template's node selector (or on every node if no node selector is specified). More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template + Template *PodTemplateSpec `field:"required" json:"template" yaml:"template"` + // The minimum number of seconds for which a newly created DaemonSet pod should be ready without any of its container crashing, for it to be considered available. + // + // Defaults to 0 (pod will be considered available as soon as it is ready). + MinReadySeconds *float64 `field:"optional" json:"minReadySeconds" yaml:"minReadySeconds"` + // The number of old history to retain to allow rollback. + // + // This is a pointer to distinguish between explicit zero and not specified. Defaults to 10. + RevisionHistoryLimit *float64 `field:"optional" json:"revisionHistoryLimit" yaml:"revisionHistoryLimit"` + // An update strategy to replace existing DaemonSet pods with new pods. + UpdateStrategy *DaemonSetUpdateStrategy `field:"optional" json:"updateStrategy" yaml:"updateStrategy"` +} + +// DaemonSetUpdateStrategy is a struct used to control the update strategy for a DaemonSet. +type DaemonSetUpdateStrategy struct { + // Rolling update config params. + // + // Present only if type = "RollingUpdate". + RollingUpdate *RollingUpdateDaemonSet `field:"optional" json:"rollingUpdate" yaml:"rollingUpdate"` + // Type of daemon set update. + // + // Can be "RollingUpdate" or "OnDelete". Default is RollingUpdate. + Type *string `field:"optional" json:"type" yaml:"type"` +} + +// DeleteOptions may be provided when deleting an API object. +type DeleteOptions struct { + // APIVersion defines the versioned schema of this representation of an object. + // + // Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + ApiVersion *string `field:"optional" json:"apiVersion" yaml:"apiVersion"` + // When present, indicates that modifications should not be persisted. + // + // An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + DryRun *[]*string `field:"optional" json:"dryRun" yaml:"dryRun"` + // The duration in seconds before the object should be deleted. + // + // Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. + GracePeriodSeconds *float64 `field:"optional" json:"gracePeriodSeconds" yaml:"gracePeriodSeconds"` + // Kind is a string value representing the REST resource this object represents. + // + // Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + Kind IoK8SApimachineryPkgApisMetaV1DeleteOptionsKind `field:"optional" json:"kind" yaml:"kind"` + // Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the "orphan" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. + OrphanDependents *bool `field:"optional" json:"orphanDependents" yaml:"orphanDependents"` + // Must be fulfilled before a deletion is carried out. + // + // If not possible, a 409 Conflict status will be returned. + Preconditions *Preconditions `field:"optional" json:"preconditions" yaml:"preconditions"` + // Whether and how garbage collection will be performed. + // + // Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. + PropagationPolicy *string `field:"optional" json:"propagationPolicy" yaml:"propagationPolicy"` +} + +// DeploymentSpec is the specification of the desired behavior of the Deployment. +type DeploymentSpec struct { + // Label selector for pods. + // + // Existing ReplicaSets whose pods are selected by this will be the ones affected by this deployment. It must match the pod template's labels. + Selector *LabelSelector `field:"required" json:"selector" yaml:"selector"` + // Template describes the pods that will be created. + Template *PodTemplateSpec `field:"required" json:"template" yaml:"template"` + // Minimum number of seconds for which a newly created pod should be ready without any of its container crashing, for it to be considered available. + // + // Defaults to 0 (pod will be considered available as soon as it is ready). + MinReadySeconds *float64 `field:"optional" json:"minReadySeconds" yaml:"minReadySeconds"` + // Indicates that the deployment is paused. + Paused *bool `field:"optional" json:"paused" yaml:"paused"` + // The maximum time in seconds for a deployment to make progress before it is considered to be failed. + // + // The deployment controller will continue to process failed deployments and a condition with a ProgressDeadlineExceeded reason will be surfaced in the deployment status. Note that progress will not be estimated during the time a deployment is paused. Defaults to 600s. + ProgressDeadlineSeconds *float64 `field:"optional" json:"progressDeadlineSeconds" yaml:"progressDeadlineSeconds"` + // Number of desired pods. + // + // This is a pointer to distinguish between explicit zero and not specified. Defaults to 1. + Replicas *float64 `field:"optional" json:"replicas" yaml:"replicas"` + // The number of old ReplicaSets to retain to allow rollback. + // + // This is a pointer to distinguish between explicit zero and not specified. Defaults to 10. + RevisionHistoryLimit *float64 `field:"optional" json:"revisionHistoryLimit" yaml:"revisionHistoryLimit"` + // The deployment strategy to use to replace existing pods with new ones. + Strategy *DeploymentStrategy `field:"optional" json:"strategy" yaml:"strategy"` +} + +// DeploymentStrategy describes how to replace existing pods with new ones. +type DeploymentStrategy struct { + // Rolling update config params. + // + // Present only if DeploymentStrategyType = RollingUpdate. + RollingUpdate *RollingUpdateDeployment `field:"optional" json:"rollingUpdate" yaml:"rollingUpdate"` + // Type of deployment. + // + // Can be "Recreate" or "RollingUpdate". Default is RollingUpdate. + Type *string `field:"optional" json:"type" yaml:"type"` +} + +// Represents downward API info for projecting into a projected volume. +// +// Note that this is identical to a downwardAPI volume source without the default mode. +type DownwardApiProjection struct { + // Items is a list of DownwardAPIVolume file. + Items *[]*DownwardApiVolumeFile `field:"optional" json:"items" yaml:"items"` +} + +// DownwardAPIVolumeFile represents information to create the file containing the pod field. +type DownwardApiVolumeFile struct { + // Required: Path is the relative path name of the file to be created. + // + // Must not be absolute or contain the '..' path. Must be utf-8 encoded. The first item of the relative path must not start with '..' + Path *string `field:"required" json:"path" yaml:"path"` + // Required: Selects a field of the pod: only annotations, labels, name and namespace are supported. + FieldRef *ObjectFieldSelector `field:"optional" json:"fieldRef" yaml:"fieldRef"` + // Optional: mode bits used to set permissions on this file, must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. + // + // YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set. + Mode *float64 `field:"optional" json:"mode" yaml:"mode"` + // Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported. + ResourceFieldRef *ResourceFieldSelector `field:"optional" json:"resourceFieldRef" yaml:"resourceFieldRef"` +} + +// DownwardAPIVolumeSource represents a volume containing downward API info. +// +// Downward API volumes support ownership management and SELinux relabeling. +type DownwardApiVolumeSource struct { + // Optional: mode bits to use on created files by default. + // + // Must be a Optional: mode bits used to set permissions on created files by default. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set. + DefaultMode *float64 `field:"optional" json:"defaultMode" yaml:"defaultMode"` + // Items is a list of downward API volume file. + Items *[]*DownwardApiVolumeFile `field:"optional" json:"items" yaml:"items"` +} + +// Represents an empty directory for a pod. +// +// Empty directory volumes support ownership management and SELinux relabeling. +type EmptyDirVolumeSource struct { + // What type of storage medium should back this directory. + // + // The default is "" which means to use the node's default medium. Must be an empty string (default) or Memory. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir + Medium *string `field:"optional" json:"medium" yaml:"medium"` + // Total amount of local storage required for this EmptyDir volume. + // + // The size limit is also applicable for memory medium. The maximum usage on memory medium EmptyDir would be the minimum value between the SizeLimit specified here and the sum of memory limits of all containers in a pod. The default is nil which means that the limit is undefined. More info: http://kubernetes.io/docs/user-guide/volumes#emptydir + SizeLimit Quantity `field:"optional" json:"sizeLimit" yaml:"sizeLimit"` +} + +// Endpoint represents a single logical "backend" implementing a service. +type Endpoint struct { + // addresses of this endpoint. + // + // The contents of this field are interpreted according to the corresponding EndpointSlice addressType field. Consumers must handle different types of addresses in the context of their own capabilities. This must contain at least one address but no more than 100. + Addresses *[]*string `field:"required" json:"addresses" yaml:"addresses"` + // conditions contains information about the current status of the endpoint. + Conditions *EndpointConditions `field:"optional" json:"conditions" yaml:"conditions"` + // deprecatedTopology contains topology information part of the v1beta1 API. + // + // This field is deprecated, and will be removed when the v1beta1 API is removed (no sooner than kubernetes v1.24). While this field can hold values, it is not writable through the v1 API, and any attempts to write to it will be silently ignored. Topology information can be found in the zone and nodeName fields instead. + DeprecatedTopology *map[string]*string `field:"optional" json:"deprecatedTopology" yaml:"deprecatedTopology"` + // hints contains information associated with how an endpoint should be consumed. + Hints *EndpointHints `field:"optional" json:"hints" yaml:"hints"` + // hostname of this endpoint. + // + // This field may be used by consumers of endpoints to distinguish endpoints from each other (e.g. in DNS names). Multiple endpoints which use the same hostname should be considered fungible (e.g. multiple A values in DNS). Must be lowercase and pass DNS Label (RFC 1123) validation. + Hostname *string `field:"optional" json:"hostname" yaml:"hostname"` + // nodeName represents the name of the Node hosting this endpoint. + // + // This can be used to determine endpoints local to a Node. This field can be enabled with the EndpointSliceNodeName feature gate. + NodeName *string `field:"optional" json:"nodeName" yaml:"nodeName"` + // targetRef is a reference to a Kubernetes object that represents this endpoint. + TargetRef *ObjectReference `field:"optional" json:"targetRef" yaml:"targetRef"` + // zone is the name of the Zone this endpoint exists in. + Zone *string `field:"optional" json:"zone" yaml:"zone"` +} + +// EndpointAddress is a tuple that describes single IP address. +type EndpointAddress struct { + // The IP of this endpoint. + // + // May not be loopback (127.0.0.0/8), link-local (169.254.0.0/16), or link-local multicast ((224.0.0.0/24). IPv6 is also accepted but not fully supported on all platforms. Also, certain kubernetes components, like kube-proxy, are not IPv6 ready. + Ip *string `field:"required" json:"ip" yaml:"ip"` + // The Hostname of this endpoint. + Hostname *string `field:"optional" json:"hostname" yaml:"hostname"` + // Optional: Node hosting this endpoint. + // + // This can be used to determine endpoints local to a node. + NodeName *string `field:"optional" json:"nodeName" yaml:"nodeName"` + // Reference to object providing the endpoint. + TargetRef *ObjectReference `field:"optional" json:"targetRef" yaml:"targetRef"` +} + +// EndpointConditions represents the current condition of an endpoint. +type EndpointConditions struct { + // ready indicates that this endpoint is prepared to receive traffic, according to whatever system is managing the endpoint. + // + // A nil value indicates an unknown state. In most cases consumers should interpret this unknown state as ready. For compatibility reasons, ready should never be "true" for terminating endpoints. + Ready *bool `field:"optional" json:"ready" yaml:"ready"` + // serving is identical to ready except that it is set regardless of the terminating state of endpoints. + // + // This condition should be set to true for a ready endpoint that is terminating. If nil, consumers should defer to the ready condition. This field can be enabled with the EndpointSliceTerminatingCondition feature gate. + Serving *bool `field:"optional" json:"serving" yaml:"serving"` + // terminating indicates that this endpoint is terminating. + // + // A nil value indicates an unknown state. Consumers should interpret this unknown state to mean that the endpoint is not terminating. This field can be enabled with the EndpointSliceTerminatingCondition feature gate. + Terminating *bool `field:"optional" json:"terminating" yaml:"terminating"` +} + +// EndpointConditions represents the current condition of an endpoint. +type EndpointConditionsV1Beta1 struct { + // ready indicates that this endpoint is prepared to receive traffic, according to whatever system is managing the endpoint. + // + // A nil value indicates an unknown state. In most cases consumers should interpret this unknown state as ready. For compatibility reasons, ready should never be "true" for terminating endpoints. + Ready *bool `field:"optional" json:"ready" yaml:"ready"` + // serving is identical to ready except that it is set regardless of the terminating state of endpoints. + // + // This condition should be set to true for a ready endpoint that is terminating. If nil, consumers should defer to the ready condition. This field can be enabled with the EndpointSliceTerminatingCondition feature gate. + Serving *bool `field:"optional" json:"serving" yaml:"serving"` + // terminating indicates that this endpoint is terminating. + // + // A nil value indicates an unknown state. Consumers should interpret this unknown state to mean that the endpoint is not terminating. This field can be enabled with the EndpointSliceTerminatingCondition feature gate. + Terminating *bool `field:"optional" json:"terminating" yaml:"terminating"` +} + +// EndpointHints provides hints describing how an endpoint should be consumed. +type EndpointHints struct { + // forZones indicates the zone(s) this endpoint should be consumed by to enable topology aware routing. + ForZones *[]*ForZone `field:"optional" json:"forZones" yaml:"forZones"` +} + +// EndpointHints provides hints describing how an endpoint should be consumed. +type EndpointHintsV1Beta1 struct { + // forZones indicates the zone(s) this endpoint should be consumed by to enable topology aware routing. + // + // May contain a maximum of 8 entries. + ForZones *[]*ForZoneV1Beta1 `field:"optional" json:"forZones" yaml:"forZones"` +} + +// EndpointPort is a tuple that describes a single port. +type EndpointPort struct { + // The port number of the endpoint. + Port *float64 `field:"required" json:"port" yaml:"port"` + // The application protocol for this port. + // + // This field follows standard Kubernetes label syntax. Un-prefixed names are reserved for IANA standard service names (as per RFC-6335 and http://www.iana.org/assignments/service-names). Non-standard protocols should use prefixed names such as mycompany.com/my-custom-protocol. + AppProtocol *string `field:"optional" json:"appProtocol" yaml:"appProtocol"` + // The name of this port. + // + // This must match the 'name' field in the corresponding ServicePort. Must be a DNS_LABEL. Optional only if one port is defined. + Name *string `field:"optional" json:"name" yaml:"name"` + // The IP protocol for this port. + // + // Must be UDP, TCP, or SCTP. Default is TCP. + Protocol *string `field:"optional" json:"protocol" yaml:"protocol"` +} + +// EndpointPort represents a Port used by an EndpointSlice. +type EndpointPortV1Beta1 struct { + // The application protocol for this port. + // + // This field follows standard Kubernetes label syntax. Un-prefixed names are reserved for IANA standard service names (as per RFC-6335 and http://www.iana.org/assignments/service-names). Non-standard protocols should use prefixed names such as mycompany.com/my-custom-protocol. + AppProtocol *string `field:"optional" json:"appProtocol" yaml:"appProtocol"` + // The name of this port. + // + // All ports in an EndpointSlice must have a unique name. If the EndpointSlice is dervied from a Kubernetes service, this corresponds to the Service.ports[].name. Name must either be an empty string or pass DNS_LABEL validation: * must be no more than 63 characters long. * must consist of lower case alphanumeric characters or '-'. * must start and end with an alphanumeric character. Default is empty string. + Name *string `field:"optional" json:"name" yaml:"name"` + // The port number of the endpoint. + // + // If this is not specified, ports are not restricted and must be interpreted in the context of the specific consumer. + Port *float64 `field:"optional" json:"port" yaml:"port"` + // The IP protocol for this port. + // + // Must be UDP, TCP, or SCTP. Default is TCP. + Protocol *string `field:"optional" json:"protocol" yaml:"protocol"` +} + +// EndpointSubset is a group of addresses with a common set of ports. +// +// The expanded set of endpoints is the Cartesian product of Addresses x Ports. For example, given: +// { +// Addresses: [{"ip": "10.10.1.1"}, {"ip": "10.10.2.2"}], +// Ports: [{"name": "a", "port": 8675}, {"name": "b", "port": 309}] +// } +// The resulting set of endpoints can be viewed as: +// a: [ 10.10.1.1:8675, 10.10.2.2:8675 ], +// b: [ 10.10.1.1:309, 10.10.2.2:309 ] +type EndpointSubset struct { + // IP addresses which offer the related ports that are marked as ready. + // + // These endpoints should be considered safe for load balancers and clients to utilize. + Addresses *[]*EndpointAddress `field:"optional" json:"addresses" yaml:"addresses"` + // IP addresses which offer the related ports but are not currently marked as ready because they have not yet finished starting, have recently failed a readiness check, or have recently failed a liveness check. + NotReadyAddresses *[]*EndpointAddress `field:"optional" json:"notReadyAddresses" yaml:"notReadyAddresses"` + // Port numbers available on the related IP addresses. + Ports *[]*EndpointPort `field:"optional" json:"ports" yaml:"ports"` +} + +// Endpoint represents a single logical "backend" implementing a service. +type EndpointV1Beta1 struct { + // addresses of this endpoint. + // + // The contents of this field are interpreted according to the corresponding EndpointSlice addressType field. Consumers must handle different types of addresses in the context of their own capabilities. This must contain at least one address but no more than 100. + Addresses *[]*string `field:"required" json:"addresses" yaml:"addresses"` + // conditions contains information about the current status of the endpoint. + Conditions *EndpointConditionsV1Beta1 `field:"optional" json:"conditions" yaml:"conditions"` + // hints contains information associated with how an endpoint should be consumed. + Hints *EndpointHintsV1Beta1 `field:"optional" json:"hints" yaml:"hints"` + // hostname of this endpoint. + // + // This field may be used by consumers of endpoints to distinguish endpoints from each other (e.g. in DNS names). Multiple endpoints which use the same hostname should be considered fungible (e.g. multiple A values in DNS). Must be lowercase and pass DNS Label (RFC 1123) validation. + Hostname *string `field:"optional" json:"hostname" yaml:"hostname"` + // nodeName represents the name of the Node hosting this endpoint. + // + // This can be used to determine endpoints local to a Node. This field can be enabled with the EndpointSliceNodeName feature gate. + NodeName *string `field:"optional" json:"nodeName" yaml:"nodeName"` + // targetRef is a reference to a Kubernetes object that represents this endpoint. + TargetRef *ObjectReference `field:"optional" json:"targetRef" yaml:"targetRef"` + // topology contains arbitrary topology information associated with the endpoint. + // + // These key/value pairs must conform with the label format. https://kubernetes.io/docs/concepts/overview/working-with-objects/labels Topology may include a maximum of 16 key/value pairs. This includes, but is not limited to the following well known keys: * kubernetes.io/hostname: the value indicates the hostname of the node + // where the endpoint is located. This should match the corresponding + // node label. + // * topology.kubernetes.io/zone: the value indicates the zone where the + // endpoint is located. This should match the corresponding node label. + // * topology.kubernetes.io/region: the value indicates the region where the + // endpoint is located. This should match the corresponding node label. + // This field is deprecated and will be removed in future api versions. + Topology *map[string]*string `field:"optional" json:"topology" yaml:"topology"` +} + +// EnvFromSource represents the source of a set of ConfigMaps. +type EnvFromSource struct { + // The ConfigMap to select from. + ConfigMapRef *ConfigMapEnvSource `field:"optional" json:"configMapRef" yaml:"configMapRef"` + // An optional identifier to prepend to each key in the ConfigMap. + // + // Must be a C_IDENTIFIER. + Prefix *string `field:"optional" json:"prefix" yaml:"prefix"` + // The Secret to select from. + SecretRef *SecretEnvSource `field:"optional" json:"secretRef" yaml:"secretRef"` +} + +// EnvVar represents an environment variable present in a Container. +type EnvVar struct { + // Name of the environment variable. + // + // Must be a C_IDENTIFIER. + Name *string `field:"required" json:"name" yaml:"name"` + // Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. + // + // If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "". + Value *string `field:"optional" json:"value" yaml:"value"` + // Source for the environment variable's value. + // + // Cannot be used if value is not empty. + ValueFrom *EnvVarSource `field:"optional" json:"valueFrom" yaml:"valueFrom"` +} + +// EnvVarSource represents a source for the value of an EnvVar. +type EnvVarSource struct { + // Selects a key of a ConfigMap. + ConfigMapKeyRef *ConfigMapKeySelector `field:"optional" json:"configMapKeyRef" yaml:"configMapKeyRef"` + // Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs. + FieldRef *ObjectFieldSelector `field:"optional" json:"fieldRef" yaml:"fieldRef"` + // Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. + ResourceFieldRef *ResourceFieldSelector `field:"optional" json:"resourceFieldRef" yaml:"resourceFieldRef"` + // Selects a key of a secret in the pod's namespace. + SecretKeyRef *SecretKeySelector `field:"optional" json:"secretKeyRef" yaml:"secretKeyRef"` +} + +// An EphemeralContainer is a container that may be added temporarily to an existing pod for user-initiated activities such as debugging. +// +// Ephemeral containers have no resource or scheduling guarantees, and they will not be restarted when they exit or when a pod is removed or restarted. If an ephemeral container causes a pod to exceed its resource allocation, the pod may be evicted. Ephemeral containers may not be added by directly updating the pod spec. They must be added via the pod's ephemeralcontainers subresource, and they will appear in the pod spec once added. This is an alpha feature enabled by the EphemeralContainers feature flag. +type EphemeralContainer struct { + // Name of the ephemeral container specified as a DNS_LABEL. + // + // This name must be unique among all containers, init containers and ephemeral containers. + Name *string `field:"required" json:"name" yaml:"name"` + // Arguments to the entrypoint. + // + // The docker image's CMD is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell + Args *[]*string `field:"optional" json:"args" yaml:"args"` + // Entrypoint array. + // + // Not executed within a shell. The docker image's ENTRYPOINT is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell + Command *[]*string `field:"optional" json:"command" yaml:"command"` + // List of environment variables to set in the container. + // + // Cannot be updated. + Env *[]*EnvVar `field:"optional" json:"env" yaml:"env"` + // List of sources to populate environment variables in the container. + // + // The keys defined within a source must be a C_IDENTIFIER. All invalid keys will be reported as an event when the container is starting. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated. + EnvFrom *[]*EnvFromSource `field:"optional" json:"envFrom" yaml:"envFrom"` + // Docker image name. + // + // More info: https://kubernetes.io/docs/concepts/containers/images + Image *string `field:"optional" json:"image" yaml:"image"` + // Image pull policy. + // + // One of Always, Never, IfNotPresent. Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/images#updating-images + ImagePullPolicy *string `field:"optional" json:"imagePullPolicy" yaml:"imagePullPolicy"` + // Lifecycle is not allowed for ephemeral containers. + Lifecycle *Lifecycle `field:"optional" json:"lifecycle" yaml:"lifecycle"` + // Probes are not allowed for ephemeral containers. + LivenessProbe *Probe `field:"optional" json:"livenessProbe" yaml:"livenessProbe"` + // Ports are not allowed for ephemeral containers. + Ports *[]*ContainerPort `field:"optional" json:"ports" yaml:"ports"` + // Probes are not allowed for ephemeral containers. + ReadinessProbe *Probe `field:"optional" json:"readinessProbe" yaml:"readinessProbe"` + // Resources are not allowed for ephemeral containers. + // + // Ephemeral containers use spare resources already allocated to the pod. + Resources *ResourceRequirements `field:"optional" json:"resources" yaml:"resources"` + // Optional: SecurityContext defines the security options the ephemeral container should be run with. + // + // If set, the fields of SecurityContext override the equivalent fields of PodSecurityContext. + SecurityContext *SecurityContext `field:"optional" json:"securityContext" yaml:"securityContext"` + // Probes are not allowed for ephemeral containers. + StartupProbe *Probe `field:"optional" json:"startupProbe" yaml:"startupProbe"` + // Whether this container should allocate a buffer for stdin in the container runtime. + // + // If this is not set, reads from stdin in the container will always result in EOF. Default is false. + Stdin *bool `field:"optional" json:"stdin" yaml:"stdin"` + // Whether the container runtime should close the stdin channel after it has been opened by a single attach. + // + // When stdin is true the stdin stream will remain open across multiple attach sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the first client attaches to stdin, and then remains open and accepts data until the client disconnects, at which time stdin is closed and remains closed until the container is restarted. If this flag is false, a container processes that reads from stdin will never receive an EOF. Default is false + StdinOnce *bool `field:"optional" json:"stdinOnce" yaml:"stdinOnce"` + // If set, the name of the container from PodSpec that this ephemeral container targets. + // + // The ephemeral container will be run in the namespaces (IPC, PID, etc) of this container. If not set then the ephemeral container is run in whatever namespaces are shared for the pod. Note that the container runtime must support this feature. + TargetContainerName *string `field:"optional" json:"targetContainerName" yaml:"targetContainerName"` + // Optional: Path at which the file to which the container's termination message will be written is mounted into the container's filesystem. + // + // Message written is intended to be brief final status, such as an assertion failure message. Will be truncated by the node if greater than 4096 bytes. The total message length across all containers will be limited to 12kb. Defaults to /dev/termination-log. Cannot be updated. + TerminationMessagePath *string `field:"optional" json:"terminationMessagePath" yaml:"terminationMessagePath"` + // Indicate how the termination message should be populated. + // + // File will use the contents of terminationMessagePath to populate the container status message on both success and failure. FallbackToLogsOnError will use the last chunk of container log output if the termination message file is empty and the container exited with an error. The log output is limited to 2048 bytes or 80 lines, whichever is smaller. Defaults to File. Cannot be updated. + TerminationMessagePolicy *string `field:"optional" json:"terminationMessagePolicy" yaml:"terminationMessagePolicy"` + // Whether this container should allocate a TTY for itself, also requires 'stdin' to be true. + // + // Default is false. + Tty *bool `field:"optional" json:"tty" yaml:"tty"` + // volumeDevices is the list of block devices to be used by the container. + VolumeDevices *[]*VolumeDevice `field:"optional" json:"volumeDevices" yaml:"volumeDevices"` + // Pod volumes to mount into the container's filesystem. + // + // Cannot be updated. + VolumeMounts *[]*VolumeMount `field:"optional" json:"volumeMounts" yaml:"volumeMounts"` + // Container's working directory. + // + // If not specified, the container runtime's default will be used, which might be configured in the container image. Cannot be updated. + WorkingDir *string `field:"optional" json:"workingDir" yaml:"workingDir"` +} + +// Represents an ephemeral volume that is handled by a normal storage driver. +type EphemeralVolumeSource struct { + // Will be used to create a stand-alone PVC to provision the volume. + // + // The pod in which this EphemeralVolumeSource is embedded will be the owner of the PVC, i.e. the PVC will be deleted together with the pod. The name of the PVC will be `-` where `` is the name from the `PodSpec.Volumes` array entry. Pod validation will reject the pod if the concatenated name is not valid for a PVC (for example, too long). + // + // An existing PVC with that name that is not owned by the pod will *not* be used for the pod to avoid using an unrelated volume by mistake. Starting the pod is then blocked until the unrelated PVC is removed. If such a pre-created PVC is meant to be used by the pod, the PVC has to updated with an owner reference to the pod once the pod exists. Normally this should not be necessary, but it may be useful when manually reconstructing a broken cluster. + // + // This field is read-only and no changes will be made by Kubernetes to the PVC after it has been created. + // + // Required, must not be nil. + VolumeClaimTemplate *PersistentVolumeClaimTemplate `field:"optional" json:"volumeClaimTemplate" yaml:"volumeClaimTemplate"` +} + +// EventSeries contain information on series of events, i.e. thing that was/is happening continuously for some time. How often to update the EventSeries is up to the event reporters. The default event reporter in "k8s.io/client-go/tools/events/event_broadcaster.go" shows how this struct is updated on heartbeats and can guide customized reporter implementations. +type EventSeries struct { + // count is the number of occurrences in this series up to the last heartbeat time. + Count *float64 `field:"required" json:"count" yaml:"count"` + // lastObservedTime is the time when last Event from the series was seen before last heartbeat. + LastObservedTime *time.Time `field:"required" json:"lastObservedTime" yaml:"lastObservedTime"` +} + +// EventSeries contain information on series of events, i.e. thing that was/is happening continuously for some time. +type EventSeriesV1Beta1 struct { + // count is the number of occurrences in this series up to the last heartbeat time. + Count *float64 `field:"required" json:"count" yaml:"count"` + // lastObservedTime is the time when last Event from the series was seen before last heartbeat. + LastObservedTime *time.Time `field:"required" json:"lastObservedTime" yaml:"lastObservedTime"` +} + +// EventSource contains information for an event. +type EventSource struct { + // Component from which the event is generated. + Component *string `field:"optional" json:"component" yaml:"component"` + // Node name on which the event is generated. + Host *string `field:"optional" json:"host" yaml:"host"` +} + +// ExecAction describes a "run in container" action. +type ExecAction struct { + // Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. + // + // The command is simply exec'd, it is not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy. + Command *[]*string `field:"optional" json:"command" yaml:"command"` +} + +// ExternalDocumentation allows referencing an external resource for extended documentation. +type ExternalDocumentation struct { + Description *string `field:"optional" json:"description" yaml:"description"` + Url *string `field:"optional" json:"url" yaml:"url"` +} + +// ExternalMetricSource indicates how to scale on a metric not associated with any Kubernetes object (for example length of queue in cloud messaging service, or QPS from loadbalancer running outside of cluster). +// +// Exactly one "target" type should be set. +type ExternalMetricSourceV2Beta1 struct { + // metricName is the name of the metric in question. + MetricName *string `field:"required" json:"metricName" yaml:"metricName"` + // metricSelector is used to identify a specific time series within a given metric. + MetricSelector *LabelSelector `field:"optional" json:"metricSelector" yaml:"metricSelector"` + // targetAverageValue is the target per-pod value of global metric (as a quantity). + // + // Mutually exclusive with TargetValue. + TargetAverageValue Quantity `field:"optional" json:"targetAverageValue" yaml:"targetAverageValue"` + // targetValue is the target value of the metric (as a quantity). + // + // Mutually exclusive with TargetAverageValue. + TargetValue Quantity `field:"optional" json:"targetValue" yaml:"targetValue"` +} + +// ExternalMetricSource indicates how to scale on a metric not associated with any Kubernetes object (for example length of queue in cloud messaging service, or QPS from loadbalancer running outside of cluster). +type ExternalMetricSourceV2Beta2 struct { + // metric identifies the target metric by name and selector. + Metric *MetricIdentifierV2Beta2 `field:"required" json:"metric" yaml:"metric"` + // target specifies the target value for the given metric. + Target *MetricTargetV2Beta2 `field:"required" json:"target" yaml:"target"` +} + +// Represents a Fibre Channel volume. +// +// Fibre Channel volumes can only be mounted as read/write once. Fibre Channel volumes support ownership management and SELinux relabeling. +type FcVolumeSource struct { + // Filesystem type to mount. + // + // Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + FsType *string `field:"optional" json:"fsType" yaml:"fsType"` + // Optional: FC target lun number. + Lun *float64 `field:"optional" json:"lun" yaml:"lun"` + // Optional: Defaults to false (read/write). + // + // ReadOnly here will force the ReadOnly setting in VolumeMounts. + ReadOnly *bool `field:"optional" json:"readOnly" yaml:"readOnly"` + // Optional: FC target worldwide names (WWNs). + TargetWwNs *[]*string `field:"optional" json:"targetWwNs" yaml:"targetWwNs"` + // Optional: FC volume world wide identifiers (wwids) Either wwids or combination of targetWWNs and lun must be set, but not both simultaneously. + Wwids *[]*string `field:"optional" json:"wwids" yaml:"wwids"` +} + +// FlexPersistentVolumeSource represents a generic persistent volume resource that is provisioned/attached using an exec based plugin. +type FlexPersistentVolumeSource struct { + // Driver is the name of the driver to use for this volume. + Driver *string `field:"required" json:"driver" yaml:"driver"` + // Filesystem type to mount. + // + // Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". The default filesystem depends on FlexVolume script. + FsType *string `field:"optional" json:"fsType" yaml:"fsType"` + // Optional: Extra command options if any. + Options *map[string]*string `field:"optional" json:"options" yaml:"options"` + // Optional: Defaults to false (read/write). + // + // ReadOnly here will force the ReadOnly setting in VolumeMounts. + ReadOnly *bool `field:"optional" json:"readOnly" yaml:"readOnly"` + // Optional: SecretRef is reference to the secret object containing sensitive information to pass to the plugin scripts. + // + // This may be empty if no secret object is specified. If the secret object contains more than one secret, all secrets are passed to the plugin scripts. + SecretRef *SecretReference `field:"optional" json:"secretRef" yaml:"secretRef"` +} + +// FlexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin. +type FlexVolumeSource struct { + // Driver is the name of the driver to use for this volume. + Driver *string `field:"required" json:"driver" yaml:"driver"` + // Filesystem type to mount. + // + // Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". The default filesystem depends on FlexVolume script. + FsType *string `field:"optional" json:"fsType" yaml:"fsType"` + // Optional: Extra command options if any. + Options *map[string]*string `field:"optional" json:"options" yaml:"options"` + // Optional: Defaults to false (read/write). + // + // ReadOnly here will force the ReadOnly setting in VolumeMounts. + ReadOnly *bool `field:"optional" json:"readOnly" yaml:"readOnly"` + // Optional: SecretRef is reference to the secret object containing sensitive information to pass to the plugin scripts. + // + // This may be empty if no secret object is specified. If the secret object contains more than one secret, all secrets are passed to the plugin scripts. + SecretRef *LocalObjectReference `field:"optional" json:"secretRef" yaml:"secretRef"` +} + +// Represents a Flocker volume mounted by the Flocker agent. +// +// One and only one of datasetName and datasetUUID should be set. Flocker volumes do not support ownership management or SELinux relabeling. +type FlockerVolumeSource struct { + // Name of the dataset stored as metadata -> name on the dataset for Flocker should be considered as deprecated. + DatasetName *string `field:"optional" json:"datasetName" yaml:"datasetName"` + // UUID of the dataset. + // + // This is unique identifier of a Flocker dataset. + DatasetUuid *string `field:"optional" json:"datasetUuid" yaml:"datasetUuid"` +} + +// FlowDistinguisherMethod specifies the method of a flow distinguisher. +type FlowDistinguisherMethodV1Beta1 struct { + // `type` is the type of flow distinguisher method The supported types are "ByUser" and "ByNamespace". + // + // Required. + Type *string `field:"required" json:"type" yaml:"type"` +} + +// FlowSchemaSpec describes how the FlowSchema's specification looks like. +type FlowSchemaSpecV1Beta1 struct { + // `priorityLevelConfiguration` should reference a PriorityLevelConfiguration in the cluster. + // + // If the reference cannot be resolved, the FlowSchema will be ignored and marked as invalid in its status. Required. + PriorityLevelConfiguration *PriorityLevelConfigurationReferenceV1Beta1 `field:"required" json:"priorityLevelConfiguration" yaml:"priorityLevelConfiguration"` + // `distinguisherMethod` defines how to compute the flow distinguisher for requests that match this schema. + // + // `nil` specifies that the distinguisher is disabled and thus will always be the empty string. + DistinguisherMethod *FlowDistinguisherMethodV1Beta1 `field:"optional" json:"distinguisherMethod" yaml:"distinguisherMethod"` + // `matchingPrecedence` is used to choose among the FlowSchemas that match a given request. + // + // The chosen FlowSchema is among those with the numerically lowest (which we take to be logically highest) MatchingPrecedence. Each MatchingPrecedence value must be ranged in [1,10000]. Note that if the precedence is not specified, it will be set to 1000 as default. + MatchingPrecedence *float64 `field:"optional" json:"matchingPrecedence" yaml:"matchingPrecedence"` + // `rules` describes which requests will match this flow schema. + // + // This FlowSchema matches a request if and only if at least one member of rules matches the request. if it is an empty slice, there will be no requests matching the FlowSchema. + Rules *[]*PolicyRulesWithSubjectsV1Beta1 `field:"optional" json:"rules" yaml:"rules"` +} + +// ForZone provides information about which zones should consume this endpoint. +type ForZone struct { + // name represents the name of the zone. + Name *string `field:"required" json:"name" yaml:"name"` +} + +// ForZone provides information about which zones should consume this endpoint. +type ForZoneV1Beta1 struct { + // name represents the name of the zone. + Name *string `field:"required" json:"name" yaml:"name"` +} + +// FSGroupStrategyOptions defines the strategy type and options used to create the strategy. +type FsGroupStrategyOptionsV1Beta1 struct { + // ranges are the allowed ranges of fs groups. + // + // If you would like to force a single fs group then supply a single range with the same start and end. Required for MustRunAs. + Ranges *[]*IdRangeV1Beta1 `field:"optional" json:"ranges" yaml:"ranges"` + // rule is the strategy that will dictate what FSGroup is used in the SecurityContext. + Rule *string `field:"optional" json:"rule" yaml:"rule"` +} + +// Represents a Persistent Disk resource in Google Compute Engine. +// +// A GCE PD must exist before mounting to a container. The disk must also be in the same GCE project and zone as the kubelet. A GCE PD can only be mounted as read/write once or read-only many times. GCE PDs support ownership management and SELinux relabeling. +type GcePersistentDiskVolumeSource struct { + // Unique name of the PD resource in GCE. + // + // Used to identify the disk in GCE. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk + PdName *string `field:"required" json:"pdName" yaml:"pdName"` + // Filesystem type of the volume that you want to mount. + // + // Tip: Ensure that the filesystem type is supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk + FsType *string `field:"optional" json:"fsType" yaml:"fsType"` + // The partition in the volume that you want to mount. + // + // If omitted, the default is to mount by volume name. Examples: For volume /dev/sda1, you specify the partition as "1". Similarly, the volume partition for /dev/sda is "0" (or you can leave the property empty). More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk + Partition *float64 `field:"optional" json:"partition" yaml:"partition"` + // ReadOnly here will force the ReadOnly setting in VolumeMounts. + // + // Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk + ReadOnly *bool `field:"optional" json:"readOnly" yaml:"readOnly"` +} + +// Represents a volume that is populated with the contents of a git repository. +// +// Git repo volumes do not support ownership management. Git repo volumes support SELinux relabeling. +// +// DEPRECATED: GitRepo is deprecated. To provision a container with a git repo, mount an EmptyDir into an InitContainer that clones the repo using git, then mount the EmptyDir into the Pod's container. +type GitRepoVolumeSource struct { + // Repository URL. + Repository *string `field:"required" json:"repository" yaml:"repository"` + // Target directory name. + // + // Must not contain or start with '..'. If '.' is supplied, the volume directory will be the git repository. Otherwise, if specified, the volume will contain the git repository in the subdirectory with the given name. + Directory *string `field:"optional" json:"directory" yaml:"directory"` + // Commit hash for the specified revision. + Revision *string `field:"optional" json:"revision" yaml:"revision"` +} + +// Represents a Glusterfs mount that lasts the lifetime of a pod. +// +// Glusterfs volumes do not support ownership management or SELinux relabeling. +type GlusterfsPersistentVolumeSource struct { + // EndpointsName is the endpoint name that details Glusterfs topology. + // + // More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod + Endpoints *string `field:"required" json:"endpoints" yaml:"endpoints"` + // Path is the Glusterfs volume path. + // + // More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod + Path *string `field:"required" json:"path" yaml:"path"` + // EndpointsNamespace is the namespace that contains Glusterfs endpoint. + // + // If this field is empty, the EndpointNamespace defaults to the same namespace as the bound PVC. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod + EndpointsNamespace *string `field:"optional" json:"endpointsNamespace" yaml:"endpointsNamespace"` + // ReadOnly here will force the Glusterfs volume to be mounted with read-only permissions. + // + // Defaults to false. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod + ReadOnly *bool `field:"optional" json:"readOnly" yaml:"readOnly"` +} + +// Represents a Glusterfs mount that lasts the lifetime of a pod. +// +// Glusterfs volumes do not support ownership management or SELinux relabeling. +type GlusterfsVolumeSource struct { + // EndpointsName is the endpoint name that details Glusterfs topology. + // + // More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod + Endpoints *string `field:"required" json:"endpoints" yaml:"endpoints"` + // Path is the Glusterfs volume path. + // + // More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod + Path *string `field:"required" json:"path" yaml:"path"` + // ReadOnly here will force the Glusterfs volume to be mounted with read-only permissions. + // + // Defaults to false. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod + ReadOnly *bool `field:"optional" json:"readOnly" yaml:"readOnly"` +} + +// GroupSubject holds detailed information for group-kind subject. +type GroupSubjectV1Beta1 struct { + // name is the user group that matches, or "*" to match all user groups. + // + // See https://github.com/kubernetes/apiserver/blob/master/pkg/authentication/user/user.go for some well-known group names. Required. + Name *string `field:"required" json:"name" yaml:"name"` +} + +// Handler defines a specific action that should be taken. +type Handler struct { + // One and only one of the following should be specified. + // + // Exec specifies the action to take. + Exec *ExecAction `field:"optional" json:"exec" yaml:"exec"` + // HTTPGet specifies the http request to perform. + HttpGet *HttpGetAction `field:"optional" json:"httpGet" yaml:"httpGet"` + // TCPSocket specifies an action involving a TCP port. + // + // TCP hooks not yet supported. + TcpSocket *TcpSocketAction `field:"optional" json:"tcpSocket" yaml:"tcpSocket"` +} + +// HorizontalPodAutoscalerBehavior configures the scaling behavior of the target in both Up and Down directions (scaleUp and scaleDown fields respectively). +type HorizontalPodAutoscalerBehaviorV2Beta2 struct { + // scaleDown is scaling policy for scaling Down. + // + // If not set, the default value is to allow to scale down to minReplicas pods, with a 300 second stabilization window (i.e., the highest recommendation for the last 300sec is used). + ScaleDown *HpaScalingRulesV2Beta2 `field:"optional" json:"scaleDown" yaml:"scaleDown"` + // scaleUp is scaling policy for scaling Up. + // + // If not set, the default value is the higher of: + // * increase no more than 4 pods per 60 seconds + // * double the number of pods per 60 seconds + // No stabilization is used. + ScaleUp *HpaScalingRulesV2Beta2 `field:"optional" json:"scaleUp" yaml:"scaleUp"` +} + +// specification of a horizontal pod autoscaler. +type HorizontalPodAutoscalerSpec struct { + // upper limit for the number of pods that can be set by the autoscaler; + // + // cannot be smaller than MinReplicas. + MaxReplicas *float64 `field:"required" json:"maxReplicas" yaml:"maxReplicas"` + // reference to scaled resource; + // + // horizontal pod autoscaler will learn the current resource consumption and will set the desired number of pods by using its Scale subresource. + ScaleTargetRef *CrossVersionObjectReference `field:"required" json:"scaleTargetRef" yaml:"scaleTargetRef"` + // minReplicas is the lower limit for the number of replicas to which the autoscaler can scale down. + // + // It defaults to 1 pod. minReplicas is allowed to be 0 if the alpha feature gate HPAScaleToZero is enabled and at least one Object or External metric is configured. Scaling is active as long as at least one metric value is available. + MinReplicas *float64 `field:"optional" json:"minReplicas" yaml:"minReplicas"` + // target average CPU utilization (represented as a percentage of requested CPU) over all the pods; + // + // if not specified the default autoscaling policy will be used. + TargetCpuUtilizationPercentage *float64 `field:"optional" json:"targetCpuUtilizationPercentage" yaml:"targetCpuUtilizationPercentage"` +} + +// HorizontalPodAutoscalerSpec describes the desired functionality of the HorizontalPodAutoscaler. +type HorizontalPodAutoscalerSpecV2Beta1 struct { + // maxReplicas is the upper limit for the number of replicas to which the autoscaler can scale up. + // + // It cannot be less that minReplicas. + MaxReplicas *float64 `field:"required" json:"maxReplicas" yaml:"maxReplicas"` + // scaleTargetRef points to the target resource to scale, and is used to the pods for which metrics should be collected, as well as to actually change the replica count. + ScaleTargetRef *CrossVersionObjectReferenceV2Beta1 `field:"required" json:"scaleTargetRef" yaml:"scaleTargetRef"` + // metrics contains the specifications for which to use to calculate the desired replica count (the maximum replica count across all metrics will be used). + // + // The desired replica count is calculated multiplying the ratio between the target value and the current value by the current number of pods. Ergo, metrics used must decrease as the pod count is increased, and vice-versa. See the individual metric source types for more information about how each type of metric must respond. + Metrics *[]*MetricSpecV2Beta1 `field:"optional" json:"metrics" yaml:"metrics"` + // minReplicas is the lower limit for the number of replicas to which the autoscaler can scale down. + // + // It defaults to 1 pod. minReplicas is allowed to be 0 if the alpha feature gate HPAScaleToZero is enabled and at least one Object or External metric is configured. Scaling is active as long as at least one metric value is available. + MinReplicas *float64 `field:"optional" json:"minReplicas" yaml:"minReplicas"` +} + +// HorizontalPodAutoscalerSpec describes the desired functionality of the HorizontalPodAutoscaler. +type HorizontalPodAutoscalerSpecV2Beta2 struct { + // maxReplicas is the upper limit for the number of replicas to which the autoscaler can scale up. + // + // It cannot be less that minReplicas. + MaxReplicas *float64 `field:"required" json:"maxReplicas" yaml:"maxReplicas"` + // scaleTargetRef points to the target resource to scale, and is used to the pods for which metrics should be collected, as well as to actually change the replica count. + ScaleTargetRef *CrossVersionObjectReferenceV2Beta2 `field:"required" json:"scaleTargetRef" yaml:"scaleTargetRef"` + // behavior configures the scaling behavior of the target in both Up and Down directions (scaleUp and scaleDown fields respectively). + // + // If not set, the default HPAScalingRules for scale up and scale down are used. + Behavior *HorizontalPodAutoscalerBehaviorV2Beta2 `field:"optional" json:"behavior" yaml:"behavior"` + // metrics contains the specifications for which to use to calculate the desired replica count (the maximum replica count across all metrics will be used). + // + // The desired replica count is calculated multiplying the ratio between the target value and the current value by the current number of pods. Ergo, metrics used must decrease as the pod count is increased, and vice-versa. See the individual metric source types for more information about how each type of metric must respond. If not set, the default metric will be set to 80% average CPU utilization. + Metrics *[]*MetricSpecV2Beta2 `field:"optional" json:"metrics" yaml:"metrics"` + // minReplicas is the lower limit for the number of replicas to which the autoscaler can scale down. + // + // It defaults to 1 pod. minReplicas is allowed to be 0 if the alpha feature gate HPAScaleToZero is enabled and at least one Object or External metric is configured. Scaling is active as long as at least one metric value is available. + MinReplicas *float64 `field:"optional" json:"minReplicas" yaml:"minReplicas"` +} + +// HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the pod's hosts file. +type HostAlias struct { + // Hostnames for the above IP address. + Hostnames *[]*string `field:"optional" json:"hostnames" yaml:"hostnames"` + // IP address of the host file entry. + Ip *string `field:"optional" json:"ip" yaml:"ip"` +} + +// Represents a host path mapped into a pod. +// +// Host path volumes do not support ownership management or SELinux relabeling. +type HostPathVolumeSource struct { + // Path of the directory on the host. + // + // If the path is a symlink, it will follow the link to the real path. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath + Path *string `field:"required" json:"path" yaml:"path"` + // Type for HostPath Volume Defaults to "" More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath. + Type *string `field:"optional" json:"type" yaml:"type"` +} + +// HostPortRange defines a range of host ports that will be enabled by a policy for pods to use. +// +// It requires both the start and end to be defined. +type HostPortRangeV1Beta1 struct { + // max is the end of the range, inclusive. + Max *float64 `field:"required" json:"max" yaml:"max"` + // min is the start of the range, inclusive. + Min *float64 `field:"required" json:"min" yaml:"min"` +} + +// HPAScalingPolicy is a single policy which must hold true for a specified past interval. +type HpaScalingPolicyV2Beta2 struct { + // PeriodSeconds specifies the window of time for which the policy should hold true. + // + // PeriodSeconds must be greater than zero and less than or equal to 1800 (30 min). + PeriodSeconds *float64 `field:"required" json:"periodSeconds" yaml:"periodSeconds"` + // Type is used to specify the scaling policy. + Type *string `field:"required" json:"type" yaml:"type"` + // Value contains the amount of change which is permitted by the policy. + // + // It must be greater than zero. + Value *float64 `field:"required" json:"value" yaml:"value"` +} + +// HPAScalingRules configures the scaling behavior for one direction. +// +// These Rules are applied after calculating DesiredReplicas from metrics for the HPA. They can limit the scaling velocity by specifying scaling policies. They can prevent flapping by specifying the stabilization window, so that the number of replicas is not set instantly, instead, the safest value from the stabilization window is chosen. +type HpaScalingRulesV2Beta2 struct { + // policies is a list of potential scaling polices which can be used during scaling. + // + // At least one policy must be specified, otherwise the HPAScalingRules will be discarded as invalid. + Policies *[]*HpaScalingPolicyV2Beta2 `field:"optional" json:"policies" yaml:"policies"` + // selectPolicy is used to specify which policy should be used. + // + // If not set, the default value MaxPolicySelect is used. + SelectPolicy *string `field:"optional" json:"selectPolicy" yaml:"selectPolicy"` + // StabilizationWindowSeconds is the number of seconds for which past recommendations should be considered while scaling up or scaling down. + // + // StabilizationWindowSeconds must be greater than or equal to zero and less than or equal to 3600 (one hour). If not set, use the default values: - For scale up: 0 (i.e. no stabilization is done). - For scale down: 300 (i.e. the stabilization window is 300 seconds long). + StabilizationWindowSeconds *float64 `field:"optional" json:"stabilizationWindowSeconds" yaml:"stabilizationWindowSeconds"` +} + +// HTTPGetAction describes an action based on HTTP Get requests. +type HttpGetAction struct { + // Name or number of the port to access on the container. + // + // Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + Port IntOrString `field:"required" json:"port" yaml:"port"` + // Host name to connect to, defaults to the pod IP. + // + // You probably want to set "Host" in httpHeaders instead. + Host *string `field:"optional" json:"host" yaml:"host"` + // Custom headers to set in the request. + // + // HTTP allows repeated headers. + HttpHeaders *[]*HttpHeader `field:"optional" json:"httpHeaders" yaml:"httpHeaders"` + // Path to access on the HTTP server. + Path *string `field:"optional" json:"path" yaml:"path"` + // Scheme to use for connecting to the host. + // + // Defaults to HTTP. + Scheme *string `field:"optional" json:"scheme" yaml:"scheme"` +} + +// HTTPHeader describes a custom header to be used in HTTP probes. +type HttpHeader struct { + // The header field name. + Name *string `field:"required" json:"name" yaml:"name"` + // The header field value. + Value *string `field:"required" json:"value" yaml:"value"` +} + +// HTTPIngressPath associates a path with a backend. +// +// Incoming urls matching the path are forwarded to the backend. +type HttpIngressPath struct { + // Backend defines the referenced service endpoint to which the traffic will be forwarded to. + Backend *IngressBackend `field:"required" json:"backend" yaml:"backend"` + // PathType determines the interpretation of the Path matching. + // + // PathType can be one of the following values: * Exact: Matches the URL path exactly. * Prefix: Matches based on a URL path prefix split by '/'. Matching is + // done on a path element by element basis. A path element refers is the + // list of labels in the path split by the '/' separator. A request is a + // match for path p if every p is an element-wise prefix of p of the + // request path. Note that if the last element of the path is a substring + // of the last element in request path, it is not a match (e.g. /foo/bar + // matches /foo/bar/baz, but does not match /foo/barbaz). + // * ImplementationSpecific: Interpretation of the Path matching is up to + // the IngressClass. Implementations can treat this as a separate PathType + // or treat it identically to Prefix or Exact path types. + // Implementations are required to support all path types. + PathType *string `field:"required" json:"pathType" yaml:"pathType"` + // Path is matched against the path of an incoming request. + // + // Currently it can contain characters disallowed from the conventional "path" part of a URL as defined by RFC 3986. Paths must begin with a '/' and must be present when using PathType with value "Exact" or "Prefix". + Path *string `field:"optional" json:"path" yaml:"path"` +} + +// HTTPIngressRuleValue is a list of http selectors pointing to backends. +// +// In the example: http:///? -> backend where where parts of the url correspond to RFC 3986, this resource will be used to match against everything after the last '/' and before the first '?' or '#'. +type HttpIngressRuleValue struct { + // A collection of paths that map requests to backends. + Paths *[]*HttpIngressPath `field:"required" json:"paths" yaml:"paths"` +} + +// IDRange provides a min/max of an allowed range of IDs. +type IdRangeV1Beta1 struct { + // max is the end of the range, inclusive. + Max *float64 `field:"required" json:"max" yaml:"max"` + // min is the start of the range, inclusive. + Min *float64 `field:"required" json:"min" yaml:"min"` +} + +// IngressBackend describes all endpoints for a given service and port. +type IngressBackend struct { + // Resource is an ObjectRef to another Kubernetes resource in the namespace of the Ingress object. + // + // If resource is specified, a service.Name and service.Port must not be specified. This is a mutually exclusive setting with "Service". + Resource *TypedLocalObjectReference `field:"optional" json:"resource" yaml:"resource"` + // Service references a Service as a Backend. + // + // This is a mutually exclusive setting with "Resource". + Service *IngressServiceBackend `field:"optional" json:"service" yaml:"service"` +} + +// IngressClassParametersReference identifies an API object. +// +// This can be used to specify a cluster or namespace-scoped resource. +type IngressClassParametersReference struct { + // Kind is the type of resource being referenced. + Kind *string `field:"required" json:"kind" yaml:"kind"` + // Name is the name of resource being referenced. + Name *string `field:"required" json:"name" yaml:"name"` + // APIGroup is the group for the resource being referenced. + // + // If APIGroup is not specified, the specified Kind must be in the core API group. For any other third-party types, APIGroup is required. + ApiGroup *string `field:"optional" json:"apiGroup" yaml:"apiGroup"` + // Namespace is the namespace of the resource being referenced. + // + // This field is required when scope is set to "Namespace" and must be unset when scope is set to "Cluster". + Namespace *string `field:"optional" json:"namespace" yaml:"namespace"` + // Scope represents if this refers to a cluster or namespace scoped resource. + // + // This may be set to "Cluster" (default) or "Namespace". Field can be enabled with IngressClassNamespacedParams feature gate. + Scope *string `field:"optional" json:"scope" yaml:"scope"` +} + +// IngressClassSpec provides information about the class of an Ingress. +type IngressClassSpec struct { + // Controller refers to the name of the controller that should handle this class. + // + // This allows for different "flavors" that are controlled by the same controller. For example, you may have different Parameters for the same implementing controller. This should be specified as a domain-prefixed path no more than 250 characters in length, e.g. "acme.io/ingress-controller". This field is immutable. + Controller *string `field:"optional" json:"controller" yaml:"controller"` + // Parameters is a link to a custom resource containing additional configuration for the controller. + // + // This is optional if the controller does not require extra parameters. + Parameters *IngressClassParametersReference `field:"optional" json:"parameters" yaml:"parameters"` +} + +// IngressRule represents the rules mapping the paths under a specified host to the related backend services. +// +// Incoming requests are first evaluated for a host match, then routed to the backend associated with the matching IngressRuleValue. +type IngressRule struct { + // Host is the fully qualified domain name of a network host, as defined by RFC 3986. + // + // Note the following deviations from the "host" part of the URI as defined in RFC 3986: 1. IPs are not allowed. Currently an IngressRuleValue can only apply to + // the IP in the Spec of the parent Ingress. + // 2. The `:` delimiter is not respected because ports are not allowed. + // Currently the port of an Ingress is implicitly :80 for http and + // :443 for https. + // Both these may change in the future. Incoming requests are matched against the host before the IngressRuleValue. If the host is unspecified, the Ingress routes all traffic based on the specified IngressRuleValue. + // + // Host can be "precise" which is a domain name without the terminating dot of a network host (e.g. "foo.bar.com") or "wildcard", which is a domain name prefixed with a single wildcard label (e.g. "*.foo.com"). The wildcard character '*' must appear by itself as the first DNS label and matches only a single label. You cannot have a wildcard label by itself (e.g. Host == "*"). Requests will be matched against the Host field in the following way: 1. If Host is precise, the request matches this rule if the http host header is equal to Host. 2. If Host is a wildcard, then the request matches this rule if the http host header is to equal to the suffix (removing the first label) of the wildcard rule. + Host *string `field:"optional" json:"host" yaml:"host"` + Http *HttpIngressRuleValue `field:"optional" json:"http" yaml:"http"` +} + +// IngressServiceBackend references a Kubernetes Service as a Backend. +type IngressServiceBackend struct { + // Name is the referenced service. + // + // The service must exist in the same namespace as the Ingress object. + Name *string `field:"required" json:"name" yaml:"name"` + // Port of the referenced service. + // + // A port name or port number is required for a IngressServiceBackend. + Port *ServiceBackendPort `field:"optional" json:"port" yaml:"port"` +} + +// IngressSpec describes the Ingress the user wishes to exist. +type IngressSpec struct { + // DefaultBackend is the backend that should handle requests that don't match any rule. + // + // If Rules are not specified, DefaultBackend must be specified. If DefaultBackend is not set, the handling of requests that do not match any of the rules will be up to the Ingress controller. + DefaultBackend *IngressBackend `field:"optional" json:"defaultBackend" yaml:"defaultBackend"` + // IngressClassName is the name of the IngressClass cluster resource. + // + // The associated IngressClass defines which controller will implement the resource. This replaces the deprecated `kubernetes.io/ingress.class` annotation. For backwards compatibility, when that annotation is set, it must be given precedence over this field. The controller may emit a warning if the field and annotation have different values. Implementations of this API should ignore Ingresses without a class specified. An IngressClass resource may be marked as default, which can be used to set a default value for this field. For more information, refer to the IngressClass documentation. + IngressClassName *string `field:"optional" json:"ingressClassName" yaml:"ingressClassName"` + // A list of host rules used to configure the Ingress. + // + // If unspecified, or no rule matches, all traffic is sent to the default backend. + Rules *[]*IngressRule `field:"optional" json:"rules" yaml:"rules"` + // TLS configuration. + // + // Currently the Ingress only supports a single TLS port, 443. If multiple members of this list specify different hosts, they will be multiplexed on the same port according to the hostname specified through the SNI TLS extension, if the ingress controller fulfilling the ingress supports SNI. + Tls *[]*IngressTls `field:"optional" json:"tls" yaml:"tls"` +} + +// IngressTLS describes the transport layer security associated with an Ingress. +type IngressTls struct { + // Hosts are a list of hosts included in the TLS certificate. + // + // The values in this list must match the name/s used in the tlsSecret. Defaults to the wildcard host setting for the loadbalancer controller fulfilling this Ingress, if left unspecified. + Hosts *[]*string `field:"optional" json:"hosts" yaml:"hosts"` + // SecretName is the name of the secret used to terminate TLS traffic on port 443. + // + // Field is left optional to allow TLS routing based on SNI hostname alone. If the SNI host in a listener conflicts with the "Host" header field used by an IngressRule, the SNI host is used for termination and value of the Host header is used for routing. + SecretName *string `field:"optional" json:"secretName" yaml:"secretName"` +} + +type IntOrString interface { + Value() interface{} +} + +// The jsii proxy struct for IntOrString +type jsiiProxy_IntOrString struct { + _ byte // padding +} + +func (j *jsiiProxy_IntOrString) Value() interface{} { + var returns interface{} + _jsii_.Get( + j, + "value", + &returns, + ) + return returns +} + +func IntOrString_FromNumber(value *float64) IntOrString { + _init_.Initialize() + + var returns IntOrString + + _jsii_.StaticInvoke( + "k8s.IntOrString", + "fromNumber", + []interface{}{value}, + &returns, + ) + + return returns +} + +func IntOrString_FromString(value *string) IntOrString { + _init_.Initialize() + + var returns IntOrString + + _jsii_.StaticInvoke( + "k8s.IntOrString", + "fromString", + []interface{}{value}, + &returns, + ) + + return returns +} + +// Kind is a string value representing the REST resource this object represents. +// +// Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds +type IoK8SApimachineryPkgApisMetaV1DeleteOptionsKind string + +const ( + // DeleteOptions. + IoK8SApimachineryPkgApisMetaV1DeleteOptionsKind_DELETE_OPTIONS IoK8SApimachineryPkgApisMetaV1DeleteOptionsKind = "DELETE_OPTIONS" +) + +// IPBlock describes a particular CIDR (Ex. +// +// "192.168.1.1/24","2001:db9::/64") that is allowed to the pods matched by a NetworkPolicySpec's podSelector. The except entry describes CIDRs that should not be included within this rule. +type IpBlock struct { + // CIDR is a string representing the IP Block Valid examples are "192.168.1.1/24" or "2001:db9::/64". + Cidr *string `field:"required" json:"cidr" yaml:"cidr"` + // Except is a slice of CIDRs that should not be included within an IP Block Valid examples are "192.168.1.1/24" or "2001:db9::/64" Except values will be rejected if they are outside the CIDR range. + Except *[]*string `field:"optional" json:"except" yaml:"except"` +} + +// ISCSIPersistentVolumeSource represents an ISCSI disk. +// +// ISCSI volumes can only be mounted as read/write once. ISCSI volumes support ownership management and SELinux relabeling. +type IscsiPersistentVolumeSource struct { + // Target iSCSI Qualified Name. + Iqn *string `field:"required" json:"iqn" yaml:"iqn"` + // iSCSI Target Lun number. + Lun *float64 `field:"required" json:"lun" yaml:"lun"` + // iSCSI Target Portal. + // + // The Portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260). + TargetPortal *string `field:"required" json:"targetPortal" yaml:"targetPortal"` + // whether support iSCSI Discovery CHAP authentication. + ChapAuthDiscovery *bool `field:"optional" json:"chapAuthDiscovery" yaml:"chapAuthDiscovery"` + // whether support iSCSI Session CHAP authentication. + ChapAuthSession *bool `field:"optional" json:"chapAuthSession" yaml:"chapAuthSession"` + // Filesystem type of the volume that you want to mount. + // + // Tip: Ensure that the filesystem type is supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#iscsi + FsType *string `field:"optional" json:"fsType" yaml:"fsType"` + // Custom iSCSI Initiator Name. + // + // If initiatorName is specified with iscsiInterface simultaneously, new iSCSI interface : will be created for the connection. + InitiatorName *string `field:"optional" json:"initiatorName" yaml:"initiatorName"` + // iSCSI Interface Name that uses an iSCSI transport. + // + // Defaults to 'default' (tcp). + IscsiInterface *string `field:"optional" json:"iscsiInterface" yaml:"iscsiInterface"` + // iSCSI Target Portal List. + // + // The Portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260). + Portals *[]*string `field:"optional" json:"portals" yaml:"portals"` + // ReadOnly here will force the ReadOnly setting in VolumeMounts. + // + // Defaults to false. + ReadOnly *bool `field:"optional" json:"readOnly" yaml:"readOnly"` + // CHAP Secret for iSCSI target and initiator authentication. + SecretRef *SecretReference `field:"optional" json:"secretRef" yaml:"secretRef"` +} + +// Represents an ISCSI disk. +// +// ISCSI volumes can only be mounted as read/write once. ISCSI volumes support ownership management and SELinux relabeling. +type IscsiVolumeSource struct { + // Target iSCSI Qualified Name. + Iqn *string `field:"required" json:"iqn" yaml:"iqn"` + // iSCSI Target Lun number. + Lun *float64 `field:"required" json:"lun" yaml:"lun"` + // iSCSI Target Portal. + // + // The Portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260). + TargetPortal *string `field:"required" json:"targetPortal" yaml:"targetPortal"` + // whether support iSCSI Discovery CHAP authentication. + ChapAuthDiscovery *bool `field:"optional" json:"chapAuthDiscovery" yaml:"chapAuthDiscovery"` + // whether support iSCSI Session CHAP authentication. + ChapAuthSession *bool `field:"optional" json:"chapAuthSession" yaml:"chapAuthSession"` + // Filesystem type of the volume that you want to mount. + // + // Tip: Ensure that the filesystem type is supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#iscsi + FsType *string `field:"optional" json:"fsType" yaml:"fsType"` + // Custom iSCSI Initiator Name. + // + // If initiatorName is specified with iscsiInterface simultaneously, new iSCSI interface : will be created for the connection. + InitiatorName *string `field:"optional" json:"initiatorName" yaml:"initiatorName"` + // iSCSI Interface Name that uses an iSCSI transport. + // + // Defaults to 'default' (tcp). + IscsiInterface *string `field:"optional" json:"iscsiInterface" yaml:"iscsiInterface"` + // iSCSI Target Portal List. + // + // The portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260). + Portals *[]*string `field:"optional" json:"portals" yaml:"portals"` + // ReadOnly here will force the ReadOnly setting in VolumeMounts. + // + // Defaults to false. + ReadOnly *bool `field:"optional" json:"readOnly" yaml:"readOnly"` + // CHAP Secret for iSCSI target and initiator authentication. + SecretRef *LocalObjectReference `field:"optional" json:"secretRef" yaml:"secretRef"` +} + +// JobSpec describes how the job execution will look like. +type JobSpec struct { + // Describes the pod that will be created when executing a job. + // + // More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ + Template *PodTemplateSpec `field:"required" json:"template" yaml:"template"` + // Specifies the duration in seconds relative to the startTime that the job may be continuously active before the system tries to terminate it; + // + // value must be positive integer. If a Job is suspended (at creation or through an update), this timer will effectively be stopped and reset when the Job is resumed again. + ActiveDeadlineSeconds *float64 `field:"optional" json:"activeDeadlineSeconds" yaml:"activeDeadlineSeconds"` + // Specifies the number of retries before marking this job failed. + // + // Defaults to 6. + BackoffLimit *float64 `field:"optional" json:"backoffLimit" yaml:"backoffLimit"` + // CompletionMode specifies how Pod completions are tracked. It can be `NonIndexed` (default) or `Indexed`. + // + // `NonIndexed` means that the Job is considered complete when there have been .spec.completions successfully completed Pods. Each Pod completion is homologous to each other. + // + // `Indexed` means that the Pods of a Job get an associated completion index from 0 to (.spec.completions - 1), available in the annotation batch.kubernetes.io/job-completion-index. The Job is considered complete when there is one successfully completed Pod for each index. When value is `Indexed`, .spec.completions must be specified and `.spec.parallelism` must be less than or equal to 10^5. In addition, The Pod name takes the form `$(job-name)-$(index)-$(random-string)`, the Pod hostname takes the form `$(job-name)-$(index)`. + // + // This field is beta-level. More completion modes can be added in the future. If the Job controller observes a mode that it doesn't recognize, the controller skips updates for the Job. + CompletionMode *string `field:"optional" json:"completionMode" yaml:"completionMode"` + // Specifies the desired number of successfully finished pods the job should be run with. + // + // Setting to nil means that the success of any pod signals the success of all pods, and allows parallelism to have any positive value. Setting to 1 means that parallelism is limited to 1 and the success of that pod signals the success of the job. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ + Completions *float64 `field:"optional" json:"completions" yaml:"completions"` + // manualSelector controls generation of pod labels and pod selectors. + // + // Leave `manualSelector` unset unless you are certain what you are doing. When false or unset, the system pick labels unique to this job and appends those labels to the pod template. When true, the user is responsible for picking unique labels and specifying the selector. Failure to pick a unique label may cause this and other jobs to not function correctly. However, You may see `manualSelector=true` in jobs that were created with the old `extensions/v1beta1` API. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/#specifying-your-own-pod-selector + ManualSelector *bool `field:"optional" json:"manualSelector" yaml:"manualSelector"` + // Specifies the maximum desired number of pods the job should run at any given time. + // + // The actual number of pods running in steady state will be less than this number when ((.spec.completions - .status.successful) < .spec.parallelism), i.e. when the work left to do is less than max parallelism. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ + Parallelism *float64 `field:"optional" json:"parallelism" yaml:"parallelism"` + // A label query over pods that should match the pod count. + // + // Normally, the system sets this field for you. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors + Selector *LabelSelector `field:"optional" json:"selector" yaml:"selector"` + // Suspend specifies whether the Job controller should create Pods or not. + // + // If a Job is created with suspend set to true, no Pods are created by the Job controller. If a Job is suspended after creation (i.e. the flag goes from false to true), the Job controller will delete all active Pods associated with this Job. Users must design their workload to gracefully handle this. Suspending a Job will reset the StartTime field of the Job, effectively resetting the ActiveDeadlineSeconds timer too. Defaults to false. + // + // This field is beta-level, gated by SuspendJob feature flag (enabled by default). + Suspend *bool `field:"optional" json:"suspend" yaml:"suspend"` + // ttlSecondsAfterFinished limits the lifetime of a Job that has finished execution (either Complete or Failed). + // + // If this field is set, ttlSecondsAfterFinished after the Job finishes, it is eligible to be automatically deleted. When the Job is being deleted, its lifecycle guarantees (e.g. finalizers) will be honored. If this field is unset, the Job won't be automatically deleted. If this field is set to zero, the Job becomes eligible to be deleted immediately after it finishes. This field is alpha-level and is only honored by servers that enable the TTLAfterFinished feature. + TtlSecondsAfterFinished *float64 `field:"optional" json:"ttlSecondsAfterFinished" yaml:"ttlSecondsAfterFinished"` +} + +// JobTemplateSpec describes the data a Job should have when created from a template. +type JobTemplateSpec struct { + // Standard object's metadata of the jobs created from this template. + // + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + Metadata *ObjectMeta `field:"optional" json:"metadata" yaml:"metadata"` + // Specification of the desired behavior of the job. + // + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + Spec *JobSpec `field:"optional" json:"spec" yaml:"spec"` +} + +// JobTemplateSpec describes the data a Job should have when created from a template. +type JobTemplateSpecV1Beta1 struct { + // Standard object's metadata of the jobs created from this template. + // + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + Metadata *ObjectMeta `field:"optional" json:"metadata" yaml:"metadata"` + // Specification of the desired behavior of the job. + // + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + Spec *JobSpec `field:"optional" json:"spec" yaml:"spec"` +} + +// JSONSchemaProps is a JSON-Schema following Specification Draft 4 (http://json-schema.org/). +type JsonSchemaProps struct { + AdditionalItems interface{} `field:"optional" json:"additionalItems" yaml:"additionalItems"` + AdditionalProperties interface{} `field:"optional" json:"additionalProperties" yaml:"additionalProperties"` + AllOf *[]*JsonSchemaProps `field:"optional" json:"allOf" yaml:"allOf"` + AnyOf *[]*JsonSchemaProps `field:"optional" json:"anyOf" yaml:"anyOf"` + // default is a default value for undefined object fields. + // + // Defaulting is a beta feature under the CustomResourceDefaulting feature gate. Defaulting requires spec.preserveUnknownFields to be false. + Default interface{} `field:"optional" json:"default" yaml:"default"` + Definitions *map[string]*JsonSchemaProps `field:"optional" json:"definitions" yaml:"definitions"` + Dependencies *map[string]interface{} `field:"optional" json:"dependencies" yaml:"dependencies"` + Description *string `field:"optional" json:"description" yaml:"description"` + Enum *[]interface{} `field:"optional" json:"enum" yaml:"enum"` + Example interface{} `field:"optional" json:"example" yaml:"example"` + ExclusiveMaximum *bool `field:"optional" json:"exclusiveMaximum" yaml:"exclusiveMaximum"` + ExclusiveMinimum *bool `field:"optional" json:"exclusiveMinimum" yaml:"exclusiveMinimum"` + ExternalDocs *ExternalDocumentation `field:"optional" json:"externalDocs" yaml:"externalDocs"` + // format is an OpenAPI v3 format string. Unknown formats are ignored. The following formats are validated:. + // + // - bsonobjectid: a bson object ID, i.e. a 24 characters hex string - uri: an URI as parsed by Golang net/url.ParseRequestURI - email: an email address as parsed by Golang net/mail.ParseAddress - hostname: a valid representation for an Internet host name, as defined by RFC 1034, section 3.1 [RFC1034]. - ipv4: an IPv4 IP as parsed by Golang net.ParseIP - ipv6: an IPv6 IP as parsed by Golang net.ParseIP - cidr: a CIDR as parsed by Golang net.ParseCIDR - mac: a MAC address as parsed by Golang net.ParseMAC - uuid: an UUID that allows uppercase defined by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?[0-9a-f]{4}-?[0-9a-f]{4}-?[0-9a-f]{12}$ - uuid3: an UUID3 that allows uppercase defined by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?3[0-9a-f]{3}-?[0-9a-f]{4}-?[0-9a-f]{12}$ - uuid4: an UUID4 that allows uppercase defined by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?4[0-9a-f]{3}-?[89ab][0-9a-f]{3}-?[0-9a-f]{12}$ - uuid5: an UUID5 that allows uppercase defined by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?5[0-9a-f]{3}-?[89ab][0-9a-f]{3}-?[0-9a-f]{12}$ - isbn: an ISBN10 or ISBN13 number string like "0321751043" or "978-0321751041" - isbn10: an ISBN10 number string like "0321751043" - isbn13: an ISBN13 number string like "978-0321751041" - creditcard: a credit card number defined by the regex ^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\d{3})\d{11})$ with any non digit characters mixed in - ssn: a U.S. social security number following the regex ^\d{3}[- ]?\d{2}[- ]?\d{4}$ - hexcolor: an hexadecimal color code like "#FFFFFF: following the regex ^#?([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$ - rgbcolor: an RGB color code like rgb like "rgb(255,255,2559" - byte: base64 encoded binary data - password: any kind of string - date: a date string like "2006-01-02" as defined by full-date in RFC3339 - duration: a duration string like "22 ns" as parsed by Golang time.ParseDuration or compatible with Scala duration format - datetime: a date time string like "2014-12-15T19:30:20.000Z" as defined by date-time in RFC3339. + Format *string `field:"optional" json:"format" yaml:"format"` + Id *string `field:"optional" json:"id" yaml:"id"` + Items interface{} `field:"optional" json:"items" yaml:"items"` + Maximum *float64 `field:"optional" json:"maximum" yaml:"maximum"` + MaxItems *float64 `field:"optional" json:"maxItems" yaml:"maxItems"` + MaxLength *float64 `field:"optional" json:"maxLength" yaml:"maxLength"` + MaxProperties *float64 `field:"optional" json:"maxProperties" yaml:"maxProperties"` + Minimum *float64 `field:"optional" json:"minimum" yaml:"minimum"` + MinItems *float64 `field:"optional" json:"minItems" yaml:"minItems"` + MinLength *float64 `field:"optional" json:"minLength" yaml:"minLength"` + MinProperties *float64 `field:"optional" json:"minProperties" yaml:"minProperties"` + MultipleOf *float64 `field:"optional" json:"multipleOf" yaml:"multipleOf"` + Not **JsonSchemaProps `field:"optional" json:"not" yaml:"not"` + Nullable *bool `field:"optional" json:"nullable" yaml:"nullable"` + OneOf *[]*JsonSchemaProps `field:"optional" json:"oneOf" yaml:"oneOf"` + Pattern *string `field:"optional" json:"pattern" yaml:"pattern"` + PatternProperties *map[string]*JsonSchemaProps `field:"optional" json:"patternProperties" yaml:"patternProperties"` + Properties *map[string]*JsonSchemaProps `field:"optional" json:"properties" yaml:"properties"` + Ref *string `field:"optional" json:"ref" yaml:"ref"` + Required *[]*string `field:"optional" json:"required" yaml:"required"` + Schema *string `field:"optional" json:"schema" yaml:"schema"` + Title *string `field:"optional" json:"title" yaml:"title"` + Type *string `field:"optional" json:"type" yaml:"type"` + UniqueItems *bool `field:"optional" json:"uniqueItems" yaml:"uniqueItems"` + // x-kubernetes-embedded-resource defines that the value is an embedded Kubernetes runtime.Object, with TypeMeta and ObjectMeta. The type must be object. It is allowed to further restrict the embedded object. kind, apiVersion and metadata are validated automatically. x-kubernetes-preserve-unknown-fields is allowed to be true, but does not have to be if the object is fully specified (up to kind, apiVersion, metadata). + XKubernetesEmbeddedResource *bool `field:"optional" json:"xKubernetesEmbeddedResource" yaml:"xKubernetesEmbeddedResource"` + // x-kubernetes-int-or-string specifies that this value is either an integer or a string. + // + // If this is true, an empty type is allowed and type as child of anyOf is permitted if following one of the following patterns: + // + // 1) anyOf: + // - type: integer + // - type: string + // 2) allOf: + // - anyOf: + // - type: integer + // - type: string + // - ... zero or more + XKubernetesIntOrString *bool `field:"optional" json:"xKubernetesIntOrString" yaml:"xKubernetesIntOrString"` + // x-kubernetes-list-map-keys annotates an array with the x-kubernetes-list-type `map` by specifying the keys used as the index of the map. + // + // This tag MUST only be used on lists that have the "x-kubernetes-list-type" extension set to "map". Also, the values specified for this attribute must be a scalar typed field of the child structure (no nesting is supported). + // + // The properties specified must either be required or have a default value, to ensure those properties are present for all list items. + XKubernetesListMapKeys *[]*string `field:"optional" json:"xKubernetesListMapKeys" yaml:"xKubernetesListMapKeys"` + // x-kubernetes-list-type annotates an array to further describe its topology. + // + // This extension must only be used on lists and may have 3 possible values: + // + // 1) `atomic`: the list is treated as a single entity, like a scalar. + // Atomic lists will be entirely replaced when updated. This extension + // may be used on any type of list (struct, scalar, ...). + // 2) `set`: + // Sets are lists that must not have multiple items with the same value. Each + // value must be a scalar, an object with x-kubernetes-map-type `atomic` or an + // array with x-kubernetes-list-type `atomic`. + // 3) `map`: + // These lists are like maps in that their elements have a non-index key + // used to identify them. Order is preserved upon merge. The map tag + // must only be used on a list with elements of type object. + // Defaults to atomic for arrays. + XKubernetesListType *string `field:"optional" json:"xKubernetesListType" yaml:"xKubernetesListType"` + // x-kubernetes-map-type annotates an object to further describe its topology. + // + // This extension must only be used when type is object and may have 2 possible values: + // + // 1) `granular`: + // These maps are actual maps (key-value pairs) and each fields are independent + // from each other (they can each be manipulated by separate actors). This is + // the default behaviour for all maps. + // 2) `atomic`: the list is treated as a single entity, like a scalar. + // Atomic maps will be entirely replaced when updated. + XKubernetesMapType *string `field:"optional" json:"xKubernetesMapType" yaml:"xKubernetesMapType"` + // x-kubernetes-preserve-unknown-fields stops the API server decoding step from pruning fields which are not specified in the validation schema. + // + // This affects fields recursively, but switches back to normal pruning behaviour if nested properties or additionalProperties are specified in the schema. This can either be true or undefined. False is forbidden. + XKubernetesPreserveUnknownFields *bool `field:"optional" json:"xKubernetesPreserveUnknownFields" yaml:"xKubernetesPreserveUnknownFields"` +} + +// Maps a string key to a path within a volume. +type KeyToPath struct { + // The key to project. + Key *string `field:"required" json:"key" yaml:"key"` + // The relative path of the file to map the key to. + // + // May not be an absolute path. May not contain the path element '..'. May not start with the string '..'. + Path *string `field:"required" json:"path" yaml:"path"` + // Optional: mode bits used to set permissions on this file. + // + // Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set. + Mode *float64 `field:"optional" json:"mode" yaml:"mode"` +} + +// APIService represents a server for a particular GroupVersion. +// +// Name must be "version.group". +type KubeApiService interface { + cdk8s.ApiObject + // The group portion of the API version (e.g. `authorization.k8s.io`). + ApiGroup() *string + // The object's API version (e.g. `authorization.k8s.io/v1`). + ApiVersion() *string + // The chart in which this object is defined. + Chart() cdk8s.Chart + // The object kind. + Kind() *string + // Metadata associated with this API object. + Metadata() cdk8s.ApiObjectMetadataDefinition + // The name of the API object. + // + // If a name is specified in `metadata.name` this will be the name returned. + // Otherwise, a name will be generated by calling + // `AddHelm.of(this).generatedObjectName(this)`, which by default uses the + // construct path to generate a DNS-compatible name for the resource. + Name() *string + // The tree node. + Node() constructs.Node + // Create a dependency between this ApiObject and other constructs. + // + // These can be other ApiObjects, Charts, or custom. + AddDependency(dependencies ...constructs.IConstruct) + // Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. + // + // Example: + // kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true)); + // + AddJsonPatch(ops ...cdk8s.JsonPatch) + // Renders the object to Kubernetes JSON. + ToJson() interface{} + // Returns a string representation of this construct. + ToString() *string +} + +// The jsii proxy struct for KubeApiService +type jsiiProxy_KubeApiService struct { + internal.Type__cdk8sApiObject +} + +func (j *jsiiProxy_KubeApiService) ApiGroup() *string { + var returns *string + _jsii_.Get( + j, + "apiGroup", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeApiService) ApiVersion() *string { + var returns *string + _jsii_.Get( + j, + "apiVersion", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeApiService) Chart() cdk8s.Chart { + var returns cdk8s.Chart + _jsii_.Get( + j, + "chart", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeApiService) Kind() *string { + var returns *string + _jsii_.Get( + j, + "kind", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeApiService) Metadata() cdk8s.ApiObjectMetadataDefinition { + var returns cdk8s.ApiObjectMetadataDefinition + _jsii_.Get( + j, + "metadata", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeApiService) Name() *string { + var returns *string + _jsii_.Get( + j, + "name", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeApiService) Node() constructs.Node { + var returns constructs.Node + _jsii_.Get( + j, + "node", + &returns, + ) + return returns +} + +// Defines a "io.k8s.kube-aggregator.pkg.apis.apiregistration.v1.APIService" API object. +func NewKubeApiService(scope constructs.Construct, id *string, props *KubeApiServiceProps) KubeApiService { + _init_.Initialize() + + j := jsiiProxy_KubeApiService{} + + _jsii_.Create( + "k8s.KubeApiService", + []interface{}{scope, id, props}, + &j, + ) + + return &j +} + +// Defines a "io.k8s.kube-aggregator.pkg.apis.apiregistration.v1.APIService" API object. +func NewKubeApiService_Override(k KubeApiService, scope constructs.Construct, id *string, props *KubeApiServiceProps) { + _init_.Initialize() + + _jsii_.Create( + "k8s.KubeApiService", + []interface{}{scope, id, props}, + k, + ) +} + +// Checks if `x` is a construct. +// +// Use this method instead of `instanceof` to properly detect `Construct` +// instances, even when the construct library is symlinked. +// +// Explanation: in JavaScript, multiple copies of the `constructs` library on +// disk are seen as independent, completely different libraries. As a +// consequence, the class `Construct` in each copy of the `constructs` library +// is seen as a different class, and an instance of one class will not test as +// `instanceof` the other class. `npm install` will not create installations +// like this, but users may manually symlink construct libraries together or +// use a monorepo tool: in those cases, multiple copies of the `constructs` +// library can be accidentally installed, and `instanceof` will behave +// unpredictably. It is safest to avoid using `instanceof`, and using +// this type-testing method instead. +// +// Returns: true if `x` is an object created from a class which extends `Construct`. +func KubeApiService_IsConstruct(x interface{}) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "k8s.KubeApiService", + "isConstruct", + []interface{}{x}, + &returns, + ) + + return returns +} + +// Renders a Kubernetes manifest for "io.k8s.kube-aggregator.pkg.apis.apiregistration.v1.APIService". +// +// This can be used to inline resource manifests inside other objects (e.g. as templates). +func KubeApiService_Manifest(props *KubeApiServiceProps) interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "k8s.KubeApiService", + "manifest", + []interface{}{props}, + &returns, + ) + + return returns +} + +// Returns the `ApiObject` named `Resource` which is a child of the given construct. +// +// If `c` is an `ApiObject`, it is returned directly. Throws an +// exception if the construct does not have a child named `Default` _or_ if +// this child is not an `ApiObject`. +func KubeApiService_Of(c constructs.IConstruct) cdk8s.ApiObject { + _init_.Initialize() + + var returns cdk8s.ApiObject + + _jsii_.StaticInvoke( + "k8s.KubeApiService", + "of", + []interface{}{c}, + &returns, + ) + + return returns +} + +func KubeApiService_GVK() *cdk8s.GroupVersionKind { + _init_.Initialize() + var returns *cdk8s.GroupVersionKind + _jsii_.StaticGet( + "k8s.KubeApiService", + "GVK", + &returns, + ) + return returns +} + +func (k *jsiiProxy_KubeApiService) AddDependency(dependencies ...constructs.IConstruct) { + args := []interface{}{} + for _, a := range dependencies { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addDependency", + args, + ) +} + +func (k *jsiiProxy_KubeApiService) AddJsonPatch(ops ...cdk8s.JsonPatch) { + args := []interface{}{} + for _, a := range ops { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addJsonPatch", + args, + ) +} + +func (k *jsiiProxy_KubeApiService) ToJson() interface{} { + var returns interface{} + + _jsii_.Invoke( + k, + "toJson", + nil, // no parameters + &returns, + ) + + return returns +} + +func (k *jsiiProxy_KubeApiService) ToString() *string { + var returns *string + + _jsii_.Invoke( + k, + "toString", + nil, // no parameters + &returns, + ) + + return returns +} + +// APIServiceList is a list of APIService objects. +type KubeApiServiceList interface { + cdk8s.ApiObject + // The group portion of the API version (e.g. `authorization.k8s.io`). + ApiGroup() *string + // The object's API version (e.g. `authorization.k8s.io/v1`). + ApiVersion() *string + // The chart in which this object is defined. + Chart() cdk8s.Chart + // The object kind. + Kind() *string + // Metadata associated with this API object. + Metadata() cdk8s.ApiObjectMetadataDefinition + // The name of the API object. + // + // If a name is specified in `metadata.name` this will be the name returned. + // Otherwise, a name will be generated by calling + // `AddHelm.of(this).generatedObjectName(this)`, which by default uses the + // construct path to generate a DNS-compatible name for the resource. + Name() *string + // The tree node. + Node() constructs.Node + // Create a dependency between this ApiObject and other constructs. + // + // These can be other ApiObjects, Charts, or custom. + AddDependency(dependencies ...constructs.IConstruct) + // Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. + // + // Example: + // kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true)); + // + AddJsonPatch(ops ...cdk8s.JsonPatch) + // Renders the object to Kubernetes JSON. + ToJson() interface{} + // Returns a string representation of this construct. + ToString() *string +} + +// The jsii proxy struct for KubeApiServiceList +type jsiiProxy_KubeApiServiceList struct { + internal.Type__cdk8sApiObject +} + +func (j *jsiiProxy_KubeApiServiceList) ApiGroup() *string { + var returns *string + _jsii_.Get( + j, + "apiGroup", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeApiServiceList) ApiVersion() *string { + var returns *string + _jsii_.Get( + j, + "apiVersion", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeApiServiceList) Chart() cdk8s.Chart { + var returns cdk8s.Chart + _jsii_.Get( + j, + "chart", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeApiServiceList) Kind() *string { + var returns *string + _jsii_.Get( + j, + "kind", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeApiServiceList) Metadata() cdk8s.ApiObjectMetadataDefinition { + var returns cdk8s.ApiObjectMetadataDefinition + _jsii_.Get( + j, + "metadata", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeApiServiceList) Name() *string { + var returns *string + _jsii_.Get( + j, + "name", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeApiServiceList) Node() constructs.Node { + var returns constructs.Node + _jsii_.Get( + j, + "node", + &returns, + ) + return returns +} + +// Defines a "io.k8s.kube-aggregator.pkg.apis.apiregistration.v1.APIServiceList" API object. +func NewKubeApiServiceList(scope constructs.Construct, id *string, props *KubeApiServiceListProps) KubeApiServiceList { + _init_.Initialize() + + j := jsiiProxy_KubeApiServiceList{} + + _jsii_.Create( + "k8s.KubeApiServiceList", + []interface{}{scope, id, props}, + &j, + ) + + return &j +} + +// Defines a "io.k8s.kube-aggregator.pkg.apis.apiregistration.v1.APIServiceList" API object. +func NewKubeApiServiceList_Override(k KubeApiServiceList, scope constructs.Construct, id *string, props *KubeApiServiceListProps) { + _init_.Initialize() + + _jsii_.Create( + "k8s.KubeApiServiceList", + []interface{}{scope, id, props}, + k, + ) +} + +// Checks if `x` is a construct. +// +// Use this method instead of `instanceof` to properly detect `Construct` +// instances, even when the construct library is symlinked. +// +// Explanation: in JavaScript, multiple copies of the `constructs` library on +// disk are seen as independent, completely different libraries. As a +// consequence, the class `Construct` in each copy of the `constructs` library +// is seen as a different class, and an instance of one class will not test as +// `instanceof` the other class. `npm install` will not create installations +// like this, but users may manually symlink construct libraries together or +// use a monorepo tool: in those cases, multiple copies of the `constructs` +// library can be accidentally installed, and `instanceof` will behave +// unpredictably. It is safest to avoid using `instanceof`, and using +// this type-testing method instead. +// +// Returns: true if `x` is an object created from a class which extends `Construct`. +func KubeApiServiceList_IsConstruct(x interface{}) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "k8s.KubeApiServiceList", + "isConstruct", + []interface{}{x}, + &returns, + ) + + return returns +} + +// Renders a Kubernetes manifest for "io.k8s.kube-aggregator.pkg.apis.apiregistration.v1.APIServiceList". +// +// This can be used to inline resource manifests inside other objects (e.g. as templates). +func KubeApiServiceList_Manifest(props *KubeApiServiceListProps) interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "k8s.KubeApiServiceList", + "manifest", + []interface{}{props}, + &returns, + ) + + return returns +} + +// Returns the `ApiObject` named `Resource` which is a child of the given construct. +// +// If `c` is an `ApiObject`, it is returned directly. Throws an +// exception if the construct does not have a child named `Default` _or_ if +// this child is not an `ApiObject`. +func KubeApiServiceList_Of(c constructs.IConstruct) cdk8s.ApiObject { + _init_.Initialize() + + var returns cdk8s.ApiObject + + _jsii_.StaticInvoke( + "k8s.KubeApiServiceList", + "of", + []interface{}{c}, + &returns, + ) + + return returns +} + +func KubeApiServiceList_GVK() *cdk8s.GroupVersionKind { + _init_.Initialize() + var returns *cdk8s.GroupVersionKind + _jsii_.StaticGet( + "k8s.KubeApiServiceList", + "GVK", + &returns, + ) + return returns +} + +func (k *jsiiProxy_KubeApiServiceList) AddDependency(dependencies ...constructs.IConstruct) { + args := []interface{}{} + for _, a := range dependencies { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addDependency", + args, + ) +} + +func (k *jsiiProxy_KubeApiServiceList) AddJsonPatch(ops ...cdk8s.JsonPatch) { + args := []interface{}{} + for _, a := range ops { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addJsonPatch", + args, + ) +} + +func (k *jsiiProxy_KubeApiServiceList) ToJson() interface{} { + var returns interface{} + + _jsii_.Invoke( + k, + "toJson", + nil, // no parameters + &returns, + ) + + return returns +} + +func (k *jsiiProxy_KubeApiServiceList) ToString() *string { + var returns *string + + _jsii_.Invoke( + k, + "toString", + nil, // no parameters + &returns, + ) + + return returns +} + +// APIServiceList is a list of APIService objects. +type KubeApiServiceListProps struct { + // Items is the list of APIService. + Items *[]*KubeApiServiceProps `field:"required" json:"items" yaml:"items"` + // Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata. + Metadata *ListMeta `field:"optional" json:"metadata" yaml:"metadata"` +} + +// APIService represents a server for a particular GroupVersion. +// +// Name must be "version.group". +type KubeApiServiceProps struct { + // Standard object's metadata. + // + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + Metadata *ObjectMeta `field:"optional" json:"metadata" yaml:"metadata"` + // Spec contains information for locating and communicating with a server. + Spec *ApiServiceSpec `field:"optional" json:"spec" yaml:"spec"` +} + +// Binding ties one object to another; +// +// for example, a pod is bound to a node by a scheduler. Deprecated in 1.7, please use the bindings subresource of pods instead. +type KubeBinding interface { + cdk8s.ApiObject + // The group portion of the API version (e.g. `authorization.k8s.io`). + ApiGroup() *string + // The object's API version (e.g. `authorization.k8s.io/v1`). + ApiVersion() *string + // The chart in which this object is defined. + Chart() cdk8s.Chart + // The object kind. + Kind() *string + // Metadata associated with this API object. + Metadata() cdk8s.ApiObjectMetadataDefinition + // The name of the API object. + // + // If a name is specified in `metadata.name` this will be the name returned. + // Otherwise, a name will be generated by calling + // `AddHelm.of(this).generatedObjectName(this)`, which by default uses the + // construct path to generate a DNS-compatible name for the resource. + Name() *string + // The tree node. + Node() constructs.Node + // Create a dependency between this ApiObject and other constructs. + // + // These can be other ApiObjects, Charts, or custom. + AddDependency(dependencies ...constructs.IConstruct) + // Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. + // + // Example: + // kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true)); + // + AddJsonPatch(ops ...cdk8s.JsonPatch) + // Renders the object to Kubernetes JSON. + ToJson() interface{} + // Returns a string representation of this construct. + ToString() *string +} + +// The jsii proxy struct for KubeBinding +type jsiiProxy_KubeBinding struct { + internal.Type__cdk8sApiObject +} + +func (j *jsiiProxy_KubeBinding) ApiGroup() *string { + var returns *string + _jsii_.Get( + j, + "apiGroup", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeBinding) ApiVersion() *string { + var returns *string + _jsii_.Get( + j, + "apiVersion", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeBinding) Chart() cdk8s.Chart { + var returns cdk8s.Chart + _jsii_.Get( + j, + "chart", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeBinding) Kind() *string { + var returns *string + _jsii_.Get( + j, + "kind", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeBinding) Metadata() cdk8s.ApiObjectMetadataDefinition { + var returns cdk8s.ApiObjectMetadataDefinition + _jsii_.Get( + j, + "metadata", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeBinding) Name() *string { + var returns *string + _jsii_.Get( + j, + "name", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeBinding) Node() constructs.Node { + var returns constructs.Node + _jsii_.Get( + j, + "node", + &returns, + ) + return returns +} + +// Defines a "io.k8s.api.core.v1.Binding" API object. +func NewKubeBinding(scope constructs.Construct, id *string, props *KubeBindingProps) KubeBinding { + _init_.Initialize() + + j := jsiiProxy_KubeBinding{} + + _jsii_.Create( + "k8s.KubeBinding", + []interface{}{scope, id, props}, + &j, + ) + + return &j +} + +// Defines a "io.k8s.api.core.v1.Binding" API object. +func NewKubeBinding_Override(k KubeBinding, scope constructs.Construct, id *string, props *KubeBindingProps) { + _init_.Initialize() + + _jsii_.Create( + "k8s.KubeBinding", + []interface{}{scope, id, props}, + k, + ) +} + +// Checks if `x` is a construct. +// +// Use this method instead of `instanceof` to properly detect `Construct` +// instances, even when the construct library is symlinked. +// +// Explanation: in JavaScript, multiple copies of the `constructs` library on +// disk are seen as independent, completely different libraries. As a +// consequence, the class `Construct` in each copy of the `constructs` library +// is seen as a different class, and an instance of one class will not test as +// `instanceof` the other class. `npm install` will not create installations +// like this, but users may manually symlink construct libraries together or +// use a monorepo tool: in those cases, multiple copies of the `constructs` +// library can be accidentally installed, and `instanceof` will behave +// unpredictably. It is safest to avoid using `instanceof`, and using +// this type-testing method instead. +// +// Returns: true if `x` is an object created from a class which extends `Construct`. +func KubeBinding_IsConstruct(x interface{}) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "k8s.KubeBinding", + "isConstruct", + []interface{}{x}, + &returns, + ) + + return returns +} + +// Renders a Kubernetes manifest for "io.k8s.api.core.v1.Binding". +// +// This can be used to inline resource manifests inside other objects (e.g. as templates). +func KubeBinding_Manifest(props *KubeBindingProps) interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "k8s.KubeBinding", + "manifest", + []interface{}{props}, + &returns, + ) + + return returns +} + +// Returns the `ApiObject` named `Resource` which is a child of the given construct. +// +// If `c` is an `ApiObject`, it is returned directly. Throws an +// exception if the construct does not have a child named `Default` _or_ if +// this child is not an `ApiObject`. +func KubeBinding_Of(c constructs.IConstruct) cdk8s.ApiObject { + _init_.Initialize() + + var returns cdk8s.ApiObject + + _jsii_.StaticInvoke( + "k8s.KubeBinding", + "of", + []interface{}{c}, + &returns, + ) + + return returns +} + +func KubeBinding_GVK() *cdk8s.GroupVersionKind { + _init_.Initialize() + var returns *cdk8s.GroupVersionKind + _jsii_.StaticGet( + "k8s.KubeBinding", + "GVK", + &returns, + ) + return returns +} + +func (k *jsiiProxy_KubeBinding) AddDependency(dependencies ...constructs.IConstruct) { + args := []interface{}{} + for _, a := range dependencies { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addDependency", + args, + ) +} + +func (k *jsiiProxy_KubeBinding) AddJsonPatch(ops ...cdk8s.JsonPatch) { + args := []interface{}{} + for _, a := range ops { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addJsonPatch", + args, + ) +} + +func (k *jsiiProxy_KubeBinding) ToJson() interface{} { + var returns interface{} + + _jsii_.Invoke( + k, + "toJson", + nil, // no parameters + &returns, + ) + + return returns +} + +func (k *jsiiProxy_KubeBinding) ToString() *string { + var returns *string + + _jsii_.Invoke( + k, + "toString", + nil, // no parameters + &returns, + ) + + return returns +} + +// Binding ties one object to another; +// +// for example, a pod is bound to a node by a scheduler. Deprecated in 1.7, please use the bindings subresource of pods instead. +type KubeBindingProps struct { + // The target object that you want to bind to the standard object. + Target *ObjectReference `field:"required" json:"target" yaml:"target"` + // Standard object's metadata. + // + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + Metadata *ObjectMeta `field:"optional" json:"metadata" yaml:"metadata"` +} + +// CertificateSigningRequest objects provide a mechanism to obtain x509 certificates by submitting a certificate signing request, and having it asynchronously approved and issued. +// +// Kubelets use this API to obtain: +// 1. client certificates to authenticate to kube-apiserver (with the "kubernetes.io/kube-apiserver-client-kubelet" signerName). +// 2. serving certificates for TLS endpoints kube-apiserver can connect to securely (with the "kubernetes.io/kubelet-serving" signerName). +// +// This API can be used to request client certificates to authenticate to kube-apiserver (with the "kubernetes.io/kube-apiserver-client" signerName), or to obtain certificates from custom non-Kubernetes signers. +type KubeCertificateSigningRequest interface { + cdk8s.ApiObject + // The group portion of the API version (e.g. `authorization.k8s.io`). + ApiGroup() *string + // The object's API version (e.g. `authorization.k8s.io/v1`). + ApiVersion() *string + // The chart in which this object is defined. + Chart() cdk8s.Chart + // The object kind. + Kind() *string + // Metadata associated with this API object. + Metadata() cdk8s.ApiObjectMetadataDefinition + // The name of the API object. + // + // If a name is specified in `metadata.name` this will be the name returned. + // Otherwise, a name will be generated by calling + // `AddHelm.of(this).generatedObjectName(this)`, which by default uses the + // construct path to generate a DNS-compatible name for the resource. + Name() *string + // The tree node. + Node() constructs.Node + // Create a dependency between this ApiObject and other constructs. + // + // These can be other ApiObjects, Charts, or custom. + AddDependency(dependencies ...constructs.IConstruct) + // Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. + // + // Example: + // kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true)); + // + AddJsonPatch(ops ...cdk8s.JsonPatch) + // Renders the object to Kubernetes JSON. + ToJson() interface{} + // Returns a string representation of this construct. + ToString() *string +} + +// The jsii proxy struct for KubeCertificateSigningRequest +type jsiiProxy_KubeCertificateSigningRequest struct { + internal.Type__cdk8sApiObject +} + +func (j *jsiiProxy_KubeCertificateSigningRequest) ApiGroup() *string { + var returns *string + _jsii_.Get( + j, + "apiGroup", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeCertificateSigningRequest) ApiVersion() *string { + var returns *string + _jsii_.Get( + j, + "apiVersion", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeCertificateSigningRequest) Chart() cdk8s.Chart { + var returns cdk8s.Chart + _jsii_.Get( + j, + "chart", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeCertificateSigningRequest) Kind() *string { + var returns *string + _jsii_.Get( + j, + "kind", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeCertificateSigningRequest) Metadata() cdk8s.ApiObjectMetadataDefinition { + var returns cdk8s.ApiObjectMetadataDefinition + _jsii_.Get( + j, + "metadata", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeCertificateSigningRequest) Name() *string { + var returns *string + _jsii_.Get( + j, + "name", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeCertificateSigningRequest) Node() constructs.Node { + var returns constructs.Node + _jsii_.Get( + j, + "node", + &returns, + ) + return returns +} + +// Defines a "io.k8s.api.certificates.v1.CertificateSigningRequest" API object. +func NewKubeCertificateSigningRequest(scope constructs.Construct, id *string, props *KubeCertificateSigningRequestProps) KubeCertificateSigningRequest { + _init_.Initialize() + + j := jsiiProxy_KubeCertificateSigningRequest{} + + _jsii_.Create( + "k8s.KubeCertificateSigningRequest", + []interface{}{scope, id, props}, + &j, + ) + + return &j +} + +// Defines a "io.k8s.api.certificates.v1.CertificateSigningRequest" API object. +func NewKubeCertificateSigningRequest_Override(k KubeCertificateSigningRequest, scope constructs.Construct, id *string, props *KubeCertificateSigningRequestProps) { + _init_.Initialize() + + _jsii_.Create( + "k8s.KubeCertificateSigningRequest", + []interface{}{scope, id, props}, + k, + ) +} + +// Checks if `x` is a construct. +// +// Use this method instead of `instanceof` to properly detect `Construct` +// instances, even when the construct library is symlinked. +// +// Explanation: in JavaScript, multiple copies of the `constructs` library on +// disk are seen as independent, completely different libraries. As a +// consequence, the class `Construct` in each copy of the `constructs` library +// is seen as a different class, and an instance of one class will not test as +// `instanceof` the other class. `npm install` will not create installations +// like this, but users may manually symlink construct libraries together or +// use a monorepo tool: in those cases, multiple copies of the `constructs` +// library can be accidentally installed, and `instanceof` will behave +// unpredictably. It is safest to avoid using `instanceof`, and using +// this type-testing method instead. +// +// Returns: true if `x` is an object created from a class which extends `Construct`. +func KubeCertificateSigningRequest_IsConstruct(x interface{}) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "k8s.KubeCertificateSigningRequest", + "isConstruct", + []interface{}{x}, + &returns, + ) + + return returns +} + +// Renders a Kubernetes manifest for "io.k8s.api.certificates.v1.CertificateSigningRequest". +// +// This can be used to inline resource manifests inside other objects (e.g. as templates). +func KubeCertificateSigningRequest_Manifest(props *KubeCertificateSigningRequestProps) interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "k8s.KubeCertificateSigningRequest", + "manifest", + []interface{}{props}, + &returns, + ) + + return returns +} + +// Returns the `ApiObject` named `Resource` which is a child of the given construct. +// +// If `c` is an `ApiObject`, it is returned directly. Throws an +// exception if the construct does not have a child named `Default` _or_ if +// this child is not an `ApiObject`. +func KubeCertificateSigningRequest_Of(c constructs.IConstruct) cdk8s.ApiObject { + _init_.Initialize() + + var returns cdk8s.ApiObject + + _jsii_.StaticInvoke( + "k8s.KubeCertificateSigningRequest", + "of", + []interface{}{c}, + &returns, + ) + + return returns +} + +func KubeCertificateSigningRequest_GVK() *cdk8s.GroupVersionKind { + _init_.Initialize() + var returns *cdk8s.GroupVersionKind + _jsii_.StaticGet( + "k8s.KubeCertificateSigningRequest", + "GVK", + &returns, + ) + return returns +} + +func (k *jsiiProxy_KubeCertificateSigningRequest) AddDependency(dependencies ...constructs.IConstruct) { + args := []interface{}{} + for _, a := range dependencies { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addDependency", + args, + ) +} + +func (k *jsiiProxy_KubeCertificateSigningRequest) AddJsonPatch(ops ...cdk8s.JsonPatch) { + args := []interface{}{} + for _, a := range ops { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addJsonPatch", + args, + ) +} + +func (k *jsiiProxy_KubeCertificateSigningRequest) ToJson() interface{} { + var returns interface{} + + _jsii_.Invoke( + k, + "toJson", + nil, // no parameters + &returns, + ) + + return returns +} + +func (k *jsiiProxy_KubeCertificateSigningRequest) ToString() *string { + var returns *string + + _jsii_.Invoke( + k, + "toString", + nil, // no parameters + &returns, + ) + + return returns +} + +// CertificateSigningRequestList is a collection of CertificateSigningRequest objects. +type KubeCertificateSigningRequestList interface { + cdk8s.ApiObject + // The group portion of the API version (e.g. `authorization.k8s.io`). + ApiGroup() *string + // The object's API version (e.g. `authorization.k8s.io/v1`). + ApiVersion() *string + // The chart in which this object is defined. + Chart() cdk8s.Chart + // The object kind. + Kind() *string + // Metadata associated with this API object. + Metadata() cdk8s.ApiObjectMetadataDefinition + // The name of the API object. + // + // If a name is specified in `metadata.name` this will be the name returned. + // Otherwise, a name will be generated by calling + // `AddHelm.of(this).generatedObjectName(this)`, which by default uses the + // construct path to generate a DNS-compatible name for the resource. + Name() *string + // The tree node. + Node() constructs.Node + // Create a dependency between this ApiObject and other constructs. + // + // These can be other ApiObjects, Charts, or custom. + AddDependency(dependencies ...constructs.IConstruct) + // Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. + // + // Example: + // kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true)); + // + AddJsonPatch(ops ...cdk8s.JsonPatch) + // Renders the object to Kubernetes JSON. + ToJson() interface{} + // Returns a string representation of this construct. + ToString() *string +} + +// The jsii proxy struct for KubeCertificateSigningRequestList +type jsiiProxy_KubeCertificateSigningRequestList struct { + internal.Type__cdk8sApiObject +} + +func (j *jsiiProxy_KubeCertificateSigningRequestList) ApiGroup() *string { + var returns *string + _jsii_.Get( + j, + "apiGroup", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeCertificateSigningRequestList) ApiVersion() *string { + var returns *string + _jsii_.Get( + j, + "apiVersion", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeCertificateSigningRequestList) Chart() cdk8s.Chart { + var returns cdk8s.Chart + _jsii_.Get( + j, + "chart", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeCertificateSigningRequestList) Kind() *string { + var returns *string + _jsii_.Get( + j, + "kind", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeCertificateSigningRequestList) Metadata() cdk8s.ApiObjectMetadataDefinition { + var returns cdk8s.ApiObjectMetadataDefinition + _jsii_.Get( + j, + "metadata", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeCertificateSigningRequestList) Name() *string { + var returns *string + _jsii_.Get( + j, + "name", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeCertificateSigningRequestList) Node() constructs.Node { + var returns constructs.Node + _jsii_.Get( + j, + "node", + &returns, + ) + return returns +} + +// Defines a "io.k8s.api.certificates.v1.CertificateSigningRequestList" API object. +func NewKubeCertificateSigningRequestList(scope constructs.Construct, id *string, props *KubeCertificateSigningRequestListProps) KubeCertificateSigningRequestList { + _init_.Initialize() + + j := jsiiProxy_KubeCertificateSigningRequestList{} + + _jsii_.Create( + "k8s.KubeCertificateSigningRequestList", + []interface{}{scope, id, props}, + &j, + ) + + return &j +} + +// Defines a "io.k8s.api.certificates.v1.CertificateSigningRequestList" API object. +func NewKubeCertificateSigningRequestList_Override(k KubeCertificateSigningRequestList, scope constructs.Construct, id *string, props *KubeCertificateSigningRequestListProps) { + _init_.Initialize() + + _jsii_.Create( + "k8s.KubeCertificateSigningRequestList", + []interface{}{scope, id, props}, + k, + ) +} + +// Checks if `x` is a construct. +// +// Use this method instead of `instanceof` to properly detect `Construct` +// instances, even when the construct library is symlinked. +// +// Explanation: in JavaScript, multiple copies of the `constructs` library on +// disk are seen as independent, completely different libraries. As a +// consequence, the class `Construct` in each copy of the `constructs` library +// is seen as a different class, and an instance of one class will not test as +// `instanceof` the other class. `npm install` will not create installations +// like this, but users may manually symlink construct libraries together or +// use a monorepo tool: in those cases, multiple copies of the `constructs` +// library can be accidentally installed, and `instanceof` will behave +// unpredictably. It is safest to avoid using `instanceof`, and using +// this type-testing method instead. +// +// Returns: true if `x` is an object created from a class which extends `Construct`. +func KubeCertificateSigningRequestList_IsConstruct(x interface{}) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "k8s.KubeCertificateSigningRequestList", + "isConstruct", + []interface{}{x}, + &returns, + ) + + return returns +} + +// Renders a Kubernetes manifest for "io.k8s.api.certificates.v1.CertificateSigningRequestList". +// +// This can be used to inline resource manifests inside other objects (e.g. as templates). +func KubeCertificateSigningRequestList_Manifest(props *KubeCertificateSigningRequestListProps) interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "k8s.KubeCertificateSigningRequestList", + "manifest", + []interface{}{props}, + &returns, + ) + + return returns +} + +// Returns the `ApiObject` named `Resource` which is a child of the given construct. +// +// If `c` is an `ApiObject`, it is returned directly. Throws an +// exception if the construct does not have a child named `Default` _or_ if +// this child is not an `ApiObject`. +func KubeCertificateSigningRequestList_Of(c constructs.IConstruct) cdk8s.ApiObject { + _init_.Initialize() + + var returns cdk8s.ApiObject + + _jsii_.StaticInvoke( + "k8s.KubeCertificateSigningRequestList", + "of", + []interface{}{c}, + &returns, + ) + + return returns +} + +func KubeCertificateSigningRequestList_GVK() *cdk8s.GroupVersionKind { + _init_.Initialize() + var returns *cdk8s.GroupVersionKind + _jsii_.StaticGet( + "k8s.KubeCertificateSigningRequestList", + "GVK", + &returns, + ) + return returns +} + +func (k *jsiiProxy_KubeCertificateSigningRequestList) AddDependency(dependencies ...constructs.IConstruct) { + args := []interface{}{} + for _, a := range dependencies { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addDependency", + args, + ) +} + +func (k *jsiiProxy_KubeCertificateSigningRequestList) AddJsonPatch(ops ...cdk8s.JsonPatch) { + args := []interface{}{} + for _, a := range ops { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addJsonPatch", + args, + ) +} + +func (k *jsiiProxy_KubeCertificateSigningRequestList) ToJson() interface{} { + var returns interface{} + + _jsii_.Invoke( + k, + "toJson", + nil, // no parameters + &returns, + ) + + return returns +} + +func (k *jsiiProxy_KubeCertificateSigningRequestList) ToString() *string { + var returns *string + + _jsii_.Invoke( + k, + "toString", + nil, // no parameters + &returns, + ) + + return returns +} + +// CertificateSigningRequestList is a collection of CertificateSigningRequest objects. +type KubeCertificateSigningRequestListProps struct { + // items is a collection of CertificateSigningRequest objects. + Items *[]*KubeCertificateSigningRequestProps `field:"required" json:"items" yaml:"items"` + Metadata *ListMeta `field:"optional" json:"metadata" yaml:"metadata"` +} + +// CertificateSigningRequest objects provide a mechanism to obtain x509 certificates by submitting a certificate signing request, and having it asynchronously approved and issued. +// +// Kubelets use this API to obtain: +// 1. client certificates to authenticate to kube-apiserver (with the "kubernetes.io/kube-apiserver-client-kubelet" signerName). +// 2. serving certificates for TLS endpoints kube-apiserver can connect to securely (with the "kubernetes.io/kubelet-serving" signerName). +// +// This API can be used to request client certificates to authenticate to kube-apiserver (with the "kubernetes.io/kube-apiserver-client" signerName), or to obtain certificates from custom non-Kubernetes signers. +type KubeCertificateSigningRequestProps struct { + // spec contains the certificate request, and is immutable after creation. + // + // Only the request, signerName, expirationSeconds, and usages fields can be set on creation. Other fields are derived by Kubernetes and cannot be modified by users. + Spec *CertificateSigningRequestSpec `field:"required" json:"spec" yaml:"spec"` + Metadata *ObjectMeta `field:"optional" json:"metadata" yaml:"metadata"` +} + +// ClusterRole is a cluster level, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding or ClusterRoleBinding. +type KubeClusterRole interface { + cdk8s.ApiObject + // The group portion of the API version (e.g. `authorization.k8s.io`). + ApiGroup() *string + // The object's API version (e.g. `authorization.k8s.io/v1`). + ApiVersion() *string + // The chart in which this object is defined. + Chart() cdk8s.Chart + // The object kind. + Kind() *string + // Metadata associated with this API object. + Metadata() cdk8s.ApiObjectMetadataDefinition + // The name of the API object. + // + // If a name is specified in `metadata.name` this will be the name returned. + // Otherwise, a name will be generated by calling + // `AddHelm.of(this).generatedObjectName(this)`, which by default uses the + // construct path to generate a DNS-compatible name for the resource. + Name() *string + // The tree node. + Node() constructs.Node + // Create a dependency between this ApiObject and other constructs. + // + // These can be other ApiObjects, Charts, or custom. + AddDependency(dependencies ...constructs.IConstruct) + // Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. + // + // Example: + // kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true)); + // + AddJsonPatch(ops ...cdk8s.JsonPatch) + // Renders the object to Kubernetes JSON. + ToJson() interface{} + // Returns a string representation of this construct. + ToString() *string +} + +// The jsii proxy struct for KubeClusterRole +type jsiiProxy_KubeClusterRole struct { + internal.Type__cdk8sApiObject +} + +func (j *jsiiProxy_KubeClusterRole) ApiGroup() *string { + var returns *string + _jsii_.Get( + j, + "apiGroup", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeClusterRole) ApiVersion() *string { + var returns *string + _jsii_.Get( + j, + "apiVersion", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeClusterRole) Chart() cdk8s.Chart { + var returns cdk8s.Chart + _jsii_.Get( + j, + "chart", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeClusterRole) Kind() *string { + var returns *string + _jsii_.Get( + j, + "kind", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeClusterRole) Metadata() cdk8s.ApiObjectMetadataDefinition { + var returns cdk8s.ApiObjectMetadataDefinition + _jsii_.Get( + j, + "metadata", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeClusterRole) Name() *string { + var returns *string + _jsii_.Get( + j, + "name", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeClusterRole) Node() constructs.Node { + var returns constructs.Node + _jsii_.Get( + j, + "node", + &returns, + ) + return returns +} + +// Defines a "io.k8s.api.rbac.v1.ClusterRole" API object. +func NewKubeClusterRole(scope constructs.Construct, id *string, props *KubeClusterRoleProps) KubeClusterRole { + _init_.Initialize() + + j := jsiiProxy_KubeClusterRole{} + + _jsii_.Create( + "k8s.KubeClusterRole", + []interface{}{scope, id, props}, + &j, + ) + + return &j +} + +// Defines a "io.k8s.api.rbac.v1.ClusterRole" API object. +func NewKubeClusterRole_Override(k KubeClusterRole, scope constructs.Construct, id *string, props *KubeClusterRoleProps) { + _init_.Initialize() + + _jsii_.Create( + "k8s.KubeClusterRole", + []interface{}{scope, id, props}, + k, + ) +} + +// Checks if `x` is a construct. +// +// Use this method instead of `instanceof` to properly detect `Construct` +// instances, even when the construct library is symlinked. +// +// Explanation: in JavaScript, multiple copies of the `constructs` library on +// disk are seen as independent, completely different libraries. As a +// consequence, the class `Construct` in each copy of the `constructs` library +// is seen as a different class, and an instance of one class will not test as +// `instanceof` the other class. `npm install` will not create installations +// like this, but users may manually symlink construct libraries together or +// use a monorepo tool: in those cases, multiple copies of the `constructs` +// library can be accidentally installed, and `instanceof` will behave +// unpredictably. It is safest to avoid using `instanceof`, and using +// this type-testing method instead. +// +// Returns: true if `x` is an object created from a class which extends `Construct`. +func KubeClusterRole_IsConstruct(x interface{}) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "k8s.KubeClusterRole", + "isConstruct", + []interface{}{x}, + &returns, + ) + + return returns +} + +// Renders a Kubernetes manifest for "io.k8s.api.rbac.v1.ClusterRole". +// +// This can be used to inline resource manifests inside other objects (e.g. as templates). +func KubeClusterRole_Manifest(props *KubeClusterRoleProps) interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "k8s.KubeClusterRole", + "manifest", + []interface{}{props}, + &returns, + ) + + return returns +} + +// Returns the `ApiObject` named `Resource` which is a child of the given construct. +// +// If `c` is an `ApiObject`, it is returned directly. Throws an +// exception if the construct does not have a child named `Default` _or_ if +// this child is not an `ApiObject`. +func KubeClusterRole_Of(c constructs.IConstruct) cdk8s.ApiObject { + _init_.Initialize() + + var returns cdk8s.ApiObject + + _jsii_.StaticInvoke( + "k8s.KubeClusterRole", + "of", + []interface{}{c}, + &returns, + ) + + return returns +} + +func KubeClusterRole_GVK() *cdk8s.GroupVersionKind { + _init_.Initialize() + var returns *cdk8s.GroupVersionKind + _jsii_.StaticGet( + "k8s.KubeClusterRole", + "GVK", + &returns, + ) + return returns +} + +func (k *jsiiProxy_KubeClusterRole) AddDependency(dependencies ...constructs.IConstruct) { + args := []interface{}{} + for _, a := range dependencies { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addDependency", + args, + ) +} + +func (k *jsiiProxy_KubeClusterRole) AddJsonPatch(ops ...cdk8s.JsonPatch) { + args := []interface{}{} + for _, a := range ops { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addJsonPatch", + args, + ) +} + +func (k *jsiiProxy_KubeClusterRole) ToJson() interface{} { + var returns interface{} + + _jsii_.Invoke( + k, + "toJson", + nil, // no parameters + &returns, + ) + + return returns +} + +func (k *jsiiProxy_KubeClusterRole) ToString() *string { + var returns *string + + _jsii_.Invoke( + k, + "toString", + nil, // no parameters + &returns, + ) + + return returns +} + +// ClusterRoleBinding references a ClusterRole, but not contain it. +// +// It can reference a ClusterRole in the global namespace, and adds who information via Subject. +type KubeClusterRoleBinding interface { + cdk8s.ApiObject + // The group portion of the API version (e.g. `authorization.k8s.io`). + ApiGroup() *string + // The object's API version (e.g. `authorization.k8s.io/v1`). + ApiVersion() *string + // The chart in which this object is defined. + Chart() cdk8s.Chart + // The object kind. + Kind() *string + // Metadata associated with this API object. + Metadata() cdk8s.ApiObjectMetadataDefinition + // The name of the API object. + // + // If a name is specified in `metadata.name` this will be the name returned. + // Otherwise, a name will be generated by calling + // `AddHelm.of(this).generatedObjectName(this)`, which by default uses the + // construct path to generate a DNS-compatible name for the resource. + Name() *string + // The tree node. + Node() constructs.Node + // Create a dependency between this ApiObject and other constructs. + // + // These can be other ApiObjects, Charts, or custom. + AddDependency(dependencies ...constructs.IConstruct) + // Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. + // + // Example: + // kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true)); + // + AddJsonPatch(ops ...cdk8s.JsonPatch) + // Renders the object to Kubernetes JSON. + ToJson() interface{} + // Returns a string representation of this construct. + ToString() *string +} + +// The jsii proxy struct for KubeClusterRoleBinding +type jsiiProxy_KubeClusterRoleBinding struct { + internal.Type__cdk8sApiObject +} + +func (j *jsiiProxy_KubeClusterRoleBinding) ApiGroup() *string { + var returns *string + _jsii_.Get( + j, + "apiGroup", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeClusterRoleBinding) ApiVersion() *string { + var returns *string + _jsii_.Get( + j, + "apiVersion", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeClusterRoleBinding) Chart() cdk8s.Chart { + var returns cdk8s.Chart + _jsii_.Get( + j, + "chart", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeClusterRoleBinding) Kind() *string { + var returns *string + _jsii_.Get( + j, + "kind", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeClusterRoleBinding) Metadata() cdk8s.ApiObjectMetadataDefinition { + var returns cdk8s.ApiObjectMetadataDefinition + _jsii_.Get( + j, + "metadata", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeClusterRoleBinding) Name() *string { + var returns *string + _jsii_.Get( + j, + "name", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeClusterRoleBinding) Node() constructs.Node { + var returns constructs.Node + _jsii_.Get( + j, + "node", + &returns, + ) + return returns +} + +// Defines a "io.k8s.api.rbac.v1.ClusterRoleBinding" API object. +func NewKubeClusterRoleBinding(scope constructs.Construct, id *string, props *KubeClusterRoleBindingProps) KubeClusterRoleBinding { + _init_.Initialize() + + j := jsiiProxy_KubeClusterRoleBinding{} + + _jsii_.Create( + "k8s.KubeClusterRoleBinding", + []interface{}{scope, id, props}, + &j, + ) + + return &j +} + +// Defines a "io.k8s.api.rbac.v1.ClusterRoleBinding" API object. +func NewKubeClusterRoleBinding_Override(k KubeClusterRoleBinding, scope constructs.Construct, id *string, props *KubeClusterRoleBindingProps) { + _init_.Initialize() + + _jsii_.Create( + "k8s.KubeClusterRoleBinding", + []interface{}{scope, id, props}, + k, + ) +} + +// Checks if `x` is a construct. +// +// Use this method instead of `instanceof` to properly detect `Construct` +// instances, even when the construct library is symlinked. +// +// Explanation: in JavaScript, multiple copies of the `constructs` library on +// disk are seen as independent, completely different libraries. As a +// consequence, the class `Construct` in each copy of the `constructs` library +// is seen as a different class, and an instance of one class will not test as +// `instanceof` the other class. `npm install` will not create installations +// like this, but users may manually symlink construct libraries together or +// use a monorepo tool: in those cases, multiple copies of the `constructs` +// library can be accidentally installed, and `instanceof` will behave +// unpredictably. It is safest to avoid using `instanceof`, and using +// this type-testing method instead. +// +// Returns: true if `x` is an object created from a class which extends `Construct`. +func KubeClusterRoleBinding_IsConstruct(x interface{}) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "k8s.KubeClusterRoleBinding", + "isConstruct", + []interface{}{x}, + &returns, + ) + + return returns +} + +// Renders a Kubernetes manifest for "io.k8s.api.rbac.v1.ClusterRoleBinding". +// +// This can be used to inline resource manifests inside other objects (e.g. as templates). +func KubeClusterRoleBinding_Manifest(props *KubeClusterRoleBindingProps) interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "k8s.KubeClusterRoleBinding", + "manifest", + []interface{}{props}, + &returns, + ) + + return returns +} + +// Returns the `ApiObject` named `Resource` which is a child of the given construct. +// +// If `c` is an `ApiObject`, it is returned directly. Throws an +// exception if the construct does not have a child named `Default` _or_ if +// this child is not an `ApiObject`. +func KubeClusterRoleBinding_Of(c constructs.IConstruct) cdk8s.ApiObject { + _init_.Initialize() + + var returns cdk8s.ApiObject + + _jsii_.StaticInvoke( + "k8s.KubeClusterRoleBinding", + "of", + []interface{}{c}, + &returns, + ) + + return returns +} + +func KubeClusterRoleBinding_GVK() *cdk8s.GroupVersionKind { + _init_.Initialize() + var returns *cdk8s.GroupVersionKind + _jsii_.StaticGet( + "k8s.KubeClusterRoleBinding", + "GVK", + &returns, + ) + return returns +} + +func (k *jsiiProxy_KubeClusterRoleBinding) AddDependency(dependencies ...constructs.IConstruct) { + args := []interface{}{} + for _, a := range dependencies { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addDependency", + args, + ) +} + +func (k *jsiiProxy_KubeClusterRoleBinding) AddJsonPatch(ops ...cdk8s.JsonPatch) { + args := []interface{}{} + for _, a := range ops { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addJsonPatch", + args, + ) +} + +func (k *jsiiProxy_KubeClusterRoleBinding) ToJson() interface{} { + var returns interface{} + + _jsii_.Invoke( + k, + "toJson", + nil, // no parameters + &returns, + ) + + return returns +} + +func (k *jsiiProxy_KubeClusterRoleBinding) ToString() *string { + var returns *string + + _jsii_.Invoke( + k, + "toString", + nil, // no parameters + &returns, + ) + + return returns +} + +// ClusterRoleBindingList is a collection of ClusterRoleBindings. +type KubeClusterRoleBindingList interface { + cdk8s.ApiObject + // The group portion of the API version (e.g. `authorization.k8s.io`). + ApiGroup() *string + // The object's API version (e.g. `authorization.k8s.io/v1`). + ApiVersion() *string + // The chart in which this object is defined. + Chart() cdk8s.Chart + // The object kind. + Kind() *string + // Metadata associated with this API object. + Metadata() cdk8s.ApiObjectMetadataDefinition + // The name of the API object. + // + // If a name is specified in `metadata.name` this will be the name returned. + // Otherwise, a name will be generated by calling + // `AddHelm.of(this).generatedObjectName(this)`, which by default uses the + // construct path to generate a DNS-compatible name for the resource. + Name() *string + // The tree node. + Node() constructs.Node + // Create a dependency between this ApiObject and other constructs. + // + // These can be other ApiObjects, Charts, or custom. + AddDependency(dependencies ...constructs.IConstruct) + // Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. + // + // Example: + // kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true)); + // + AddJsonPatch(ops ...cdk8s.JsonPatch) + // Renders the object to Kubernetes JSON. + ToJson() interface{} + // Returns a string representation of this construct. + ToString() *string +} + +// The jsii proxy struct for KubeClusterRoleBindingList +type jsiiProxy_KubeClusterRoleBindingList struct { + internal.Type__cdk8sApiObject +} + +func (j *jsiiProxy_KubeClusterRoleBindingList) ApiGroup() *string { + var returns *string + _jsii_.Get( + j, + "apiGroup", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeClusterRoleBindingList) ApiVersion() *string { + var returns *string + _jsii_.Get( + j, + "apiVersion", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeClusterRoleBindingList) Chart() cdk8s.Chart { + var returns cdk8s.Chart + _jsii_.Get( + j, + "chart", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeClusterRoleBindingList) Kind() *string { + var returns *string + _jsii_.Get( + j, + "kind", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeClusterRoleBindingList) Metadata() cdk8s.ApiObjectMetadataDefinition { + var returns cdk8s.ApiObjectMetadataDefinition + _jsii_.Get( + j, + "metadata", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeClusterRoleBindingList) Name() *string { + var returns *string + _jsii_.Get( + j, + "name", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeClusterRoleBindingList) Node() constructs.Node { + var returns constructs.Node + _jsii_.Get( + j, + "node", + &returns, + ) + return returns +} + +// Defines a "io.k8s.api.rbac.v1.ClusterRoleBindingList" API object. +func NewKubeClusterRoleBindingList(scope constructs.Construct, id *string, props *KubeClusterRoleBindingListProps) KubeClusterRoleBindingList { + _init_.Initialize() + + j := jsiiProxy_KubeClusterRoleBindingList{} + + _jsii_.Create( + "k8s.KubeClusterRoleBindingList", + []interface{}{scope, id, props}, + &j, + ) + + return &j +} + +// Defines a "io.k8s.api.rbac.v1.ClusterRoleBindingList" API object. +func NewKubeClusterRoleBindingList_Override(k KubeClusterRoleBindingList, scope constructs.Construct, id *string, props *KubeClusterRoleBindingListProps) { + _init_.Initialize() + + _jsii_.Create( + "k8s.KubeClusterRoleBindingList", + []interface{}{scope, id, props}, + k, + ) +} + +// Checks if `x` is a construct. +// +// Use this method instead of `instanceof` to properly detect `Construct` +// instances, even when the construct library is symlinked. +// +// Explanation: in JavaScript, multiple copies of the `constructs` library on +// disk are seen as independent, completely different libraries. As a +// consequence, the class `Construct` in each copy of the `constructs` library +// is seen as a different class, and an instance of one class will not test as +// `instanceof` the other class. `npm install` will not create installations +// like this, but users may manually symlink construct libraries together or +// use a monorepo tool: in those cases, multiple copies of the `constructs` +// library can be accidentally installed, and `instanceof` will behave +// unpredictably. It is safest to avoid using `instanceof`, and using +// this type-testing method instead. +// +// Returns: true if `x` is an object created from a class which extends `Construct`. +func KubeClusterRoleBindingList_IsConstruct(x interface{}) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "k8s.KubeClusterRoleBindingList", + "isConstruct", + []interface{}{x}, + &returns, + ) + + return returns +} + +// Renders a Kubernetes manifest for "io.k8s.api.rbac.v1.ClusterRoleBindingList". +// +// This can be used to inline resource manifests inside other objects (e.g. as templates). +func KubeClusterRoleBindingList_Manifest(props *KubeClusterRoleBindingListProps) interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "k8s.KubeClusterRoleBindingList", + "manifest", + []interface{}{props}, + &returns, + ) + + return returns +} + +// Returns the `ApiObject` named `Resource` which is a child of the given construct. +// +// If `c` is an `ApiObject`, it is returned directly. Throws an +// exception if the construct does not have a child named `Default` _or_ if +// this child is not an `ApiObject`. +func KubeClusterRoleBindingList_Of(c constructs.IConstruct) cdk8s.ApiObject { + _init_.Initialize() + + var returns cdk8s.ApiObject + + _jsii_.StaticInvoke( + "k8s.KubeClusterRoleBindingList", + "of", + []interface{}{c}, + &returns, + ) + + return returns +} + +func KubeClusterRoleBindingList_GVK() *cdk8s.GroupVersionKind { + _init_.Initialize() + var returns *cdk8s.GroupVersionKind + _jsii_.StaticGet( + "k8s.KubeClusterRoleBindingList", + "GVK", + &returns, + ) + return returns +} + +func (k *jsiiProxy_KubeClusterRoleBindingList) AddDependency(dependencies ...constructs.IConstruct) { + args := []interface{}{} + for _, a := range dependencies { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addDependency", + args, + ) +} + +func (k *jsiiProxy_KubeClusterRoleBindingList) AddJsonPatch(ops ...cdk8s.JsonPatch) { + args := []interface{}{} + for _, a := range ops { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addJsonPatch", + args, + ) +} + +func (k *jsiiProxy_KubeClusterRoleBindingList) ToJson() interface{} { + var returns interface{} + + _jsii_.Invoke( + k, + "toJson", + nil, // no parameters + &returns, + ) + + return returns +} + +func (k *jsiiProxy_KubeClusterRoleBindingList) ToString() *string { + var returns *string + + _jsii_.Invoke( + k, + "toString", + nil, // no parameters + &returns, + ) + + return returns +} + +// ClusterRoleBindingList is a collection of ClusterRoleBindings. +type KubeClusterRoleBindingListProps struct { + // Items is a list of ClusterRoleBindings. + Items *[]*KubeClusterRoleBindingProps `field:"required" json:"items" yaml:"items"` + // Standard object's metadata. + Metadata *ListMeta `field:"optional" json:"metadata" yaml:"metadata"` +} + +// ClusterRoleBindingList is a collection of ClusterRoleBindings. +// +// Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 ClusterRoleBindings, and will no longer be served in v1.22. +type KubeClusterRoleBindingListV1Alpha1 interface { + cdk8s.ApiObject + // The group portion of the API version (e.g. `authorization.k8s.io`). + ApiGroup() *string + // The object's API version (e.g. `authorization.k8s.io/v1`). + ApiVersion() *string + // The chart in which this object is defined. + Chart() cdk8s.Chart + // The object kind. + Kind() *string + // Metadata associated with this API object. + Metadata() cdk8s.ApiObjectMetadataDefinition + // The name of the API object. + // + // If a name is specified in `metadata.name` this will be the name returned. + // Otherwise, a name will be generated by calling + // `AddHelm.of(this).generatedObjectName(this)`, which by default uses the + // construct path to generate a DNS-compatible name for the resource. + Name() *string + // The tree node. + Node() constructs.Node + // Create a dependency between this ApiObject and other constructs. + // + // These can be other ApiObjects, Charts, or custom. + AddDependency(dependencies ...constructs.IConstruct) + // Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. + // + // Example: + // kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true)); + // + AddJsonPatch(ops ...cdk8s.JsonPatch) + // Renders the object to Kubernetes JSON. + ToJson() interface{} + // Returns a string representation of this construct. + ToString() *string +} + +// The jsii proxy struct for KubeClusterRoleBindingListV1Alpha1 +type jsiiProxy_KubeClusterRoleBindingListV1Alpha1 struct { + internal.Type__cdk8sApiObject +} + +func (j *jsiiProxy_KubeClusterRoleBindingListV1Alpha1) ApiGroup() *string { + var returns *string + _jsii_.Get( + j, + "apiGroup", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeClusterRoleBindingListV1Alpha1) ApiVersion() *string { + var returns *string + _jsii_.Get( + j, + "apiVersion", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeClusterRoleBindingListV1Alpha1) Chart() cdk8s.Chart { + var returns cdk8s.Chart + _jsii_.Get( + j, + "chart", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeClusterRoleBindingListV1Alpha1) Kind() *string { + var returns *string + _jsii_.Get( + j, + "kind", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeClusterRoleBindingListV1Alpha1) Metadata() cdk8s.ApiObjectMetadataDefinition { + var returns cdk8s.ApiObjectMetadataDefinition + _jsii_.Get( + j, + "metadata", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeClusterRoleBindingListV1Alpha1) Name() *string { + var returns *string + _jsii_.Get( + j, + "name", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeClusterRoleBindingListV1Alpha1) Node() constructs.Node { + var returns constructs.Node + _jsii_.Get( + j, + "node", + &returns, + ) + return returns +} + +// Defines a "io.k8s.api.rbac.v1alpha1.ClusterRoleBindingList" API object. +func NewKubeClusterRoleBindingListV1Alpha1(scope constructs.Construct, id *string, props *KubeClusterRoleBindingListV1Alpha1Props) KubeClusterRoleBindingListV1Alpha1 { + _init_.Initialize() + + j := jsiiProxy_KubeClusterRoleBindingListV1Alpha1{} + + _jsii_.Create( + "k8s.KubeClusterRoleBindingListV1Alpha1", + []interface{}{scope, id, props}, + &j, + ) + + return &j +} + +// Defines a "io.k8s.api.rbac.v1alpha1.ClusterRoleBindingList" API object. +func NewKubeClusterRoleBindingListV1Alpha1_Override(k KubeClusterRoleBindingListV1Alpha1, scope constructs.Construct, id *string, props *KubeClusterRoleBindingListV1Alpha1Props) { + _init_.Initialize() + + _jsii_.Create( + "k8s.KubeClusterRoleBindingListV1Alpha1", + []interface{}{scope, id, props}, + k, + ) +} + +// Checks if `x` is a construct. +// +// Use this method instead of `instanceof` to properly detect `Construct` +// instances, even when the construct library is symlinked. +// +// Explanation: in JavaScript, multiple copies of the `constructs` library on +// disk are seen as independent, completely different libraries. As a +// consequence, the class `Construct` in each copy of the `constructs` library +// is seen as a different class, and an instance of one class will not test as +// `instanceof` the other class. `npm install` will not create installations +// like this, but users may manually symlink construct libraries together or +// use a monorepo tool: in those cases, multiple copies of the `constructs` +// library can be accidentally installed, and `instanceof` will behave +// unpredictably. It is safest to avoid using `instanceof`, and using +// this type-testing method instead. +// +// Returns: true if `x` is an object created from a class which extends `Construct`. +func KubeClusterRoleBindingListV1Alpha1_IsConstruct(x interface{}) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "k8s.KubeClusterRoleBindingListV1Alpha1", + "isConstruct", + []interface{}{x}, + &returns, + ) + + return returns +} + +// Renders a Kubernetes manifest for "io.k8s.api.rbac.v1alpha1.ClusterRoleBindingList". +// +// This can be used to inline resource manifests inside other objects (e.g. as templates). +func KubeClusterRoleBindingListV1Alpha1_Manifest(props *KubeClusterRoleBindingListV1Alpha1Props) interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "k8s.KubeClusterRoleBindingListV1Alpha1", + "manifest", + []interface{}{props}, + &returns, + ) + + return returns +} + +// Returns the `ApiObject` named `Resource` which is a child of the given construct. +// +// If `c` is an `ApiObject`, it is returned directly. Throws an +// exception if the construct does not have a child named `Default` _or_ if +// this child is not an `ApiObject`. +func KubeClusterRoleBindingListV1Alpha1_Of(c constructs.IConstruct) cdk8s.ApiObject { + _init_.Initialize() + + var returns cdk8s.ApiObject + + _jsii_.StaticInvoke( + "k8s.KubeClusterRoleBindingListV1Alpha1", + "of", + []interface{}{c}, + &returns, + ) + + return returns +} + +func KubeClusterRoleBindingListV1Alpha1_GVK() *cdk8s.GroupVersionKind { + _init_.Initialize() + var returns *cdk8s.GroupVersionKind + _jsii_.StaticGet( + "k8s.KubeClusterRoleBindingListV1Alpha1", + "GVK", + &returns, + ) + return returns +} + +func (k *jsiiProxy_KubeClusterRoleBindingListV1Alpha1) AddDependency(dependencies ...constructs.IConstruct) { + args := []interface{}{} + for _, a := range dependencies { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addDependency", + args, + ) +} + +func (k *jsiiProxy_KubeClusterRoleBindingListV1Alpha1) AddJsonPatch(ops ...cdk8s.JsonPatch) { + args := []interface{}{} + for _, a := range ops { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addJsonPatch", + args, + ) +} + +func (k *jsiiProxy_KubeClusterRoleBindingListV1Alpha1) ToJson() interface{} { + var returns interface{} + + _jsii_.Invoke( + k, + "toJson", + nil, // no parameters + &returns, + ) + + return returns +} + +func (k *jsiiProxy_KubeClusterRoleBindingListV1Alpha1) ToString() *string { + var returns *string + + _jsii_.Invoke( + k, + "toString", + nil, // no parameters + &returns, + ) + + return returns +} + +// ClusterRoleBindingList is a collection of ClusterRoleBindings. +// +// Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 ClusterRoleBindings, and will no longer be served in v1.22. +type KubeClusterRoleBindingListV1Alpha1Props struct { + // Items is a list of ClusterRoleBindings. + Items *[]*KubeClusterRoleBindingV1Alpha1Props `field:"required" json:"items" yaml:"items"` + // Standard object's metadata. + Metadata *ListMeta `field:"optional" json:"metadata" yaml:"metadata"` +} + +// ClusterRoleBinding references a ClusterRole, but not contain it. +// +// It can reference a ClusterRole in the global namespace, and adds who information via Subject. +type KubeClusterRoleBindingProps struct { + // RoleRef can only reference a ClusterRole in the global namespace. + // + // If the RoleRef cannot be resolved, the Authorizer must return an error. + RoleRef *RoleRef `field:"required" json:"roleRef" yaml:"roleRef"` + // Standard object's metadata. + Metadata *ObjectMeta `field:"optional" json:"metadata" yaml:"metadata"` + // Subjects holds references to the objects the role applies to. + Subjects *[]*Subject `field:"optional" json:"subjects" yaml:"subjects"` +} + +// ClusterRoleBinding references a ClusterRole, but not contain it. +// +// It can reference a ClusterRole in the global namespace, and adds who information via Subject. Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 ClusterRoleBinding, and will no longer be served in v1.22. +type KubeClusterRoleBindingV1Alpha1 interface { + cdk8s.ApiObject + // The group portion of the API version (e.g. `authorization.k8s.io`). + ApiGroup() *string + // The object's API version (e.g. `authorization.k8s.io/v1`). + ApiVersion() *string + // The chart in which this object is defined. + Chart() cdk8s.Chart + // The object kind. + Kind() *string + // Metadata associated with this API object. + Metadata() cdk8s.ApiObjectMetadataDefinition + // The name of the API object. + // + // If a name is specified in `metadata.name` this will be the name returned. + // Otherwise, a name will be generated by calling + // `AddHelm.of(this).generatedObjectName(this)`, which by default uses the + // construct path to generate a DNS-compatible name for the resource. + Name() *string + // The tree node. + Node() constructs.Node + // Create a dependency between this ApiObject and other constructs. + // + // These can be other ApiObjects, Charts, or custom. + AddDependency(dependencies ...constructs.IConstruct) + // Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. + // + // Example: + // kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true)); + // + AddJsonPatch(ops ...cdk8s.JsonPatch) + // Renders the object to Kubernetes JSON. + ToJson() interface{} + // Returns a string representation of this construct. + ToString() *string +} + +// The jsii proxy struct for KubeClusterRoleBindingV1Alpha1 +type jsiiProxy_KubeClusterRoleBindingV1Alpha1 struct { + internal.Type__cdk8sApiObject +} + +func (j *jsiiProxy_KubeClusterRoleBindingV1Alpha1) ApiGroup() *string { + var returns *string + _jsii_.Get( + j, + "apiGroup", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeClusterRoleBindingV1Alpha1) ApiVersion() *string { + var returns *string + _jsii_.Get( + j, + "apiVersion", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeClusterRoleBindingV1Alpha1) Chart() cdk8s.Chart { + var returns cdk8s.Chart + _jsii_.Get( + j, + "chart", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeClusterRoleBindingV1Alpha1) Kind() *string { + var returns *string + _jsii_.Get( + j, + "kind", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeClusterRoleBindingV1Alpha1) Metadata() cdk8s.ApiObjectMetadataDefinition { + var returns cdk8s.ApiObjectMetadataDefinition + _jsii_.Get( + j, + "metadata", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeClusterRoleBindingV1Alpha1) Name() *string { + var returns *string + _jsii_.Get( + j, + "name", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeClusterRoleBindingV1Alpha1) Node() constructs.Node { + var returns constructs.Node + _jsii_.Get( + j, + "node", + &returns, + ) + return returns +} + +// Defines a "io.k8s.api.rbac.v1alpha1.ClusterRoleBinding" API object. +func NewKubeClusterRoleBindingV1Alpha1(scope constructs.Construct, id *string, props *KubeClusterRoleBindingV1Alpha1Props) KubeClusterRoleBindingV1Alpha1 { + _init_.Initialize() + + j := jsiiProxy_KubeClusterRoleBindingV1Alpha1{} + + _jsii_.Create( + "k8s.KubeClusterRoleBindingV1Alpha1", + []interface{}{scope, id, props}, + &j, + ) + + return &j +} + +// Defines a "io.k8s.api.rbac.v1alpha1.ClusterRoleBinding" API object. +func NewKubeClusterRoleBindingV1Alpha1_Override(k KubeClusterRoleBindingV1Alpha1, scope constructs.Construct, id *string, props *KubeClusterRoleBindingV1Alpha1Props) { + _init_.Initialize() + + _jsii_.Create( + "k8s.KubeClusterRoleBindingV1Alpha1", + []interface{}{scope, id, props}, + k, + ) +} + +// Checks if `x` is a construct. +// +// Use this method instead of `instanceof` to properly detect `Construct` +// instances, even when the construct library is symlinked. +// +// Explanation: in JavaScript, multiple copies of the `constructs` library on +// disk are seen as independent, completely different libraries. As a +// consequence, the class `Construct` in each copy of the `constructs` library +// is seen as a different class, and an instance of one class will not test as +// `instanceof` the other class. `npm install` will not create installations +// like this, but users may manually symlink construct libraries together or +// use a monorepo tool: in those cases, multiple copies of the `constructs` +// library can be accidentally installed, and `instanceof` will behave +// unpredictably. It is safest to avoid using `instanceof`, and using +// this type-testing method instead. +// +// Returns: true if `x` is an object created from a class which extends `Construct`. +func KubeClusterRoleBindingV1Alpha1_IsConstruct(x interface{}) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "k8s.KubeClusterRoleBindingV1Alpha1", + "isConstruct", + []interface{}{x}, + &returns, + ) + + return returns +} + +// Renders a Kubernetes manifest for "io.k8s.api.rbac.v1alpha1.ClusterRoleBinding". +// +// This can be used to inline resource manifests inside other objects (e.g. as templates). +func KubeClusterRoleBindingV1Alpha1_Manifest(props *KubeClusterRoleBindingV1Alpha1Props) interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "k8s.KubeClusterRoleBindingV1Alpha1", + "manifest", + []interface{}{props}, + &returns, + ) + + return returns +} + +// Returns the `ApiObject` named `Resource` which is a child of the given construct. +// +// If `c` is an `ApiObject`, it is returned directly. Throws an +// exception if the construct does not have a child named `Default` _or_ if +// this child is not an `ApiObject`. +func KubeClusterRoleBindingV1Alpha1_Of(c constructs.IConstruct) cdk8s.ApiObject { + _init_.Initialize() + + var returns cdk8s.ApiObject + + _jsii_.StaticInvoke( + "k8s.KubeClusterRoleBindingV1Alpha1", + "of", + []interface{}{c}, + &returns, + ) + + return returns +} + +func KubeClusterRoleBindingV1Alpha1_GVK() *cdk8s.GroupVersionKind { + _init_.Initialize() + var returns *cdk8s.GroupVersionKind + _jsii_.StaticGet( + "k8s.KubeClusterRoleBindingV1Alpha1", + "GVK", + &returns, + ) + return returns +} + +func (k *jsiiProxy_KubeClusterRoleBindingV1Alpha1) AddDependency(dependencies ...constructs.IConstruct) { + args := []interface{}{} + for _, a := range dependencies { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addDependency", + args, + ) +} + +func (k *jsiiProxy_KubeClusterRoleBindingV1Alpha1) AddJsonPatch(ops ...cdk8s.JsonPatch) { + args := []interface{}{} + for _, a := range ops { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addJsonPatch", + args, + ) +} + +func (k *jsiiProxy_KubeClusterRoleBindingV1Alpha1) ToJson() interface{} { + var returns interface{} + + _jsii_.Invoke( + k, + "toJson", + nil, // no parameters + &returns, + ) + + return returns +} + +func (k *jsiiProxy_KubeClusterRoleBindingV1Alpha1) ToString() *string { + var returns *string + + _jsii_.Invoke( + k, + "toString", + nil, // no parameters + &returns, + ) + + return returns +} + +// ClusterRoleBinding references a ClusterRole, but not contain it. +// +// It can reference a ClusterRole in the global namespace, and adds who information via Subject. Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 ClusterRoleBinding, and will no longer be served in v1.22. +type KubeClusterRoleBindingV1Alpha1Props struct { + // RoleRef can only reference a ClusterRole in the global namespace. + // + // If the RoleRef cannot be resolved, the Authorizer must return an error. + RoleRef *RoleRefV1Alpha1 `field:"required" json:"roleRef" yaml:"roleRef"` + // Standard object's metadata. + Metadata *ObjectMeta `field:"optional" json:"metadata" yaml:"metadata"` + // Subjects holds references to the objects the role applies to. + Subjects *[]*SubjectV1Alpha1 `field:"optional" json:"subjects" yaml:"subjects"` +} + +// ClusterRoleList is a collection of ClusterRoles. +type KubeClusterRoleList interface { + cdk8s.ApiObject + // The group portion of the API version (e.g. `authorization.k8s.io`). + ApiGroup() *string + // The object's API version (e.g. `authorization.k8s.io/v1`). + ApiVersion() *string + // The chart in which this object is defined. + Chart() cdk8s.Chart + // The object kind. + Kind() *string + // Metadata associated with this API object. + Metadata() cdk8s.ApiObjectMetadataDefinition + // The name of the API object. + // + // If a name is specified in `metadata.name` this will be the name returned. + // Otherwise, a name will be generated by calling + // `AddHelm.of(this).generatedObjectName(this)`, which by default uses the + // construct path to generate a DNS-compatible name for the resource. + Name() *string + // The tree node. + Node() constructs.Node + // Create a dependency between this ApiObject and other constructs. + // + // These can be other ApiObjects, Charts, or custom. + AddDependency(dependencies ...constructs.IConstruct) + // Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. + // + // Example: + // kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true)); + // + AddJsonPatch(ops ...cdk8s.JsonPatch) + // Renders the object to Kubernetes JSON. + ToJson() interface{} + // Returns a string representation of this construct. + ToString() *string +} + +// The jsii proxy struct for KubeClusterRoleList +type jsiiProxy_KubeClusterRoleList struct { + internal.Type__cdk8sApiObject +} + +func (j *jsiiProxy_KubeClusterRoleList) ApiGroup() *string { + var returns *string + _jsii_.Get( + j, + "apiGroup", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeClusterRoleList) ApiVersion() *string { + var returns *string + _jsii_.Get( + j, + "apiVersion", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeClusterRoleList) Chart() cdk8s.Chart { + var returns cdk8s.Chart + _jsii_.Get( + j, + "chart", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeClusterRoleList) Kind() *string { + var returns *string + _jsii_.Get( + j, + "kind", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeClusterRoleList) Metadata() cdk8s.ApiObjectMetadataDefinition { + var returns cdk8s.ApiObjectMetadataDefinition + _jsii_.Get( + j, + "metadata", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeClusterRoleList) Name() *string { + var returns *string + _jsii_.Get( + j, + "name", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeClusterRoleList) Node() constructs.Node { + var returns constructs.Node + _jsii_.Get( + j, + "node", + &returns, + ) + return returns +} + +// Defines a "io.k8s.api.rbac.v1.ClusterRoleList" API object. +func NewKubeClusterRoleList(scope constructs.Construct, id *string, props *KubeClusterRoleListProps) KubeClusterRoleList { + _init_.Initialize() + + j := jsiiProxy_KubeClusterRoleList{} + + _jsii_.Create( + "k8s.KubeClusterRoleList", + []interface{}{scope, id, props}, + &j, + ) + + return &j +} + +// Defines a "io.k8s.api.rbac.v1.ClusterRoleList" API object. +func NewKubeClusterRoleList_Override(k KubeClusterRoleList, scope constructs.Construct, id *string, props *KubeClusterRoleListProps) { + _init_.Initialize() + + _jsii_.Create( + "k8s.KubeClusterRoleList", + []interface{}{scope, id, props}, + k, + ) +} + +// Checks if `x` is a construct. +// +// Use this method instead of `instanceof` to properly detect `Construct` +// instances, even when the construct library is symlinked. +// +// Explanation: in JavaScript, multiple copies of the `constructs` library on +// disk are seen as independent, completely different libraries. As a +// consequence, the class `Construct` in each copy of the `constructs` library +// is seen as a different class, and an instance of one class will not test as +// `instanceof` the other class. `npm install` will not create installations +// like this, but users may manually symlink construct libraries together or +// use a monorepo tool: in those cases, multiple copies of the `constructs` +// library can be accidentally installed, and `instanceof` will behave +// unpredictably. It is safest to avoid using `instanceof`, and using +// this type-testing method instead. +// +// Returns: true if `x` is an object created from a class which extends `Construct`. +func KubeClusterRoleList_IsConstruct(x interface{}) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "k8s.KubeClusterRoleList", + "isConstruct", + []interface{}{x}, + &returns, + ) + + return returns +} + +// Renders a Kubernetes manifest for "io.k8s.api.rbac.v1.ClusterRoleList". +// +// This can be used to inline resource manifests inside other objects (e.g. as templates). +func KubeClusterRoleList_Manifest(props *KubeClusterRoleListProps) interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "k8s.KubeClusterRoleList", + "manifest", + []interface{}{props}, + &returns, + ) + + return returns +} + +// Returns the `ApiObject` named `Resource` which is a child of the given construct. +// +// If `c` is an `ApiObject`, it is returned directly. Throws an +// exception if the construct does not have a child named `Default` _or_ if +// this child is not an `ApiObject`. +func KubeClusterRoleList_Of(c constructs.IConstruct) cdk8s.ApiObject { + _init_.Initialize() + + var returns cdk8s.ApiObject + + _jsii_.StaticInvoke( + "k8s.KubeClusterRoleList", + "of", + []interface{}{c}, + &returns, + ) + + return returns +} + +func KubeClusterRoleList_GVK() *cdk8s.GroupVersionKind { + _init_.Initialize() + var returns *cdk8s.GroupVersionKind + _jsii_.StaticGet( + "k8s.KubeClusterRoleList", + "GVK", + &returns, + ) + return returns +} + +func (k *jsiiProxy_KubeClusterRoleList) AddDependency(dependencies ...constructs.IConstruct) { + args := []interface{}{} + for _, a := range dependencies { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addDependency", + args, + ) +} + +func (k *jsiiProxy_KubeClusterRoleList) AddJsonPatch(ops ...cdk8s.JsonPatch) { + args := []interface{}{} + for _, a := range ops { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addJsonPatch", + args, + ) +} + +func (k *jsiiProxy_KubeClusterRoleList) ToJson() interface{} { + var returns interface{} + + _jsii_.Invoke( + k, + "toJson", + nil, // no parameters + &returns, + ) + + return returns +} + +func (k *jsiiProxy_KubeClusterRoleList) ToString() *string { + var returns *string + + _jsii_.Invoke( + k, + "toString", + nil, // no parameters + &returns, + ) + + return returns +} + +// ClusterRoleList is a collection of ClusterRoles. +type KubeClusterRoleListProps struct { + // Items is a list of ClusterRoles. + Items *[]*KubeClusterRoleProps `field:"required" json:"items" yaml:"items"` + // Standard object's metadata. + Metadata *ListMeta `field:"optional" json:"metadata" yaml:"metadata"` +} + +// ClusterRoleList is a collection of ClusterRoles. +// +// Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 ClusterRoles, and will no longer be served in v1.22. +type KubeClusterRoleListV1Alpha1 interface { + cdk8s.ApiObject + // The group portion of the API version (e.g. `authorization.k8s.io`). + ApiGroup() *string + // The object's API version (e.g. `authorization.k8s.io/v1`). + ApiVersion() *string + // The chart in which this object is defined. + Chart() cdk8s.Chart + // The object kind. + Kind() *string + // Metadata associated with this API object. + Metadata() cdk8s.ApiObjectMetadataDefinition + // The name of the API object. + // + // If a name is specified in `metadata.name` this will be the name returned. + // Otherwise, a name will be generated by calling + // `AddHelm.of(this).generatedObjectName(this)`, which by default uses the + // construct path to generate a DNS-compatible name for the resource. + Name() *string + // The tree node. + Node() constructs.Node + // Create a dependency between this ApiObject and other constructs. + // + // These can be other ApiObjects, Charts, or custom. + AddDependency(dependencies ...constructs.IConstruct) + // Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. + // + // Example: + // kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true)); + // + AddJsonPatch(ops ...cdk8s.JsonPatch) + // Renders the object to Kubernetes JSON. + ToJson() interface{} + // Returns a string representation of this construct. + ToString() *string +} + +// The jsii proxy struct for KubeClusterRoleListV1Alpha1 +type jsiiProxy_KubeClusterRoleListV1Alpha1 struct { + internal.Type__cdk8sApiObject +} + +func (j *jsiiProxy_KubeClusterRoleListV1Alpha1) ApiGroup() *string { + var returns *string + _jsii_.Get( + j, + "apiGroup", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeClusterRoleListV1Alpha1) ApiVersion() *string { + var returns *string + _jsii_.Get( + j, + "apiVersion", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeClusterRoleListV1Alpha1) Chart() cdk8s.Chart { + var returns cdk8s.Chart + _jsii_.Get( + j, + "chart", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeClusterRoleListV1Alpha1) Kind() *string { + var returns *string + _jsii_.Get( + j, + "kind", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeClusterRoleListV1Alpha1) Metadata() cdk8s.ApiObjectMetadataDefinition { + var returns cdk8s.ApiObjectMetadataDefinition + _jsii_.Get( + j, + "metadata", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeClusterRoleListV1Alpha1) Name() *string { + var returns *string + _jsii_.Get( + j, + "name", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeClusterRoleListV1Alpha1) Node() constructs.Node { + var returns constructs.Node + _jsii_.Get( + j, + "node", + &returns, + ) + return returns +} + +// Defines a "io.k8s.api.rbac.v1alpha1.ClusterRoleList" API object. +func NewKubeClusterRoleListV1Alpha1(scope constructs.Construct, id *string, props *KubeClusterRoleListV1Alpha1Props) KubeClusterRoleListV1Alpha1 { + _init_.Initialize() + + j := jsiiProxy_KubeClusterRoleListV1Alpha1{} + + _jsii_.Create( + "k8s.KubeClusterRoleListV1Alpha1", + []interface{}{scope, id, props}, + &j, + ) + + return &j +} + +// Defines a "io.k8s.api.rbac.v1alpha1.ClusterRoleList" API object. +func NewKubeClusterRoleListV1Alpha1_Override(k KubeClusterRoleListV1Alpha1, scope constructs.Construct, id *string, props *KubeClusterRoleListV1Alpha1Props) { + _init_.Initialize() + + _jsii_.Create( + "k8s.KubeClusterRoleListV1Alpha1", + []interface{}{scope, id, props}, + k, + ) +} + +// Checks if `x` is a construct. +// +// Use this method instead of `instanceof` to properly detect `Construct` +// instances, even when the construct library is symlinked. +// +// Explanation: in JavaScript, multiple copies of the `constructs` library on +// disk are seen as independent, completely different libraries. As a +// consequence, the class `Construct` in each copy of the `constructs` library +// is seen as a different class, and an instance of one class will not test as +// `instanceof` the other class. `npm install` will not create installations +// like this, but users may manually symlink construct libraries together or +// use a monorepo tool: in those cases, multiple copies of the `constructs` +// library can be accidentally installed, and `instanceof` will behave +// unpredictably. It is safest to avoid using `instanceof`, and using +// this type-testing method instead. +// +// Returns: true if `x` is an object created from a class which extends `Construct`. +func KubeClusterRoleListV1Alpha1_IsConstruct(x interface{}) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "k8s.KubeClusterRoleListV1Alpha1", + "isConstruct", + []interface{}{x}, + &returns, + ) + + return returns +} + +// Renders a Kubernetes manifest for "io.k8s.api.rbac.v1alpha1.ClusterRoleList". +// +// This can be used to inline resource manifests inside other objects (e.g. as templates). +func KubeClusterRoleListV1Alpha1_Manifest(props *KubeClusterRoleListV1Alpha1Props) interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "k8s.KubeClusterRoleListV1Alpha1", + "manifest", + []interface{}{props}, + &returns, + ) + + return returns +} + +// Returns the `ApiObject` named `Resource` which is a child of the given construct. +// +// If `c` is an `ApiObject`, it is returned directly. Throws an +// exception if the construct does not have a child named `Default` _or_ if +// this child is not an `ApiObject`. +func KubeClusterRoleListV1Alpha1_Of(c constructs.IConstruct) cdk8s.ApiObject { + _init_.Initialize() + + var returns cdk8s.ApiObject + + _jsii_.StaticInvoke( + "k8s.KubeClusterRoleListV1Alpha1", + "of", + []interface{}{c}, + &returns, + ) + + return returns +} + +func KubeClusterRoleListV1Alpha1_GVK() *cdk8s.GroupVersionKind { + _init_.Initialize() + var returns *cdk8s.GroupVersionKind + _jsii_.StaticGet( + "k8s.KubeClusterRoleListV1Alpha1", + "GVK", + &returns, + ) + return returns +} + +func (k *jsiiProxy_KubeClusterRoleListV1Alpha1) AddDependency(dependencies ...constructs.IConstruct) { + args := []interface{}{} + for _, a := range dependencies { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addDependency", + args, + ) +} + +func (k *jsiiProxy_KubeClusterRoleListV1Alpha1) AddJsonPatch(ops ...cdk8s.JsonPatch) { + args := []interface{}{} + for _, a := range ops { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addJsonPatch", + args, + ) +} + +func (k *jsiiProxy_KubeClusterRoleListV1Alpha1) ToJson() interface{} { + var returns interface{} + + _jsii_.Invoke( + k, + "toJson", + nil, // no parameters + &returns, + ) + + return returns +} + +func (k *jsiiProxy_KubeClusterRoleListV1Alpha1) ToString() *string { + var returns *string + + _jsii_.Invoke( + k, + "toString", + nil, // no parameters + &returns, + ) + + return returns +} + +// ClusterRoleList is a collection of ClusterRoles. +// +// Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 ClusterRoles, and will no longer be served in v1.22. +type KubeClusterRoleListV1Alpha1Props struct { + // Items is a list of ClusterRoles. + Items *[]*KubeClusterRoleV1Alpha1Props `field:"required" json:"items" yaml:"items"` + // Standard object's metadata. + Metadata *ListMeta `field:"optional" json:"metadata" yaml:"metadata"` +} + +// ClusterRole is a cluster level, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding or ClusterRoleBinding. +type KubeClusterRoleProps struct { + // AggregationRule is an optional field that describes how to build the Rules for this ClusterRole. + // + // If AggregationRule is set, then the Rules are controller managed and direct changes to Rules will be stomped by the controller. + AggregationRule *AggregationRule `field:"optional" json:"aggregationRule" yaml:"aggregationRule"` + // Standard object's metadata. + Metadata *ObjectMeta `field:"optional" json:"metadata" yaml:"metadata"` + // Rules holds all the PolicyRules for this ClusterRole. + Rules *[]*PolicyRule `field:"optional" json:"rules" yaml:"rules"` +} + +// ClusterRole is a cluster level, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding or ClusterRoleBinding. +// +// Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 ClusterRole, and will no longer be served in v1.22. +type KubeClusterRoleV1Alpha1 interface { + cdk8s.ApiObject + // The group portion of the API version (e.g. `authorization.k8s.io`). + ApiGroup() *string + // The object's API version (e.g. `authorization.k8s.io/v1`). + ApiVersion() *string + // The chart in which this object is defined. + Chart() cdk8s.Chart + // The object kind. + Kind() *string + // Metadata associated with this API object. + Metadata() cdk8s.ApiObjectMetadataDefinition + // The name of the API object. + // + // If a name is specified in `metadata.name` this will be the name returned. + // Otherwise, a name will be generated by calling + // `AddHelm.of(this).generatedObjectName(this)`, which by default uses the + // construct path to generate a DNS-compatible name for the resource. + Name() *string + // The tree node. + Node() constructs.Node + // Create a dependency between this ApiObject and other constructs. + // + // These can be other ApiObjects, Charts, or custom. + AddDependency(dependencies ...constructs.IConstruct) + // Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. + // + // Example: + // kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true)); + // + AddJsonPatch(ops ...cdk8s.JsonPatch) + // Renders the object to Kubernetes JSON. + ToJson() interface{} + // Returns a string representation of this construct. + ToString() *string +} + +// The jsii proxy struct for KubeClusterRoleV1Alpha1 +type jsiiProxy_KubeClusterRoleV1Alpha1 struct { + internal.Type__cdk8sApiObject +} + +func (j *jsiiProxy_KubeClusterRoleV1Alpha1) ApiGroup() *string { + var returns *string + _jsii_.Get( + j, + "apiGroup", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeClusterRoleV1Alpha1) ApiVersion() *string { + var returns *string + _jsii_.Get( + j, + "apiVersion", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeClusterRoleV1Alpha1) Chart() cdk8s.Chart { + var returns cdk8s.Chart + _jsii_.Get( + j, + "chart", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeClusterRoleV1Alpha1) Kind() *string { + var returns *string + _jsii_.Get( + j, + "kind", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeClusterRoleV1Alpha1) Metadata() cdk8s.ApiObjectMetadataDefinition { + var returns cdk8s.ApiObjectMetadataDefinition + _jsii_.Get( + j, + "metadata", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeClusterRoleV1Alpha1) Name() *string { + var returns *string + _jsii_.Get( + j, + "name", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeClusterRoleV1Alpha1) Node() constructs.Node { + var returns constructs.Node + _jsii_.Get( + j, + "node", + &returns, + ) + return returns +} + +// Defines a "io.k8s.api.rbac.v1alpha1.ClusterRole" API object. +func NewKubeClusterRoleV1Alpha1(scope constructs.Construct, id *string, props *KubeClusterRoleV1Alpha1Props) KubeClusterRoleV1Alpha1 { + _init_.Initialize() + + j := jsiiProxy_KubeClusterRoleV1Alpha1{} + + _jsii_.Create( + "k8s.KubeClusterRoleV1Alpha1", + []interface{}{scope, id, props}, + &j, + ) + + return &j +} + +// Defines a "io.k8s.api.rbac.v1alpha1.ClusterRole" API object. +func NewKubeClusterRoleV1Alpha1_Override(k KubeClusterRoleV1Alpha1, scope constructs.Construct, id *string, props *KubeClusterRoleV1Alpha1Props) { + _init_.Initialize() + + _jsii_.Create( + "k8s.KubeClusterRoleV1Alpha1", + []interface{}{scope, id, props}, + k, + ) +} + +// Checks if `x` is a construct. +// +// Use this method instead of `instanceof` to properly detect `Construct` +// instances, even when the construct library is symlinked. +// +// Explanation: in JavaScript, multiple copies of the `constructs` library on +// disk are seen as independent, completely different libraries. As a +// consequence, the class `Construct` in each copy of the `constructs` library +// is seen as a different class, and an instance of one class will not test as +// `instanceof` the other class. `npm install` will not create installations +// like this, but users may manually symlink construct libraries together or +// use a monorepo tool: in those cases, multiple copies of the `constructs` +// library can be accidentally installed, and `instanceof` will behave +// unpredictably. It is safest to avoid using `instanceof`, and using +// this type-testing method instead. +// +// Returns: true if `x` is an object created from a class which extends `Construct`. +func KubeClusterRoleV1Alpha1_IsConstruct(x interface{}) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "k8s.KubeClusterRoleV1Alpha1", + "isConstruct", + []interface{}{x}, + &returns, + ) + + return returns +} + +// Renders a Kubernetes manifest for "io.k8s.api.rbac.v1alpha1.ClusterRole". +// +// This can be used to inline resource manifests inside other objects (e.g. as templates). +func KubeClusterRoleV1Alpha1_Manifest(props *KubeClusterRoleV1Alpha1Props) interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "k8s.KubeClusterRoleV1Alpha1", + "manifest", + []interface{}{props}, + &returns, + ) + + return returns +} + +// Returns the `ApiObject` named `Resource` which is a child of the given construct. +// +// If `c` is an `ApiObject`, it is returned directly. Throws an +// exception if the construct does not have a child named `Default` _or_ if +// this child is not an `ApiObject`. +func KubeClusterRoleV1Alpha1_Of(c constructs.IConstruct) cdk8s.ApiObject { + _init_.Initialize() + + var returns cdk8s.ApiObject + + _jsii_.StaticInvoke( + "k8s.KubeClusterRoleV1Alpha1", + "of", + []interface{}{c}, + &returns, + ) + + return returns +} + +func KubeClusterRoleV1Alpha1_GVK() *cdk8s.GroupVersionKind { + _init_.Initialize() + var returns *cdk8s.GroupVersionKind + _jsii_.StaticGet( + "k8s.KubeClusterRoleV1Alpha1", + "GVK", + &returns, + ) + return returns +} + +func (k *jsiiProxy_KubeClusterRoleV1Alpha1) AddDependency(dependencies ...constructs.IConstruct) { + args := []interface{}{} + for _, a := range dependencies { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addDependency", + args, + ) +} + +func (k *jsiiProxy_KubeClusterRoleV1Alpha1) AddJsonPatch(ops ...cdk8s.JsonPatch) { + args := []interface{}{} + for _, a := range ops { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addJsonPatch", + args, + ) +} + +func (k *jsiiProxy_KubeClusterRoleV1Alpha1) ToJson() interface{} { + var returns interface{} + + _jsii_.Invoke( + k, + "toJson", + nil, // no parameters + &returns, + ) + + return returns +} + +func (k *jsiiProxy_KubeClusterRoleV1Alpha1) ToString() *string { + var returns *string + + _jsii_.Invoke( + k, + "toString", + nil, // no parameters + &returns, + ) + + return returns +} + +// ClusterRole is a cluster level, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding or ClusterRoleBinding. +// +// Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 ClusterRole, and will no longer be served in v1.22. +type KubeClusterRoleV1Alpha1Props struct { + // AggregationRule is an optional field that describes how to build the Rules for this ClusterRole. + // + // If AggregationRule is set, then the Rules are controller managed and direct changes to Rules will be stomped by the controller. + AggregationRule *AggregationRuleV1Alpha1 `field:"optional" json:"aggregationRule" yaml:"aggregationRule"` + // Standard object's metadata. + Metadata *ObjectMeta `field:"optional" json:"metadata" yaml:"metadata"` + // Rules holds all the PolicyRules for this ClusterRole. + Rules *[]*PolicyRuleV1Alpha1 `field:"optional" json:"rules" yaml:"rules"` +} + +// ComponentStatus (and ComponentStatusList) holds the cluster validation info. +// +// Deprecated: This API is deprecated in v1.19+ +type KubeComponentStatus interface { + cdk8s.ApiObject + // The group portion of the API version (e.g. `authorization.k8s.io`). + ApiGroup() *string + // The object's API version (e.g. `authorization.k8s.io/v1`). + ApiVersion() *string + // The chart in which this object is defined. + Chart() cdk8s.Chart + // The object kind. + Kind() *string + // Metadata associated with this API object. + Metadata() cdk8s.ApiObjectMetadataDefinition + // The name of the API object. + // + // If a name is specified in `metadata.name` this will be the name returned. + // Otherwise, a name will be generated by calling + // `AddHelm.of(this).generatedObjectName(this)`, which by default uses the + // construct path to generate a DNS-compatible name for the resource. + Name() *string + // The tree node. + Node() constructs.Node + // Create a dependency between this ApiObject and other constructs. + // + // These can be other ApiObjects, Charts, or custom. + AddDependency(dependencies ...constructs.IConstruct) + // Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. + // + // Example: + // kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true)); + // + AddJsonPatch(ops ...cdk8s.JsonPatch) + // Renders the object to Kubernetes JSON. + ToJson() interface{} + // Returns a string representation of this construct. + ToString() *string +} + +// The jsii proxy struct for KubeComponentStatus +type jsiiProxy_KubeComponentStatus struct { + internal.Type__cdk8sApiObject +} + +func (j *jsiiProxy_KubeComponentStatus) ApiGroup() *string { + var returns *string + _jsii_.Get( + j, + "apiGroup", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeComponentStatus) ApiVersion() *string { + var returns *string + _jsii_.Get( + j, + "apiVersion", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeComponentStatus) Chart() cdk8s.Chart { + var returns cdk8s.Chart + _jsii_.Get( + j, + "chart", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeComponentStatus) Kind() *string { + var returns *string + _jsii_.Get( + j, + "kind", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeComponentStatus) Metadata() cdk8s.ApiObjectMetadataDefinition { + var returns cdk8s.ApiObjectMetadataDefinition + _jsii_.Get( + j, + "metadata", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeComponentStatus) Name() *string { + var returns *string + _jsii_.Get( + j, + "name", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeComponentStatus) Node() constructs.Node { + var returns constructs.Node + _jsii_.Get( + j, + "node", + &returns, + ) + return returns +} + +// Defines a "io.k8s.api.core.v1.ComponentStatus" API object. +func NewKubeComponentStatus(scope constructs.Construct, id *string, props *KubeComponentStatusProps) KubeComponentStatus { + _init_.Initialize() + + j := jsiiProxy_KubeComponentStatus{} + + _jsii_.Create( + "k8s.KubeComponentStatus", + []interface{}{scope, id, props}, + &j, + ) + + return &j +} + +// Defines a "io.k8s.api.core.v1.ComponentStatus" API object. +func NewKubeComponentStatus_Override(k KubeComponentStatus, scope constructs.Construct, id *string, props *KubeComponentStatusProps) { + _init_.Initialize() + + _jsii_.Create( + "k8s.KubeComponentStatus", + []interface{}{scope, id, props}, + k, + ) +} + +// Checks if `x` is a construct. +// +// Use this method instead of `instanceof` to properly detect `Construct` +// instances, even when the construct library is symlinked. +// +// Explanation: in JavaScript, multiple copies of the `constructs` library on +// disk are seen as independent, completely different libraries. As a +// consequence, the class `Construct` in each copy of the `constructs` library +// is seen as a different class, and an instance of one class will not test as +// `instanceof` the other class. `npm install` will not create installations +// like this, but users may manually symlink construct libraries together or +// use a monorepo tool: in those cases, multiple copies of the `constructs` +// library can be accidentally installed, and `instanceof` will behave +// unpredictably. It is safest to avoid using `instanceof`, and using +// this type-testing method instead. +// +// Returns: true if `x` is an object created from a class which extends `Construct`. +func KubeComponentStatus_IsConstruct(x interface{}) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "k8s.KubeComponentStatus", + "isConstruct", + []interface{}{x}, + &returns, + ) + + return returns +} + +// Renders a Kubernetes manifest for "io.k8s.api.core.v1.ComponentStatus". +// +// This can be used to inline resource manifests inside other objects (e.g. as templates). +func KubeComponentStatus_Manifest(props *KubeComponentStatusProps) interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "k8s.KubeComponentStatus", + "manifest", + []interface{}{props}, + &returns, + ) + + return returns +} + +// Returns the `ApiObject` named `Resource` which is a child of the given construct. +// +// If `c` is an `ApiObject`, it is returned directly. Throws an +// exception if the construct does not have a child named `Default` _or_ if +// this child is not an `ApiObject`. +func KubeComponentStatus_Of(c constructs.IConstruct) cdk8s.ApiObject { + _init_.Initialize() + + var returns cdk8s.ApiObject + + _jsii_.StaticInvoke( + "k8s.KubeComponentStatus", + "of", + []interface{}{c}, + &returns, + ) + + return returns +} + +func KubeComponentStatus_GVK() *cdk8s.GroupVersionKind { + _init_.Initialize() + var returns *cdk8s.GroupVersionKind + _jsii_.StaticGet( + "k8s.KubeComponentStatus", + "GVK", + &returns, + ) + return returns +} + +func (k *jsiiProxy_KubeComponentStatus) AddDependency(dependencies ...constructs.IConstruct) { + args := []interface{}{} + for _, a := range dependencies { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addDependency", + args, + ) +} + +func (k *jsiiProxy_KubeComponentStatus) AddJsonPatch(ops ...cdk8s.JsonPatch) { + args := []interface{}{} + for _, a := range ops { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addJsonPatch", + args, + ) +} + +func (k *jsiiProxy_KubeComponentStatus) ToJson() interface{} { + var returns interface{} + + _jsii_.Invoke( + k, + "toJson", + nil, // no parameters + &returns, + ) + + return returns +} + +func (k *jsiiProxy_KubeComponentStatus) ToString() *string { + var returns *string + + _jsii_.Invoke( + k, + "toString", + nil, // no parameters + &returns, + ) + + return returns +} + +// Status of all the conditions for the component as a list of ComponentStatus objects. +// +// Deprecated: This API is deprecated in v1.19+ +type KubeComponentStatusList interface { + cdk8s.ApiObject + // The group portion of the API version (e.g. `authorization.k8s.io`). + ApiGroup() *string + // The object's API version (e.g. `authorization.k8s.io/v1`). + ApiVersion() *string + // The chart in which this object is defined. + Chart() cdk8s.Chart + // The object kind. + Kind() *string + // Metadata associated with this API object. + Metadata() cdk8s.ApiObjectMetadataDefinition + // The name of the API object. + // + // If a name is specified in `metadata.name` this will be the name returned. + // Otherwise, a name will be generated by calling + // `AddHelm.of(this).generatedObjectName(this)`, which by default uses the + // construct path to generate a DNS-compatible name for the resource. + Name() *string + // The tree node. + Node() constructs.Node + // Create a dependency between this ApiObject and other constructs. + // + // These can be other ApiObjects, Charts, or custom. + AddDependency(dependencies ...constructs.IConstruct) + // Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. + // + // Example: + // kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true)); + // + AddJsonPatch(ops ...cdk8s.JsonPatch) + // Renders the object to Kubernetes JSON. + ToJson() interface{} + // Returns a string representation of this construct. + ToString() *string +} + +// The jsii proxy struct for KubeComponentStatusList +type jsiiProxy_KubeComponentStatusList struct { + internal.Type__cdk8sApiObject +} + +func (j *jsiiProxy_KubeComponentStatusList) ApiGroup() *string { + var returns *string + _jsii_.Get( + j, + "apiGroup", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeComponentStatusList) ApiVersion() *string { + var returns *string + _jsii_.Get( + j, + "apiVersion", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeComponentStatusList) Chart() cdk8s.Chart { + var returns cdk8s.Chart + _jsii_.Get( + j, + "chart", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeComponentStatusList) Kind() *string { + var returns *string + _jsii_.Get( + j, + "kind", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeComponentStatusList) Metadata() cdk8s.ApiObjectMetadataDefinition { + var returns cdk8s.ApiObjectMetadataDefinition + _jsii_.Get( + j, + "metadata", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeComponentStatusList) Name() *string { + var returns *string + _jsii_.Get( + j, + "name", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeComponentStatusList) Node() constructs.Node { + var returns constructs.Node + _jsii_.Get( + j, + "node", + &returns, + ) + return returns +} + +// Defines a "io.k8s.api.core.v1.ComponentStatusList" API object. +func NewKubeComponentStatusList(scope constructs.Construct, id *string, props *KubeComponentStatusListProps) KubeComponentStatusList { + _init_.Initialize() + + j := jsiiProxy_KubeComponentStatusList{} + + _jsii_.Create( + "k8s.KubeComponentStatusList", + []interface{}{scope, id, props}, + &j, + ) + + return &j +} + +// Defines a "io.k8s.api.core.v1.ComponentStatusList" API object. +func NewKubeComponentStatusList_Override(k KubeComponentStatusList, scope constructs.Construct, id *string, props *KubeComponentStatusListProps) { + _init_.Initialize() + + _jsii_.Create( + "k8s.KubeComponentStatusList", + []interface{}{scope, id, props}, + k, + ) +} + +// Checks if `x` is a construct. +// +// Use this method instead of `instanceof` to properly detect `Construct` +// instances, even when the construct library is symlinked. +// +// Explanation: in JavaScript, multiple copies of the `constructs` library on +// disk are seen as independent, completely different libraries. As a +// consequence, the class `Construct` in each copy of the `constructs` library +// is seen as a different class, and an instance of one class will not test as +// `instanceof` the other class. `npm install` will not create installations +// like this, but users may manually symlink construct libraries together or +// use a monorepo tool: in those cases, multiple copies of the `constructs` +// library can be accidentally installed, and `instanceof` will behave +// unpredictably. It is safest to avoid using `instanceof`, and using +// this type-testing method instead. +// +// Returns: true if `x` is an object created from a class which extends `Construct`. +func KubeComponentStatusList_IsConstruct(x interface{}) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "k8s.KubeComponentStatusList", + "isConstruct", + []interface{}{x}, + &returns, + ) + + return returns +} + +// Renders a Kubernetes manifest for "io.k8s.api.core.v1.ComponentStatusList". +// +// This can be used to inline resource manifests inside other objects (e.g. as templates). +func KubeComponentStatusList_Manifest(props *KubeComponentStatusListProps) interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "k8s.KubeComponentStatusList", + "manifest", + []interface{}{props}, + &returns, + ) + + return returns +} + +// Returns the `ApiObject` named `Resource` which is a child of the given construct. +// +// If `c` is an `ApiObject`, it is returned directly. Throws an +// exception if the construct does not have a child named `Default` _or_ if +// this child is not an `ApiObject`. +func KubeComponentStatusList_Of(c constructs.IConstruct) cdk8s.ApiObject { + _init_.Initialize() + + var returns cdk8s.ApiObject + + _jsii_.StaticInvoke( + "k8s.KubeComponentStatusList", + "of", + []interface{}{c}, + &returns, + ) + + return returns +} + +func KubeComponentStatusList_GVK() *cdk8s.GroupVersionKind { + _init_.Initialize() + var returns *cdk8s.GroupVersionKind + _jsii_.StaticGet( + "k8s.KubeComponentStatusList", + "GVK", + &returns, + ) + return returns +} + +func (k *jsiiProxy_KubeComponentStatusList) AddDependency(dependencies ...constructs.IConstruct) { + args := []interface{}{} + for _, a := range dependencies { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addDependency", + args, + ) +} + +func (k *jsiiProxy_KubeComponentStatusList) AddJsonPatch(ops ...cdk8s.JsonPatch) { + args := []interface{}{} + for _, a := range ops { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addJsonPatch", + args, + ) +} + +func (k *jsiiProxy_KubeComponentStatusList) ToJson() interface{} { + var returns interface{} + + _jsii_.Invoke( + k, + "toJson", + nil, // no parameters + &returns, + ) + + return returns +} + +func (k *jsiiProxy_KubeComponentStatusList) ToString() *string { + var returns *string + + _jsii_.Invoke( + k, + "toString", + nil, // no parameters + &returns, + ) + + return returns +} + +// Status of all the conditions for the component as a list of ComponentStatus objects. +// +// Deprecated: This API is deprecated in v1.19+ +type KubeComponentStatusListProps struct { + // List of ComponentStatus objects. + Items *[]*KubeComponentStatusProps `field:"required" json:"items" yaml:"items"` + // Standard list metadata. + // + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + Metadata *ListMeta `field:"optional" json:"metadata" yaml:"metadata"` +} + +// ComponentStatus (and ComponentStatusList) holds the cluster validation info. +// +// Deprecated: This API is deprecated in v1.19+ +type KubeComponentStatusProps struct { + // List of component conditions observed. + Conditions *[]*ComponentCondition `field:"optional" json:"conditions" yaml:"conditions"` + // Standard object's metadata. + // + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + Metadata *ObjectMeta `field:"optional" json:"metadata" yaml:"metadata"` +} + +// ConfigMap holds configuration data for pods to consume. +type KubeConfigMap interface { + cdk8s.ApiObject + // The group portion of the API version (e.g. `authorization.k8s.io`). + ApiGroup() *string + // The object's API version (e.g. `authorization.k8s.io/v1`). + ApiVersion() *string + // The chart in which this object is defined. + Chart() cdk8s.Chart + // The object kind. + Kind() *string + // Metadata associated with this API object. + Metadata() cdk8s.ApiObjectMetadataDefinition + // The name of the API object. + // + // If a name is specified in `metadata.name` this will be the name returned. + // Otherwise, a name will be generated by calling + // `AddHelm.of(this).generatedObjectName(this)`, which by default uses the + // construct path to generate a DNS-compatible name for the resource. + Name() *string + // The tree node. + Node() constructs.Node + // Create a dependency between this ApiObject and other constructs. + // + // These can be other ApiObjects, Charts, or custom. + AddDependency(dependencies ...constructs.IConstruct) + // Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. + // + // Example: + // kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true)); + // + AddJsonPatch(ops ...cdk8s.JsonPatch) + // Renders the object to Kubernetes JSON. + ToJson() interface{} + // Returns a string representation of this construct. + ToString() *string +} + +// The jsii proxy struct for KubeConfigMap +type jsiiProxy_KubeConfigMap struct { + internal.Type__cdk8sApiObject +} + +func (j *jsiiProxy_KubeConfigMap) ApiGroup() *string { + var returns *string + _jsii_.Get( + j, + "apiGroup", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeConfigMap) ApiVersion() *string { + var returns *string + _jsii_.Get( + j, + "apiVersion", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeConfigMap) Chart() cdk8s.Chart { + var returns cdk8s.Chart + _jsii_.Get( + j, + "chart", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeConfigMap) Kind() *string { + var returns *string + _jsii_.Get( + j, + "kind", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeConfigMap) Metadata() cdk8s.ApiObjectMetadataDefinition { + var returns cdk8s.ApiObjectMetadataDefinition + _jsii_.Get( + j, + "metadata", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeConfigMap) Name() *string { + var returns *string + _jsii_.Get( + j, + "name", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeConfigMap) Node() constructs.Node { + var returns constructs.Node + _jsii_.Get( + j, + "node", + &returns, + ) + return returns +} + +// Defines a "io.k8s.api.core.v1.ConfigMap" API object. +func NewKubeConfigMap(scope constructs.Construct, id *string, props *KubeConfigMapProps) KubeConfigMap { + _init_.Initialize() + + j := jsiiProxy_KubeConfigMap{} + + _jsii_.Create( + "k8s.KubeConfigMap", + []interface{}{scope, id, props}, + &j, + ) + + return &j +} + +// Defines a "io.k8s.api.core.v1.ConfigMap" API object. +func NewKubeConfigMap_Override(k KubeConfigMap, scope constructs.Construct, id *string, props *KubeConfigMapProps) { + _init_.Initialize() + + _jsii_.Create( + "k8s.KubeConfigMap", + []interface{}{scope, id, props}, + k, + ) +} + +// Checks if `x` is a construct. +// +// Use this method instead of `instanceof` to properly detect `Construct` +// instances, even when the construct library is symlinked. +// +// Explanation: in JavaScript, multiple copies of the `constructs` library on +// disk are seen as independent, completely different libraries. As a +// consequence, the class `Construct` in each copy of the `constructs` library +// is seen as a different class, and an instance of one class will not test as +// `instanceof` the other class. `npm install` will not create installations +// like this, but users may manually symlink construct libraries together or +// use a monorepo tool: in those cases, multiple copies of the `constructs` +// library can be accidentally installed, and `instanceof` will behave +// unpredictably. It is safest to avoid using `instanceof`, and using +// this type-testing method instead. +// +// Returns: true if `x` is an object created from a class which extends `Construct`. +func KubeConfigMap_IsConstruct(x interface{}) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "k8s.KubeConfigMap", + "isConstruct", + []interface{}{x}, + &returns, + ) + + return returns +} + +// Renders a Kubernetes manifest for "io.k8s.api.core.v1.ConfigMap". +// +// This can be used to inline resource manifests inside other objects (e.g. as templates). +func KubeConfigMap_Manifest(props *KubeConfigMapProps) interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "k8s.KubeConfigMap", + "manifest", + []interface{}{props}, + &returns, + ) + + return returns +} + +// Returns the `ApiObject` named `Resource` which is a child of the given construct. +// +// If `c` is an `ApiObject`, it is returned directly. Throws an +// exception if the construct does not have a child named `Default` _or_ if +// this child is not an `ApiObject`. +func KubeConfigMap_Of(c constructs.IConstruct) cdk8s.ApiObject { + _init_.Initialize() + + var returns cdk8s.ApiObject + + _jsii_.StaticInvoke( + "k8s.KubeConfigMap", + "of", + []interface{}{c}, + &returns, + ) + + return returns +} + +func KubeConfigMap_GVK() *cdk8s.GroupVersionKind { + _init_.Initialize() + var returns *cdk8s.GroupVersionKind + _jsii_.StaticGet( + "k8s.KubeConfigMap", + "GVK", + &returns, + ) + return returns +} + +func (k *jsiiProxy_KubeConfigMap) AddDependency(dependencies ...constructs.IConstruct) { + args := []interface{}{} + for _, a := range dependencies { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addDependency", + args, + ) +} + +func (k *jsiiProxy_KubeConfigMap) AddJsonPatch(ops ...cdk8s.JsonPatch) { + args := []interface{}{} + for _, a := range ops { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addJsonPatch", + args, + ) +} + +func (k *jsiiProxy_KubeConfigMap) ToJson() interface{} { + var returns interface{} + + _jsii_.Invoke( + k, + "toJson", + nil, // no parameters + &returns, + ) + + return returns +} + +func (k *jsiiProxy_KubeConfigMap) ToString() *string { + var returns *string + + _jsii_.Invoke( + k, + "toString", + nil, // no parameters + &returns, + ) + + return returns +} + +// ConfigMapList is a resource containing a list of ConfigMap objects. +type KubeConfigMapList interface { + cdk8s.ApiObject + // The group portion of the API version (e.g. `authorization.k8s.io`). + ApiGroup() *string + // The object's API version (e.g. `authorization.k8s.io/v1`). + ApiVersion() *string + // The chart in which this object is defined. + Chart() cdk8s.Chart + // The object kind. + Kind() *string + // Metadata associated with this API object. + Metadata() cdk8s.ApiObjectMetadataDefinition + // The name of the API object. + // + // If a name is specified in `metadata.name` this will be the name returned. + // Otherwise, a name will be generated by calling + // `AddHelm.of(this).generatedObjectName(this)`, which by default uses the + // construct path to generate a DNS-compatible name for the resource. + Name() *string + // The tree node. + Node() constructs.Node + // Create a dependency between this ApiObject and other constructs. + // + // These can be other ApiObjects, Charts, or custom. + AddDependency(dependencies ...constructs.IConstruct) + // Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. + // + // Example: + // kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true)); + // + AddJsonPatch(ops ...cdk8s.JsonPatch) + // Renders the object to Kubernetes JSON. + ToJson() interface{} + // Returns a string representation of this construct. + ToString() *string +} + +// The jsii proxy struct for KubeConfigMapList +type jsiiProxy_KubeConfigMapList struct { + internal.Type__cdk8sApiObject +} + +func (j *jsiiProxy_KubeConfigMapList) ApiGroup() *string { + var returns *string + _jsii_.Get( + j, + "apiGroup", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeConfigMapList) ApiVersion() *string { + var returns *string + _jsii_.Get( + j, + "apiVersion", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeConfigMapList) Chart() cdk8s.Chart { + var returns cdk8s.Chart + _jsii_.Get( + j, + "chart", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeConfigMapList) Kind() *string { + var returns *string + _jsii_.Get( + j, + "kind", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeConfigMapList) Metadata() cdk8s.ApiObjectMetadataDefinition { + var returns cdk8s.ApiObjectMetadataDefinition + _jsii_.Get( + j, + "metadata", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeConfigMapList) Name() *string { + var returns *string + _jsii_.Get( + j, + "name", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeConfigMapList) Node() constructs.Node { + var returns constructs.Node + _jsii_.Get( + j, + "node", + &returns, + ) + return returns +} + +// Defines a "io.k8s.api.core.v1.ConfigMapList" API object. +func NewKubeConfigMapList(scope constructs.Construct, id *string, props *KubeConfigMapListProps) KubeConfigMapList { + _init_.Initialize() + + j := jsiiProxy_KubeConfigMapList{} + + _jsii_.Create( + "k8s.KubeConfigMapList", + []interface{}{scope, id, props}, + &j, + ) + + return &j +} + +// Defines a "io.k8s.api.core.v1.ConfigMapList" API object. +func NewKubeConfigMapList_Override(k KubeConfigMapList, scope constructs.Construct, id *string, props *KubeConfigMapListProps) { + _init_.Initialize() + + _jsii_.Create( + "k8s.KubeConfigMapList", + []interface{}{scope, id, props}, + k, + ) +} + +// Checks if `x` is a construct. +// +// Use this method instead of `instanceof` to properly detect `Construct` +// instances, even when the construct library is symlinked. +// +// Explanation: in JavaScript, multiple copies of the `constructs` library on +// disk are seen as independent, completely different libraries. As a +// consequence, the class `Construct` in each copy of the `constructs` library +// is seen as a different class, and an instance of one class will not test as +// `instanceof` the other class. `npm install` will not create installations +// like this, but users may manually symlink construct libraries together or +// use a monorepo tool: in those cases, multiple copies of the `constructs` +// library can be accidentally installed, and `instanceof` will behave +// unpredictably. It is safest to avoid using `instanceof`, and using +// this type-testing method instead. +// +// Returns: true if `x` is an object created from a class which extends `Construct`. +func KubeConfigMapList_IsConstruct(x interface{}) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "k8s.KubeConfigMapList", + "isConstruct", + []interface{}{x}, + &returns, + ) + + return returns +} + +// Renders a Kubernetes manifest for "io.k8s.api.core.v1.ConfigMapList". +// +// This can be used to inline resource manifests inside other objects (e.g. as templates). +func KubeConfigMapList_Manifest(props *KubeConfigMapListProps) interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "k8s.KubeConfigMapList", + "manifest", + []interface{}{props}, + &returns, + ) + + return returns +} + +// Returns the `ApiObject` named `Resource` which is a child of the given construct. +// +// If `c` is an `ApiObject`, it is returned directly. Throws an +// exception if the construct does not have a child named `Default` _or_ if +// this child is not an `ApiObject`. +func KubeConfigMapList_Of(c constructs.IConstruct) cdk8s.ApiObject { + _init_.Initialize() + + var returns cdk8s.ApiObject + + _jsii_.StaticInvoke( + "k8s.KubeConfigMapList", + "of", + []interface{}{c}, + &returns, + ) + + return returns +} + +func KubeConfigMapList_GVK() *cdk8s.GroupVersionKind { + _init_.Initialize() + var returns *cdk8s.GroupVersionKind + _jsii_.StaticGet( + "k8s.KubeConfigMapList", + "GVK", + &returns, + ) + return returns +} + +func (k *jsiiProxy_KubeConfigMapList) AddDependency(dependencies ...constructs.IConstruct) { + args := []interface{}{} + for _, a := range dependencies { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addDependency", + args, + ) +} + +func (k *jsiiProxy_KubeConfigMapList) AddJsonPatch(ops ...cdk8s.JsonPatch) { + args := []interface{}{} + for _, a := range ops { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addJsonPatch", + args, + ) +} + +func (k *jsiiProxy_KubeConfigMapList) ToJson() interface{} { + var returns interface{} + + _jsii_.Invoke( + k, + "toJson", + nil, // no parameters + &returns, + ) + + return returns +} + +func (k *jsiiProxy_KubeConfigMapList) ToString() *string { + var returns *string + + _jsii_.Invoke( + k, + "toString", + nil, // no parameters + &returns, + ) + + return returns +} + +// ConfigMapList is a resource containing a list of ConfigMap objects. +type KubeConfigMapListProps struct { + // Items is the list of ConfigMaps. + Items *[]*KubeConfigMapProps `field:"required" json:"items" yaml:"items"` + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata. + Metadata *ListMeta `field:"optional" json:"metadata" yaml:"metadata"` +} + +// ConfigMap holds configuration data for pods to consume. +type KubeConfigMapProps struct { + // BinaryData contains the binary data. + // + // Each key must consist of alphanumeric characters, '-', '_' or '.'. BinaryData can contain byte sequences that are not in the UTF-8 range. The keys stored in BinaryData must not overlap with the ones in the Data field, this is enforced during validation process. Using this field will require 1.10+ apiserver and kubelet. + BinaryData *map[string]*string `field:"optional" json:"binaryData" yaml:"binaryData"` + // Data contains the configuration data. + // + // Each key must consist of alphanumeric characters, '-', '_' or '.'. Values with non-UTF-8 byte sequences must use the BinaryData field. The keys stored in Data must not overlap with the keys in the BinaryData field, this is enforced during validation process. + Data *map[string]*string `field:"optional" json:"data" yaml:"data"` + // Immutable, if set to true, ensures that data stored in the ConfigMap cannot be updated (only object metadata can be modified). + // + // If not set to true, the field can be modified at any time. Defaulted to nil. + Immutable *bool `field:"optional" json:"immutable" yaml:"immutable"` + // Standard object's metadata. + // + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + Metadata *ObjectMeta `field:"optional" json:"metadata" yaml:"metadata"` +} + +// ControllerRevision implements an immutable snapshot of state data. +// +// Clients are responsible for serializing and deserializing the objects that contain their internal state. Once a ControllerRevision has been successfully created, it can not be updated. The API Server will fail validation of all requests that attempt to mutate the Data field. ControllerRevisions may, however, be deleted. Note that, due to its use by both the DaemonSet and StatefulSet controllers for update and rollback, this object is beta. However, it may be subject to name and representation changes in future releases, and clients should not depend on its stability. It is primarily for internal use by controllers. +type KubeControllerRevision interface { + cdk8s.ApiObject + // The group portion of the API version (e.g. `authorization.k8s.io`). + ApiGroup() *string + // The object's API version (e.g. `authorization.k8s.io/v1`). + ApiVersion() *string + // The chart in which this object is defined. + Chart() cdk8s.Chart + // The object kind. + Kind() *string + // Metadata associated with this API object. + Metadata() cdk8s.ApiObjectMetadataDefinition + // The name of the API object. + // + // If a name is specified in `metadata.name` this will be the name returned. + // Otherwise, a name will be generated by calling + // `AddHelm.of(this).generatedObjectName(this)`, which by default uses the + // construct path to generate a DNS-compatible name for the resource. + Name() *string + // The tree node. + Node() constructs.Node + // Create a dependency between this ApiObject and other constructs. + // + // These can be other ApiObjects, Charts, or custom. + AddDependency(dependencies ...constructs.IConstruct) + // Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. + // + // Example: + // kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true)); + // + AddJsonPatch(ops ...cdk8s.JsonPatch) + // Renders the object to Kubernetes JSON. + ToJson() interface{} + // Returns a string representation of this construct. + ToString() *string +} + +// The jsii proxy struct for KubeControllerRevision +type jsiiProxy_KubeControllerRevision struct { + internal.Type__cdk8sApiObject +} + +func (j *jsiiProxy_KubeControllerRevision) ApiGroup() *string { + var returns *string + _jsii_.Get( + j, + "apiGroup", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeControllerRevision) ApiVersion() *string { + var returns *string + _jsii_.Get( + j, + "apiVersion", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeControllerRevision) Chart() cdk8s.Chart { + var returns cdk8s.Chart + _jsii_.Get( + j, + "chart", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeControllerRevision) Kind() *string { + var returns *string + _jsii_.Get( + j, + "kind", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeControllerRevision) Metadata() cdk8s.ApiObjectMetadataDefinition { + var returns cdk8s.ApiObjectMetadataDefinition + _jsii_.Get( + j, + "metadata", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeControllerRevision) Name() *string { + var returns *string + _jsii_.Get( + j, + "name", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeControllerRevision) Node() constructs.Node { + var returns constructs.Node + _jsii_.Get( + j, + "node", + &returns, + ) + return returns +} + +// Defines a "io.k8s.api.apps.v1.ControllerRevision" API object. +func NewKubeControllerRevision(scope constructs.Construct, id *string, props *KubeControllerRevisionProps) KubeControllerRevision { + _init_.Initialize() + + j := jsiiProxy_KubeControllerRevision{} + + _jsii_.Create( + "k8s.KubeControllerRevision", + []interface{}{scope, id, props}, + &j, + ) + + return &j +} + +// Defines a "io.k8s.api.apps.v1.ControllerRevision" API object. +func NewKubeControllerRevision_Override(k KubeControllerRevision, scope constructs.Construct, id *string, props *KubeControllerRevisionProps) { + _init_.Initialize() + + _jsii_.Create( + "k8s.KubeControllerRevision", + []interface{}{scope, id, props}, + k, + ) +} + +// Checks if `x` is a construct. +// +// Use this method instead of `instanceof` to properly detect `Construct` +// instances, even when the construct library is symlinked. +// +// Explanation: in JavaScript, multiple copies of the `constructs` library on +// disk are seen as independent, completely different libraries. As a +// consequence, the class `Construct` in each copy of the `constructs` library +// is seen as a different class, and an instance of one class will not test as +// `instanceof` the other class. `npm install` will not create installations +// like this, but users may manually symlink construct libraries together or +// use a monorepo tool: in those cases, multiple copies of the `constructs` +// library can be accidentally installed, and `instanceof` will behave +// unpredictably. It is safest to avoid using `instanceof`, and using +// this type-testing method instead. +// +// Returns: true if `x` is an object created from a class which extends `Construct`. +func KubeControllerRevision_IsConstruct(x interface{}) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "k8s.KubeControllerRevision", + "isConstruct", + []interface{}{x}, + &returns, + ) + + return returns +} + +// Renders a Kubernetes manifest for "io.k8s.api.apps.v1.ControllerRevision". +// +// This can be used to inline resource manifests inside other objects (e.g. as templates). +func KubeControllerRevision_Manifest(props *KubeControllerRevisionProps) interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "k8s.KubeControllerRevision", + "manifest", + []interface{}{props}, + &returns, + ) + + return returns +} + +// Returns the `ApiObject` named `Resource` which is a child of the given construct. +// +// If `c` is an `ApiObject`, it is returned directly. Throws an +// exception if the construct does not have a child named `Default` _or_ if +// this child is not an `ApiObject`. +func KubeControllerRevision_Of(c constructs.IConstruct) cdk8s.ApiObject { + _init_.Initialize() + + var returns cdk8s.ApiObject + + _jsii_.StaticInvoke( + "k8s.KubeControllerRevision", + "of", + []interface{}{c}, + &returns, + ) + + return returns +} + +func KubeControllerRevision_GVK() *cdk8s.GroupVersionKind { + _init_.Initialize() + var returns *cdk8s.GroupVersionKind + _jsii_.StaticGet( + "k8s.KubeControllerRevision", + "GVK", + &returns, + ) + return returns +} + +func (k *jsiiProxy_KubeControllerRevision) AddDependency(dependencies ...constructs.IConstruct) { + args := []interface{}{} + for _, a := range dependencies { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addDependency", + args, + ) +} + +func (k *jsiiProxy_KubeControllerRevision) AddJsonPatch(ops ...cdk8s.JsonPatch) { + args := []interface{}{} + for _, a := range ops { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addJsonPatch", + args, + ) +} + +func (k *jsiiProxy_KubeControllerRevision) ToJson() interface{} { + var returns interface{} + + _jsii_.Invoke( + k, + "toJson", + nil, // no parameters + &returns, + ) + + return returns +} + +func (k *jsiiProxy_KubeControllerRevision) ToString() *string { + var returns *string + + _jsii_.Invoke( + k, + "toString", + nil, // no parameters + &returns, + ) + + return returns +} + +// ControllerRevisionList is a resource containing a list of ControllerRevision objects. +type KubeControllerRevisionList interface { + cdk8s.ApiObject + // The group portion of the API version (e.g. `authorization.k8s.io`). + ApiGroup() *string + // The object's API version (e.g. `authorization.k8s.io/v1`). + ApiVersion() *string + // The chart in which this object is defined. + Chart() cdk8s.Chart + // The object kind. + Kind() *string + // Metadata associated with this API object. + Metadata() cdk8s.ApiObjectMetadataDefinition + // The name of the API object. + // + // If a name is specified in `metadata.name` this will be the name returned. + // Otherwise, a name will be generated by calling + // `AddHelm.of(this).generatedObjectName(this)`, which by default uses the + // construct path to generate a DNS-compatible name for the resource. + Name() *string + // The tree node. + Node() constructs.Node + // Create a dependency between this ApiObject and other constructs. + // + // These can be other ApiObjects, Charts, or custom. + AddDependency(dependencies ...constructs.IConstruct) + // Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. + // + // Example: + // kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true)); + // + AddJsonPatch(ops ...cdk8s.JsonPatch) + // Renders the object to Kubernetes JSON. + ToJson() interface{} + // Returns a string representation of this construct. + ToString() *string +} + +// The jsii proxy struct for KubeControllerRevisionList +type jsiiProxy_KubeControllerRevisionList struct { + internal.Type__cdk8sApiObject +} + +func (j *jsiiProxy_KubeControllerRevisionList) ApiGroup() *string { + var returns *string + _jsii_.Get( + j, + "apiGroup", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeControllerRevisionList) ApiVersion() *string { + var returns *string + _jsii_.Get( + j, + "apiVersion", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeControllerRevisionList) Chart() cdk8s.Chart { + var returns cdk8s.Chart + _jsii_.Get( + j, + "chart", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeControllerRevisionList) Kind() *string { + var returns *string + _jsii_.Get( + j, + "kind", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeControllerRevisionList) Metadata() cdk8s.ApiObjectMetadataDefinition { + var returns cdk8s.ApiObjectMetadataDefinition + _jsii_.Get( + j, + "metadata", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeControllerRevisionList) Name() *string { + var returns *string + _jsii_.Get( + j, + "name", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeControllerRevisionList) Node() constructs.Node { + var returns constructs.Node + _jsii_.Get( + j, + "node", + &returns, + ) + return returns +} + +// Defines a "io.k8s.api.apps.v1.ControllerRevisionList" API object. +func NewKubeControllerRevisionList(scope constructs.Construct, id *string, props *KubeControllerRevisionListProps) KubeControllerRevisionList { + _init_.Initialize() + + j := jsiiProxy_KubeControllerRevisionList{} + + _jsii_.Create( + "k8s.KubeControllerRevisionList", + []interface{}{scope, id, props}, + &j, + ) + + return &j +} + +// Defines a "io.k8s.api.apps.v1.ControllerRevisionList" API object. +func NewKubeControllerRevisionList_Override(k KubeControllerRevisionList, scope constructs.Construct, id *string, props *KubeControllerRevisionListProps) { + _init_.Initialize() + + _jsii_.Create( + "k8s.KubeControllerRevisionList", + []interface{}{scope, id, props}, + k, + ) +} + +// Checks if `x` is a construct. +// +// Use this method instead of `instanceof` to properly detect `Construct` +// instances, even when the construct library is symlinked. +// +// Explanation: in JavaScript, multiple copies of the `constructs` library on +// disk are seen as independent, completely different libraries. As a +// consequence, the class `Construct` in each copy of the `constructs` library +// is seen as a different class, and an instance of one class will not test as +// `instanceof` the other class. `npm install` will not create installations +// like this, but users may manually symlink construct libraries together or +// use a monorepo tool: in those cases, multiple copies of the `constructs` +// library can be accidentally installed, and `instanceof` will behave +// unpredictably. It is safest to avoid using `instanceof`, and using +// this type-testing method instead. +// +// Returns: true if `x` is an object created from a class which extends `Construct`. +func KubeControllerRevisionList_IsConstruct(x interface{}) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "k8s.KubeControllerRevisionList", + "isConstruct", + []interface{}{x}, + &returns, + ) + + return returns +} + +// Renders a Kubernetes manifest for "io.k8s.api.apps.v1.ControllerRevisionList". +// +// This can be used to inline resource manifests inside other objects (e.g. as templates). +func KubeControllerRevisionList_Manifest(props *KubeControllerRevisionListProps) interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "k8s.KubeControllerRevisionList", + "manifest", + []interface{}{props}, + &returns, + ) + + return returns +} + +// Returns the `ApiObject` named `Resource` which is a child of the given construct. +// +// If `c` is an `ApiObject`, it is returned directly. Throws an +// exception if the construct does not have a child named `Default` _or_ if +// this child is not an `ApiObject`. +func KubeControllerRevisionList_Of(c constructs.IConstruct) cdk8s.ApiObject { + _init_.Initialize() + + var returns cdk8s.ApiObject + + _jsii_.StaticInvoke( + "k8s.KubeControllerRevisionList", + "of", + []interface{}{c}, + &returns, + ) + + return returns +} + +func KubeControllerRevisionList_GVK() *cdk8s.GroupVersionKind { + _init_.Initialize() + var returns *cdk8s.GroupVersionKind + _jsii_.StaticGet( + "k8s.KubeControllerRevisionList", + "GVK", + &returns, + ) + return returns +} + +func (k *jsiiProxy_KubeControllerRevisionList) AddDependency(dependencies ...constructs.IConstruct) { + args := []interface{}{} + for _, a := range dependencies { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addDependency", + args, + ) +} + +func (k *jsiiProxy_KubeControllerRevisionList) AddJsonPatch(ops ...cdk8s.JsonPatch) { + args := []interface{}{} + for _, a := range ops { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addJsonPatch", + args, + ) +} + +func (k *jsiiProxy_KubeControllerRevisionList) ToJson() interface{} { + var returns interface{} + + _jsii_.Invoke( + k, + "toJson", + nil, // no parameters + &returns, + ) + + return returns +} + +func (k *jsiiProxy_KubeControllerRevisionList) ToString() *string { + var returns *string + + _jsii_.Invoke( + k, + "toString", + nil, // no parameters + &returns, + ) + + return returns +} + +// ControllerRevisionList is a resource containing a list of ControllerRevision objects. +type KubeControllerRevisionListProps struct { + // Items is the list of ControllerRevisions. + Items *[]*KubeControllerRevisionProps `field:"required" json:"items" yaml:"items"` + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata. + Metadata *ListMeta `field:"optional" json:"metadata" yaml:"metadata"` +} + +// ControllerRevision implements an immutable snapshot of state data. +// +// Clients are responsible for serializing and deserializing the objects that contain their internal state. Once a ControllerRevision has been successfully created, it can not be updated. The API Server will fail validation of all requests that attempt to mutate the Data field. ControllerRevisions may, however, be deleted. Note that, due to its use by both the DaemonSet and StatefulSet controllers for update and rollback, this object is beta. However, it may be subject to name and representation changes in future releases, and clients should not depend on its stability. It is primarily for internal use by controllers. +type KubeControllerRevisionProps struct { + // Revision indicates the revision of the state represented by Data. + Revision *float64 `field:"required" json:"revision" yaml:"revision"` + // Data is the serialized representation of the state. + Data interface{} `field:"optional" json:"data" yaml:"data"` + // Standard object's metadata. + // + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + Metadata *ObjectMeta `field:"optional" json:"metadata" yaml:"metadata"` +} + +// CronJob represents the configuration of a single cron job. +type KubeCronJob interface { + cdk8s.ApiObject + // The group portion of the API version (e.g. `authorization.k8s.io`). + ApiGroup() *string + // The object's API version (e.g. `authorization.k8s.io/v1`). + ApiVersion() *string + // The chart in which this object is defined. + Chart() cdk8s.Chart + // The object kind. + Kind() *string + // Metadata associated with this API object. + Metadata() cdk8s.ApiObjectMetadataDefinition + // The name of the API object. + // + // If a name is specified in `metadata.name` this will be the name returned. + // Otherwise, a name will be generated by calling + // `AddHelm.of(this).generatedObjectName(this)`, which by default uses the + // construct path to generate a DNS-compatible name for the resource. + Name() *string + // The tree node. + Node() constructs.Node + // Create a dependency between this ApiObject and other constructs. + // + // These can be other ApiObjects, Charts, or custom. + AddDependency(dependencies ...constructs.IConstruct) + // Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. + // + // Example: + // kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true)); + // + AddJsonPatch(ops ...cdk8s.JsonPatch) + // Renders the object to Kubernetes JSON. + ToJson() interface{} + // Returns a string representation of this construct. + ToString() *string +} + +// The jsii proxy struct for KubeCronJob +type jsiiProxy_KubeCronJob struct { + internal.Type__cdk8sApiObject +} + +func (j *jsiiProxy_KubeCronJob) ApiGroup() *string { + var returns *string + _jsii_.Get( + j, + "apiGroup", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeCronJob) ApiVersion() *string { + var returns *string + _jsii_.Get( + j, + "apiVersion", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeCronJob) Chart() cdk8s.Chart { + var returns cdk8s.Chart + _jsii_.Get( + j, + "chart", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeCronJob) Kind() *string { + var returns *string + _jsii_.Get( + j, + "kind", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeCronJob) Metadata() cdk8s.ApiObjectMetadataDefinition { + var returns cdk8s.ApiObjectMetadataDefinition + _jsii_.Get( + j, + "metadata", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeCronJob) Name() *string { + var returns *string + _jsii_.Get( + j, + "name", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeCronJob) Node() constructs.Node { + var returns constructs.Node + _jsii_.Get( + j, + "node", + &returns, + ) + return returns +} + +// Defines a "io.k8s.api.batch.v1.CronJob" API object. +func NewKubeCronJob(scope constructs.Construct, id *string, props *KubeCronJobProps) KubeCronJob { + _init_.Initialize() + + j := jsiiProxy_KubeCronJob{} + + _jsii_.Create( + "k8s.KubeCronJob", + []interface{}{scope, id, props}, + &j, + ) + + return &j +} + +// Defines a "io.k8s.api.batch.v1.CronJob" API object. +func NewKubeCronJob_Override(k KubeCronJob, scope constructs.Construct, id *string, props *KubeCronJobProps) { + _init_.Initialize() + + _jsii_.Create( + "k8s.KubeCronJob", + []interface{}{scope, id, props}, + k, + ) +} + +// Checks if `x` is a construct. +// +// Use this method instead of `instanceof` to properly detect `Construct` +// instances, even when the construct library is symlinked. +// +// Explanation: in JavaScript, multiple copies of the `constructs` library on +// disk are seen as independent, completely different libraries. As a +// consequence, the class `Construct` in each copy of the `constructs` library +// is seen as a different class, and an instance of one class will not test as +// `instanceof` the other class. `npm install` will not create installations +// like this, but users may manually symlink construct libraries together or +// use a monorepo tool: in those cases, multiple copies of the `constructs` +// library can be accidentally installed, and `instanceof` will behave +// unpredictably. It is safest to avoid using `instanceof`, and using +// this type-testing method instead. +// +// Returns: true if `x` is an object created from a class which extends `Construct`. +func KubeCronJob_IsConstruct(x interface{}) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "k8s.KubeCronJob", + "isConstruct", + []interface{}{x}, + &returns, + ) + + return returns +} + +// Renders a Kubernetes manifest for "io.k8s.api.batch.v1.CronJob". +// +// This can be used to inline resource manifests inside other objects (e.g. as templates). +func KubeCronJob_Manifest(props *KubeCronJobProps) interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "k8s.KubeCronJob", + "manifest", + []interface{}{props}, + &returns, + ) + + return returns +} + +// Returns the `ApiObject` named `Resource` which is a child of the given construct. +// +// If `c` is an `ApiObject`, it is returned directly. Throws an +// exception if the construct does not have a child named `Default` _or_ if +// this child is not an `ApiObject`. +func KubeCronJob_Of(c constructs.IConstruct) cdk8s.ApiObject { + _init_.Initialize() + + var returns cdk8s.ApiObject + + _jsii_.StaticInvoke( + "k8s.KubeCronJob", + "of", + []interface{}{c}, + &returns, + ) + + return returns +} + +func KubeCronJob_GVK() *cdk8s.GroupVersionKind { + _init_.Initialize() + var returns *cdk8s.GroupVersionKind + _jsii_.StaticGet( + "k8s.KubeCronJob", + "GVK", + &returns, + ) + return returns +} + +func (k *jsiiProxy_KubeCronJob) AddDependency(dependencies ...constructs.IConstruct) { + args := []interface{}{} + for _, a := range dependencies { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addDependency", + args, + ) +} + +func (k *jsiiProxy_KubeCronJob) AddJsonPatch(ops ...cdk8s.JsonPatch) { + args := []interface{}{} + for _, a := range ops { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addJsonPatch", + args, + ) +} + +func (k *jsiiProxy_KubeCronJob) ToJson() interface{} { + var returns interface{} + + _jsii_.Invoke( + k, + "toJson", + nil, // no parameters + &returns, + ) + + return returns +} + +func (k *jsiiProxy_KubeCronJob) ToString() *string { + var returns *string + + _jsii_.Invoke( + k, + "toString", + nil, // no parameters + &returns, + ) + + return returns +} + +// CronJobList is a collection of cron jobs. +type KubeCronJobList interface { + cdk8s.ApiObject + // The group portion of the API version (e.g. `authorization.k8s.io`). + ApiGroup() *string + // The object's API version (e.g. `authorization.k8s.io/v1`). + ApiVersion() *string + // The chart in which this object is defined. + Chart() cdk8s.Chart + // The object kind. + Kind() *string + // Metadata associated with this API object. + Metadata() cdk8s.ApiObjectMetadataDefinition + // The name of the API object. + // + // If a name is specified in `metadata.name` this will be the name returned. + // Otherwise, a name will be generated by calling + // `AddHelm.of(this).generatedObjectName(this)`, which by default uses the + // construct path to generate a DNS-compatible name for the resource. + Name() *string + // The tree node. + Node() constructs.Node + // Create a dependency between this ApiObject and other constructs. + // + // These can be other ApiObjects, Charts, or custom. + AddDependency(dependencies ...constructs.IConstruct) + // Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. + // + // Example: + // kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true)); + // + AddJsonPatch(ops ...cdk8s.JsonPatch) + // Renders the object to Kubernetes JSON. + ToJson() interface{} + // Returns a string representation of this construct. + ToString() *string +} + +// The jsii proxy struct for KubeCronJobList +type jsiiProxy_KubeCronJobList struct { + internal.Type__cdk8sApiObject +} + +func (j *jsiiProxy_KubeCronJobList) ApiGroup() *string { + var returns *string + _jsii_.Get( + j, + "apiGroup", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeCronJobList) ApiVersion() *string { + var returns *string + _jsii_.Get( + j, + "apiVersion", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeCronJobList) Chart() cdk8s.Chart { + var returns cdk8s.Chart + _jsii_.Get( + j, + "chart", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeCronJobList) Kind() *string { + var returns *string + _jsii_.Get( + j, + "kind", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeCronJobList) Metadata() cdk8s.ApiObjectMetadataDefinition { + var returns cdk8s.ApiObjectMetadataDefinition + _jsii_.Get( + j, + "metadata", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeCronJobList) Name() *string { + var returns *string + _jsii_.Get( + j, + "name", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeCronJobList) Node() constructs.Node { + var returns constructs.Node + _jsii_.Get( + j, + "node", + &returns, + ) + return returns +} + +// Defines a "io.k8s.api.batch.v1.CronJobList" API object. +func NewKubeCronJobList(scope constructs.Construct, id *string, props *KubeCronJobListProps) KubeCronJobList { + _init_.Initialize() + + j := jsiiProxy_KubeCronJobList{} + + _jsii_.Create( + "k8s.KubeCronJobList", + []interface{}{scope, id, props}, + &j, + ) + + return &j +} + +// Defines a "io.k8s.api.batch.v1.CronJobList" API object. +func NewKubeCronJobList_Override(k KubeCronJobList, scope constructs.Construct, id *string, props *KubeCronJobListProps) { + _init_.Initialize() + + _jsii_.Create( + "k8s.KubeCronJobList", + []interface{}{scope, id, props}, + k, + ) +} + +// Checks if `x` is a construct. +// +// Use this method instead of `instanceof` to properly detect `Construct` +// instances, even when the construct library is symlinked. +// +// Explanation: in JavaScript, multiple copies of the `constructs` library on +// disk are seen as independent, completely different libraries. As a +// consequence, the class `Construct` in each copy of the `constructs` library +// is seen as a different class, and an instance of one class will not test as +// `instanceof` the other class. `npm install` will not create installations +// like this, but users may manually symlink construct libraries together or +// use a monorepo tool: in those cases, multiple copies of the `constructs` +// library can be accidentally installed, and `instanceof` will behave +// unpredictably. It is safest to avoid using `instanceof`, and using +// this type-testing method instead. +// +// Returns: true if `x` is an object created from a class which extends `Construct`. +func KubeCronJobList_IsConstruct(x interface{}) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "k8s.KubeCronJobList", + "isConstruct", + []interface{}{x}, + &returns, + ) + + return returns +} + +// Renders a Kubernetes manifest for "io.k8s.api.batch.v1.CronJobList". +// +// This can be used to inline resource manifests inside other objects (e.g. as templates). +func KubeCronJobList_Manifest(props *KubeCronJobListProps) interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "k8s.KubeCronJobList", + "manifest", + []interface{}{props}, + &returns, + ) + + return returns +} + +// Returns the `ApiObject` named `Resource` which is a child of the given construct. +// +// If `c` is an `ApiObject`, it is returned directly. Throws an +// exception if the construct does not have a child named `Default` _or_ if +// this child is not an `ApiObject`. +func KubeCronJobList_Of(c constructs.IConstruct) cdk8s.ApiObject { + _init_.Initialize() + + var returns cdk8s.ApiObject + + _jsii_.StaticInvoke( + "k8s.KubeCronJobList", + "of", + []interface{}{c}, + &returns, + ) + + return returns +} + +func KubeCronJobList_GVK() *cdk8s.GroupVersionKind { + _init_.Initialize() + var returns *cdk8s.GroupVersionKind + _jsii_.StaticGet( + "k8s.KubeCronJobList", + "GVK", + &returns, + ) + return returns +} + +func (k *jsiiProxy_KubeCronJobList) AddDependency(dependencies ...constructs.IConstruct) { + args := []interface{}{} + for _, a := range dependencies { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addDependency", + args, + ) +} + +func (k *jsiiProxy_KubeCronJobList) AddJsonPatch(ops ...cdk8s.JsonPatch) { + args := []interface{}{} + for _, a := range ops { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addJsonPatch", + args, + ) +} + +func (k *jsiiProxy_KubeCronJobList) ToJson() interface{} { + var returns interface{} + + _jsii_.Invoke( + k, + "toJson", + nil, // no parameters + &returns, + ) + + return returns +} + +func (k *jsiiProxy_KubeCronJobList) ToString() *string { + var returns *string + + _jsii_.Invoke( + k, + "toString", + nil, // no parameters + &returns, + ) + + return returns +} + +// CronJobList is a collection of cron jobs. +type KubeCronJobListProps struct { + // items is the list of CronJobs. + Items *[]*KubeCronJobProps `field:"required" json:"items" yaml:"items"` + // Standard list metadata. + // + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + Metadata *ListMeta `field:"optional" json:"metadata" yaml:"metadata"` +} + +// CronJobList is a collection of cron jobs. +type KubeCronJobListV1Beta1 interface { + cdk8s.ApiObject + // The group portion of the API version (e.g. `authorization.k8s.io`). + ApiGroup() *string + // The object's API version (e.g. `authorization.k8s.io/v1`). + ApiVersion() *string + // The chart in which this object is defined. + Chart() cdk8s.Chart + // The object kind. + Kind() *string + // Metadata associated with this API object. + Metadata() cdk8s.ApiObjectMetadataDefinition + // The name of the API object. + // + // If a name is specified in `metadata.name` this will be the name returned. + // Otherwise, a name will be generated by calling + // `AddHelm.of(this).generatedObjectName(this)`, which by default uses the + // construct path to generate a DNS-compatible name for the resource. + Name() *string + // The tree node. + Node() constructs.Node + // Create a dependency between this ApiObject and other constructs. + // + // These can be other ApiObjects, Charts, or custom. + AddDependency(dependencies ...constructs.IConstruct) + // Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. + // + // Example: + // kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true)); + // + AddJsonPatch(ops ...cdk8s.JsonPatch) + // Renders the object to Kubernetes JSON. + ToJson() interface{} + // Returns a string representation of this construct. + ToString() *string +} + +// The jsii proxy struct for KubeCronJobListV1Beta1 +type jsiiProxy_KubeCronJobListV1Beta1 struct { + internal.Type__cdk8sApiObject +} + +func (j *jsiiProxy_KubeCronJobListV1Beta1) ApiGroup() *string { + var returns *string + _jsii_.Get( + j, + "apiGroup", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeCronJobListV1Beta1) ApiVersion() *string { + var returns *string + _jsii_.Get( + j, + "apiVersion", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeCronJobListV1Beta1) Chart() cdk8s.Chart { + var returns cdk8s.Chart + _jsii_.Get( + j, + "chart", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeCronJobListV1Beta1) Kind() *string { + var returns *string + _jsii_.Get( + j, + "kind", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeCronJobListV1Beta1) Metadata() cdk8s.ApiObjectMetadataDefinition { + var returns cdk8s.ApiObjectMetadataDefinition + _jsii_.Get( + j, + "metadata", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeCronJobListV1Beta1) Name() *string { + var returns *string + _jsii_.Get( + j, + "name", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeCronJobListV1Beta1) Node() constructs.Node { + var returns constructs.Node + _jsii_.Get( + j, + "node", + &returns, + ) + return returns +} + +// Defines a "io.k8s.api.batch.v1beta1.CronJobList" API object. +func NewKubeCronJobListV1Beta1(scope constructs.Construct, id *string, props *KubeCronJobListV1Beta1Props) KubeCronJobListV1Beta1 { + _init_.Initialize() + + j := jsiiProxy_KubeCronJobListV1Beta1{} + + _jsii_.Create( + "k8s.KubeCronJobListV1Beta1", + []interface{}{scope, id, props}, + &j, + ) + + return &j +} + +// Defines a "io.k8s.api.batch.v1beta1.CronJobList" API object. +func NewKubeCronJobListV1Beta1_Override(k KubeCronJobListV1Beta1, scope constructs.Construct, id *string, props *KubeCronJobListV1Beta1Props) { + _init_.Initialize() + + _jsii_.Create( + "k8s.KubeCronJobListV1Beta1", + []interface{}{scope, id, props}, + k, + ) +} + +// Checks if `x` is a construct. +// +// Use this method instead of `instanceof` to properly detect `Construct` +// instances, even when the construct library is symlinked. +// +// Explanation: in JavaScript, multiple copies of the `constructs` library on +// disk are seen as independent, completely different libraries. As a +// consequence, the class `Construct` in each copy of the `constructs` library +// is seen as a different class, and an instance of one class will not test as +// `instanceof` the other class. `npm install` will not create installations +// like this, but users may manually symlink construct libraries together or +// use a monorepo tool: in those cases, multiple copies of the `constructs` +// library can be accidentally installed, and `instanceof` will behave +// unpredictably. It is safest to avoid using `instanceof`, and using +// this type-testing method instead. +// +// Returns: true if `x` is an object created from a class which extends `Construct`. +func KubeCronJobListV1Beta1_IsConstruct(x interface{}) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "k8s.KubeCronJobListV1Beta1", + "isConstruct", + []interface{}{x}, + &returns, + ) + + return returns +} + +// Renders a Kubernetes manifest for "io.k8s.api.batch.v1beta1.CronJobList". +// +// This can be used to inline resource manifests inside other objects (e.g. as templates). +func KubeCronJobListV1Beta1_Manifest(props *KubeCronJobListV1Beta1Props) interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "k8s.KubeCronJobListV1Beta1", + "manifest", + []interface{}{props}, + &returns, + ) + + return returns +} + +// Returns the `ApiObject` named `Resource` which is a child of the given construct. +// +// If `c` is an `ApiObject`, it is returned directly. Throws an +// exception if the construct does not have a child named `Default` _or_ if +// this child is not an `ApiObject`. +func KubeCronJobListV1Beta1_Of(c constructs.IConstruct) cdk8s.ApiObject { + _init_.Initialize() + + var returns cdk8s.ApiObject + + _jsii_.StaticInvoke( + "k8s.KubeCronJobListV1Beta1", + "of", + []interface{}{c}, + &returns, + ) + + return returns +} + +func KubeCronJobListV1Beta1_GVK() *cdk8s.GroupVersionKind { + _init_.Initialize() + var returns *cdk8s.GroupVersionKind + _jsii_.StaticGet( + "k8s.KubeCronJobListV1Beta1", + "GVK", + &returns, + ) + return returns +} + +func (k *jsiiProxy_KubeCronJobListV1Beta1) AddDependency(dependencies ...constructs.IConstruct) { + args := []interface{}{} + for _, a := range dependencies { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addDependency", + args, + ) +} + +func (k *jsiiProxy_KubeCronJobListV1Beta1) AddJsonPatch(ops ...cdk8s.JsonPatch) { + args := []interface{}{} + for _, a := range ops { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addJsonPatch", + args, + ) +} + +func (k *jsiiProxy_KubeCronJobListV1Beta1) ToJson() interface{} { + var returns interface{} + + _jsii_.Invoke( + k, + "toJson", + nil, // no parameters + &returns, + ) + + return returns +} + +func (k *jsiiProxy_KubeCronJobListV1Beta1) ToString() *string { + var returns *string + + _jsii_.Invoke( + k, + "toString", + nil, // no parameters + &returns, + ) + + return returns +} + +// CronJobList is a collection of cron jobs. +type KubeCronJobListV1Beta1Props struct { + // items is the list of CronJobs. + Items *[]*KubeCronJobV1Beta1Props `field:"required" json:"items" yaml:"items"` + // Standard list metadata. + // + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + Metadata *ListMeta `field:"optional" json:"metadata" yaml:"metadata"` +} + +// CronJob represents the configuration of a single cron job. +type KubeCronJobProps struct { + // Standard object's metadata. + // + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + Metadata *ObjectMeta `field:"optional" json:"metadata" yaml:"metadata"` + // Specification of the desired behavior of a cron job, including the schedule. + // + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + Spec *CronJobSpec `field:"optional" json:"spec" yaml:"spec"` +} + +// CronJob represents the configuration of a single cron job. +type KubeCronJobV1Beta1 interface { + cdk8s.ApiObject + // The group portion of the API version (e.g. `authorization.k8s.io`). + ApiGroup() *string + // The object's API version (e.g. `authorization.k8s.io/v1`). + ApiVersion() *string + // The chart in which this object is defined. + Chart() cdk8s.Chart + // The object kind. + Kind() *string + // Metadata associated with this API object. + Metadata() cdk8s.ApiObjectMetadataDefinition + // The name of the API object. + // + // If a name is specified in `metadata.name` this will be the name returned. + // Otherwise, a name will be generated by calling + // `AddHelm.of(this).generatedObjectName(this)`, which by default uses the + // construct path to generate a DNS-compatible name for the resource. + Name() *string + // The tree node. + Node() constructs.Node + // Create a dependency between this ApiObject and other constructs. + // + // These can be other ApiObjects, Charts, or custom. + AddDependency(dependencies ...constructs.IConstruct) + // Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. + // + // Example: + // kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true)); + // + AddJsonPatch(ops ...cdk8s.JsonPatch) + // Renders the object to Kubernetes JSON. + ToJson() interface{} + // Returns a string representation of this construct. + ToString() *string +} + +// The jsii proxy struct for KubeCronJobV1Beta1 +type jsiiProxy_KubeCronJobV1Beta1 struct { + internal.Type__cdk8sApiObject +} + +func (j *jsiiProxy_KubeCronJobV1Beta1) ApiGroup() *string { + var returns *string + _jsii_.Get( + j, + "apiGroup", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeCronJobV1Beta1) ApiVersion() *string { + var returns *string + _jsii_.Get( + j, + "apiVersion", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeCronJobV1Beta1) Chart() cdk8s.Chart { + var returns cdk8s.Chart + _jsii_.Get( + j, + "chart", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeCronJobV1Beta1) Kind() *string { + var returns *string + _jsii_.Get( + j, + "kind", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeCronJobV1Beta1) Metadata() cdk8s.ApiObjectMetadataDefinition { + var returns cdk8s.ApiObjectMetadataDefinition + _jsii_.Get( + j, + "metadata", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeCronJobV1Beta1) Name() *string { + var returns *string + _jsii_.Get( + j, + "name", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeCronJobV1Beta1) Node() constructs.Node { + var returns constructs.Node + _jsii_.Get( + j, + "node", + &returns, + ) + return returns +} + +// Defines a "io.k8s.api.batch.v1beta1.CronJob" API object. +func NewKubeCronJobV1Beta1(scope constructs.Construct, id *string, props *KubeCronJobV1Beta1Props) KubeCronJobV1Beta1 { + _init_.Initialize() + + j := jsiiProxy_KubeCronJobV1Beta1{} + + _jsii_.Create( + "k8s.KubeCronJobV1Beta1", + []interface{}{scope, id, props}, + &j, + ) + + return &j +} + +// Defines a "io.k8s.api.batch.v1beta1.CronJob" API object. +func NewKubeCronJobV1Beta1_Override(k KubeCronJobV1Beta1, scope constructs.Construct, id *string, props *KubeCronJobV1Beta1Props) { + _init_.Initialize() + + _jsii_.Create( + "k8s.KubeCronJobV1Beta1", + []interface{}{scope, id, props}, + k, + ) +} + +// Checks if `x` is a construct. +// +// Use this method instead of `instanceof` to properly detect `Construct` +// instances, even when the construct library is symlinked. +// +// Explanation: in JavaScript, multiple copies of the `constructs` library on +// disk are seen as independent, completely different libraries. As a +// consequence, the class `Construct` in each copy of the `constructs` library +// is seen as a different class, and an instance of one class will not test as +// `instanceof` the other class. `npm install` will not create installations +// like this, but users may manually symlink construct libraries together or +// use a monorepo tool: in those cases, multiple copies of the `constructs` +// library can be accidentally installed, and `instanceof` will behave +// unpredictably. It is safest to avoid using `instanceof`, and using +// this type-testing method instead. +// +// Returns: true if `x` is an object created from a class which extends `Construct`. +func KubeCronJobV1Beta1_IsConstruct(x interface{}) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "k8s.KubeCronJobV1Beta1", + "isConstruct", + []interface{}{x}, + &returns, + ) + + return returns +} + +// Renders a Kubernetes manifest for "io.k8s.api.batch.v1beta1.CronJob". +// +// This can be used to inline resource manifests inside other objects (e.g. as templates). +func KubeCronJobV1Beta1_Manifest(props *KubeCronJobV1Beta1Props) interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "k8s.KubeCronJobV1Beta1", + "manifest", + []interface{}{props}, + &returns, + ) + + return returns +} + +// Returns the `ApiObject` named `Resource` which is a child of the given construct. +// +// If `c` is an `ApiObject`, it is returned directly. Throws an +// exception if the construct does not have a child named `Default` _or_ if +// this child is not an `ApiObject`. +func KubeCronJobV1Beta1_Of(c constructs.IConstruct) cdk8s.ApiObject { + _init_.Initialize() + + var returns cdk8s.ApiObject + + _jsii_.StaticInvoke( + "k8s.KubeCronJobV1Beta1", + "of", + []interface{}{c}, + &returns, + ) + + return returns +} + +func KubeCronJobV1Beta1_GVK() *cdk8s.GroupVersionKind { + _init_.Initialize() + var returns *cdk8s.GroupVersionKind + _jsii_.StaticGet( + "k8s.KubeCronJobV1Beta1", + "GVK", + &returns, + ) + return returns +} + +func (k *jsiiProxy_KubeCronJobV1Beta1) AddDependency(dependencies ...constructs.IConstruct) { + args := []interface{}{} + for _, a := range dependencies { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addDependency", + args, + ) +} + +func (k *jsiiProxy_KubeCronJobV1Beta1) AddJsonPatch(ops ...cdk8s.JsonPatch) { + args := []interface{}{} + for _, a := range ops { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addJsonPatch", + args, + ) +} + +func (k *jsiiProxy_KubeCronJobV1Beta1) ToJson() interface{} { + var returns interface{} + + _jsii_.Invoke( + k, + "toJson", + nil, // no parameters + &returns, + ) + + return returns +} + +func (k *jsiiProxy_KubeCronJobV1Beta1) ToString() *string { + var returns *string + + _jsii_.Invoke( + k, + "toString", + nil, // no parameters + &returns, + ) + + return returns +} + +// CronJob represents the configuration of a single cron job. +type KubeCronJobV1Beta1Props struct { + // Standard object's metadata. + // + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + Metadata *ObjectMeta `field:"optional" json:"metadata" yaml:"metadata"` + // Specification of the desired behavior of a cron job, including the schedule. + // + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + Spec *CronJobSpecV1Beta1 `field:"optional" json:"spec" yaml:"spec"` +} + +// CSIDriver captures information about a Container Storage Interface (CSI) volume driver deployed on the cluster. +// +// Kubernetes attach detach controller uses this object to determine whether attach is required. Kubelet uses this object to determine whether pod information needs to be passed on mount. CSIDriver objects are non-namespaced. +type KubeCsiDriver interface { + cdk8s.ApiObject + // The group portion of the API version (e.g. `authorization.k8s.io`). + ApiGroup() *string + // The object's API version (e.g. `authorization.k8s.io/v1`). + ApiVersion() *string + // The chart in which this object is defined. + Chart() cdk8s.Chart + // The object kind. + Kind() *string + // Metadata associated with this API object. + Metadata() cdk8s.ApiObjectMetadataDefinition + // The name of the API object. + // + // If a name is specified in `metadata.name` this will be the name returned. + // Otherwise, a name will be generated by calling + // `AddHelm.of(this).generatedObjectName(this)`, which by default uses the + // construct path to generate a DNS-compatible name for the resource. + Name() *string + // The tree node. + Node() constructs.Node + // Create a dependency between this ApiObject and other constructs. + // + // These can be other ApiObjects, Charts, or custom. + AddDependency(dependencies ...constructs.IConstruct) + // Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. + // + // Example: + // kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true)); + // + AddJsonPatch(ops ...cdk8s.JsonPatch) + // Renders the object to Kubernetes JSON. + ToJson() interface{} + // Returns a string representation of this construct. + ToString() *string +} + +// The jsii proxy struct for KubeCsiDriver +type jsiiProxy_KubeCsiDriver struct { + internal.Type__cdk8sApiObject +} + +func (j *jsiiProxy_KubeCsiDriver) ApiGroup() *string { + var returns *string + _jsii_.Get( + j, + "apiGroup", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeCsiDriver) ApiVersion() *string { + var returns *string + _jsii_.Get( + j, + "apiVersion", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeCsiDriver) Chart() cdk8s.Chart { + var returns cdk8s.Chart + _jsii_.Get( + j, + "chart", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeCsiDriver) Kind() *string { + var returns *string + _jsii_.Get( + j, + "kind", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeCsiDriver) Metadata() cdk8s.ApiObjectMetadataDefinition { + var returns cdk8s.ApiObjectMetadataDefinition + _jsii_.Get( + j, + "metadata", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeCsiDriver) Name() *string { + var returns *string + _jsii_.Get( + j, + "name", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeCsiDriver) Node() constructs.Node { + var returns constructs.Node + _jsii_.Get( + j, + "node", + &returns, + ) + return returns +} + +// Defines a "io.k8s.api.storage.v1.CSIDriver" API object. +func NewKubeCsiDriver(scope constructs.Construct, id *string, props *KubeCsiDriverProps) KubeCsiDriver { + _init_.Initialize() + + j := jsiiProxy_KubeCsiDriver{} + + _jsii_.Create( + "k8s.KubeCsiDriver", + []interface{}{scope, id, props}, + &j, + ) + + return &j +} + +// Defines a "io.k8s.api.storage.v1.CSIDriver" API object. +func NewKubeCsiDriver_Override(k KubeCsiDriver, scope constructs.Construct, id *string, props *KubeCsiDriverProps) { + _init_.Initialize() + + _jsii_.Create( + "k8s.KubeCsiDriver", + []interface{}{scope, id, props}, + k, + ) +} + +// Checks if `x` is a construct. +// +// Use this method instead of `instanceof` to properly detect `Construct` +// instances, even when the construct library is symlinked. +// +// Explanation: in JavaScript, multiple copies of the `constructs` library on +// disk are seen as independent, completely different libraries. As a +// consequence, the class `Construct` in each copy of the `constructs` library +// is seen as a different class, and an instance of one class will not test as +// `instanceof` the other class. `npm install` will not create installations +// like this, but users may manually symlink construct libraries together or +// use a monorepo tool: in those cases, multiple copies of the `constructs` +// library can be accidentally installed, and `instanceof` will behave +// unpredictably. It is safest to avoid using `instanceof`, and using +// this type-testing method instead. +// +// Returns: true if `x` is an object created from a class which extends `Construct`. +func KubeCsiDriver_IsConstruct(x interface{}) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "k8s.KubeCsiDriver", + "isConstruct", + []interface{}{x}, + &returns, + ) + + return returns +} + +// Renders a Kubernetes manifest for "io.k8s.api.storage.v1.CSIDriver". +// +// This can be used to inline resource manifests inside other objects (e.g. as templates). +func KubeCsiDriver_Manifest(props *KubeCsiDriverProps) interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "k8s.KubeCsiDriver", + "manifest", + []interface{}{props}, + &returns, + ) + + return returns +} + +// Returns the `ApiObject` named `Resource` which is a child of the given construct. +// +// If `c` is an `ApiObject`, it is returned directly. Throws an +// exception if the construct does not have a child named `Default` _or_ if +// this child is not an `ApiObject`. +func KubeCsiDriver_Of(c constructs.IConstruct) cdk8s.ApiObject { + _init_.Initialize() + + var returns cdk8s.ApiObject + + _jsii_.StaticInvoke( + "k8s.KubeCsiDriver", + "of", + []interface{}{c}, + &returns, + ) + + return returns +} + +func KubeCsiDriver_GVK() *cdk8s.GroupVersionKind { + _init_.Initialize() + var returns *cdk8s.GroupVersionKind + _jsii_.StaticGet( + "k8s.KubeCsiDriver", + "GVK", + &returns, + ) + return returns +} + +func (k *jsiiProxy_KubeCsiDriver) AddDependency(dependencies ...constructs.IConstruct) { + args := []interface{}{} + for _, a := range dependencies { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addDependency", + args, + ) +} + +func (k *jsiiProxy_KubeCsiDriver) AddJsonPatch(ops ...cdk8s.JsonPatch) { + args := []interface{}{} + for _, a := range ops { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addJsonPatch", + args, + ) +} + +func (k *jsiiProxy_KubeCsiDriver) ToJson() interface{} { + var returns interface{} + + _jsii_.Invoke( + k, + "toJson", + nil, // no parameters + &returns, + ) + + return returns +} + +func (k *jsiiProxy_KubeCsiDriver) ToString() *string { + var returns *string + + _jsii_.Invoke( + k, + "toString", + nil, // no parameters + &returns, + ) + + return returns +} + +// CSIDriverList is a collection of CSIDriver objects. +type KubeCsiDriverList interface { + cdk8s.ApiObject + // The group portion of the API version (e.g. `authorization.k8s.io`). + ApiGroup() *string + // The object's API version (e.g. `authorization.k8s.io/v1`). + ApiVersion() *string + // The chart in which this object is defined. + Chart() cdk8s.Chart + // The object kind. + Kind() *string + // Metadata associated with this API object. + Metadata() cdk8s.ApiObjectMetadataDefinition + // The name of the API object. + // + // If a name is specified in `metadata.name` this will be the name returned. + // Otherwise, a name will be generated by calling + // `AddHelm.of(this).generatedObjectName(this)`, which by default uses the + // construct path to generate a DNS-compatible name for the resource. + Name() *string + // The tree node. + Node() constructs.Node + // Create a dependency between this ApiObject and other constructs. + // + // These can be other ApiObjects, Charts, or custom. + AddDependency(dependencies ...constructs.IConstruct) + // Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. + // + // Example: + // kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true)); + // + AddJsonPatch(ops ...cdk8s.JsonPatch) + // Renders the object to Kubernetes JSON. + ToJson() interface{} + // Returns a string representation of this construct. + ToString() *string +} + +// The jsii proxy struct for KubeCsiDriverList +type jsiiProxy_KubeCsiDriverList struct { + internal.Type__cdk8sApiObject +} + +func (j *jsiiProxy_KubeCsiDriverList) ApiGroup() *string { + var returns *string + _jsii_.Get( + j, + "apiGroup", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeCsiDriverList) ApiVersion() *string { + var returns *string + _jsii_.Get( + j, + "apiVersion", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeCsiDriverList) Chart() cdk8s.Chart { + var returns cdk8s.Chart + _jsii_.Get( + j, + "chart", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeCsiDriverList) Kind() *string { + var returns *string + _jsii_.Get( + j, + "kind", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeCsiDriverList) Metadata() cdk8s.ApiObjectMetadataDefinition { + var returns cdk8s.ApiObjectMetadataDefinition + _jsii_.Get( + j, + "metadata", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeCsiDriverList) Name() *string { + var returns *string + _jsii_.Get( + j, + "name", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeCsiDriverList) Node() constructs.Node { + var returns constructs.Node + _jsii_.Get( + j, + "node", + &returns, + ) + return returns +} + +// Defines a "io.k8s.api.storage.v1.CSIDriverList" API object. +func NewKubeCsiDriverList(scope constructs.Construct, id *string, props *KubeCsiDriverListProps) KubeCsiDriverList { + _init_.Initialize() + + j := jsiiProxy_KubeCsiDriverList{} + + _jsii_.Create( + "k8s.KubeCsiDriverList", + []interface{}{scope, id, props}, + &j, + ) + + return &j +} + +// Defines a "io.k8s.api.storage.v1.CSIDriverList" API object. +func NewKubeCsiDriverList_Override(k KubeCsiDriverList, scope constructs.Construct, id *string, props *KubeCsiDriverListProps) { + _init_.Initialize() + + _jsii_.Create( + "k8s.KubeCsiDriverList", + []interface{}{scope, id, props}, + k, + ) +} + +// Checks if `x` is a construct. +// +// Use this method instead of `instanceof` to properly detect `Construct` +// instances, even when the construct library is symlinked. +// +// Explanation: in JavaScript, multiple copies of the `constructs` library on +// disk are seen as independent, completely different libraries. As a +// consequence, the class `Construct` in each copy of the `constructs` library +// is seen as a different class, and an instance of one class will not test as +// `instanceof` the other class. `npm install` will not create installations +// like this, but users may manually symlink construct libraries together or +// use a monorepo tool: in those cases, multiple copies of the `constructs` +// library can be accidentally installed, and `instanceof` will behave +// unpredictably. It is safest to avoid using `instanceof`, and using +// this type-testing method instead. +// +// Returns: true if `x` is an object created from a class which extends `Construct`. +func KubeCsiDriverList_IsConstruct(x interface{}) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "k8s.KubeCsiDriverList", + "isConstruct", + []interface{}{x}, + &returns, + ) + + return returns +} + +// Renders a Kubernetes manifest for "io.k8s.api.storage.v1.CSIDriverList". +// +// This can be used to inline resource manifests inside other objects (e.g. as templates). +func KubeCsiDriverList_Manifest(props *KubeCsiDriverListProps) interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "k8s.KubeCsiDriverList", + "manifest", + []interface{}{props}, + &returns, + ) + + return returns +} + +// Returns the `ApiObject` named `Resource` which is a child of the given construct. +// +// If `c` is an `ApiObject`, it is returned directly. Throws an +// exception if the construct does not have a child named `Default` _or_ if +// this child is not an `ApiObject`. +func KubeCsiDriverList_Of(c constructs.IConstruct) cdk8s.ApiObject { + _init_.Initialize() + + var returns cdk8s.ApiObject + + _jsii_.StaticInvoke( + "k8s.KubeCsiDriverList", + "of", + []interface{}{c}, + &returns, + ) + + return returns +} + +func KubeCsiDriverList_GVK() *cdk8s.GroupVersionKind { + _init_.Initialize() + var returns *cdk8s.GroupVersionKind + _jsii_.StaticGet( + "k8s.KubeCsiDriverList", + "GVK", + &returns, + ) + return returns +} + +func (k *jsiiProxy_KubeCsiDriverList) AddDependency(dependencies ...constructs.IConstruct) { + args := []interface{}{} + for _, a := range dependencies { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addDependency", + args, + ) +} + +func (k *jsiiProxy_KubeCsiDriverList) AddJsonPatch(ops ...cdk8s.JsonPatch) { + args := []interface{}{} + for _, a := range ops { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addJsonPatch", + args, + ) +} + +func (k *jsiiProxy_KubeCsiDriverList) ToJson() interface{} { + var returns interface{} + + _jsii_.Invoke( + k, + "toJson", + nil, // no parameters + &returns, + ) + + return returns +} + +func (k *jsiiProxy_KubeCsiDriverList) ToString() *string { + var returns *string + + _jsii_.Invoke( + k, + "toString", + nil, // no parameters + &returns, + ) + + return returns +} + +// CSIDriverList is a collection of CSIDriver objects. +type KubeCsiDriverListProps struct { + // items is the list of CSIDriver. + Items *[]*KubeCsiDriverProps `field:"required" json:"items" yaml:"items"` + // Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata. + Metadata *ListMeta `field:"optional" json:"metadata" yaml:"metadata"` +} + +// CSIDriver captures information about a Container Storage Interface (CSI) volume driver deployed on the cluster. +// +// Kubernetes attach detach controller uses this object to determine whether attach is required. Kubelet uses this object to determine whether pod information needs to be passed on mount. CSIDriver objects are non-namespaced. +type KubeCsiDriverProps struct { + // Specification of the CSI Driver. + Spec *CsiDriverSpec `field:"required" json:"spec" yaml:"spec"` + // Standard object metadata. + // + // metadata.Name indicates the name of the CSI driver that this object refers to; it MUST be the same name returned by the CSI GetPluginName() call for that driver. The driver name must be 63 characters or less, beginning and ending with an alphanumeric character ([a-z0-9A-Z]) with dashes (-), dots (.), and alphanumerics between. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + Metadata *ObjectMeta `field:"optional" json:"metadata" yaml:"metadata"` +} + +// CSINode holds information about all CSI drivers installed on a node. +// +// CSI drivers do not need to create the CSINode object directly. As long as they use the node-driver-registrar sidecar container, the kubelet will automatically populate the CSINode object for the CSI driver as part of kubelet plugin registration. CSINode has the same name as a node. If the object is missing, it means either there are no CSI Drivers available on the node, or the Kubelet version is low enough that it doesn't create this object. CSINode has an OwnerReference that points to the corresponding node object. +type KubeCsiNode interface { + cdk8s.ApiObject + // The group portion of the API version (e.g. `authorization.k8s.io`). + ApiGroup() *string + // The object's API version (e.g. `authorization.k8s.io/v1`). + ApiVersion() *string + // The chart in which this object is defined. + Chart() cdk8s.Chart + // The object kind. + Kind() *string + // Metadata associated with this API object. + Metadata() cdk8s.ApiObjectMetadataDefinition + // The name of the API object. + // + // If a name is specified in `metadata.name` this will be the name returned. + // Otherwise, a name will be generated by calling + // `AddHelm.of(this).generatedObjectName(this)`, which by default uses the + // construct path to generate a DNS-compatible name for the resource. + Name() *string + // The tree node. + Node() constructs.Node + // Create a dependency between this ApiObject and other constructs. + // + // These can be other ApiObjects, Charts, or custom. + AddDependency(dependencies ...constructs.IConstruct) + // Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. + // + // Example: + // kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true)); + // + AddJsonPatch(ops ...cdk8s.JsonPatch) + // Renders the object to Kubernetes JSON. + ToJson() interface{} + // Returns a string representation of this construct. + ToString() *string +} + +// The jsii proxy struct for KubeCsiNode +type jsiiProxy_KubeCsiNode struct { + internal.Type__cdk8sApiObject +} + +func (j *jsiiProxy_KubeCsiNode) ApiGroup() *string { + var returns *string + _jsii_.Get( + j, + "apiGroup", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeCsiNode) ApiVersion() *string { + var returns *string + _jsii_.Get( + j, + "apiVersion", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeCsiNode) Chart() cdk8s.Chart { + var returns cdk8s.Chart + _jsii_.Get( + j, + "chart", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeCsiNode) Kind() *string { + var returns *string + _jsii_.Get( + j, + "kind", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeCsiNode) Metadata() cdk8s.ApiObjectMetadataDefinition { + var returns cdk8s.ApiObjectMetadataDefinition + _jsii_.Get( + j, + "metadata", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeCsiNode) Name() *string { + var returns *string + _jsii_.Get( + j, + "name", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeCsiNode) Node() constructs.Node { + var returns constructs.Node + _jsii_.Get( + j, + "node", + &returns, + ) + return returns +} + +// Defines a "io.k8s.api.storage.v1.CSINode" API object. +func NewKubeCsiNode(scope constructs.Construct, id *string, props *KubeCsiNodeProps) KubeCsiNode { + _init_.Initialize() + + j := jsiiProxy_KubeCsiNode{} + + _jsii_.Create( + "k8s.KubeCsiNode", + []interface{}{scope, id, props}, + &j, + ) + + return &j +} + +// Defines a "io.k8s.api.storage.v1.CSINode" API object. +func NewKubeCsiNode_Override(k KubeCsiNode, scope constructs.Construct, id *string, props *KubeCsiNodeProps) { + _init_.Initialize() + + _jsii_.Create( + "k8s.KubeCsiNode", + []interface{}{scope, id, props}, + k, + ) +} + +// Checks if `x` is a construct. +// +// Use this method instead of `instanceof` to properly detect `Construct` +// instances, even when the construct library is symlinked. +// +// Explanation: in JavaScript, multiple copies of the `constructs` library on +// disk are seen as independent, completely different libraries. As a +// consequence, the class `Construct` in each copy of the `constructs` library +// is seen as a different class, and an instance of one class will not test as +// `instanceof` the other class. `npm install` will not create installations +// like this, but users may manually symlink construct libraries together or +// use a monorepo tool: in those cases, multiple copies of the `constructs` +// library can be accidentally installed, and `instanceof` will behave +// unpredictably. It is safest to avoid using `instanceof`, and using +// this type-testing method instead. +// +// Returns: true if `x` is an object created from a class which extends `Construct`. +func KubeCsiNode_IsConstruct(x interface{}) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "k8s.KubeCsiNode", + "isConstruct", + []interface{}{x}, + &returns, + ) + + return returns +} + +// Renders a Kubernetes manifest for "io.k8s.api.storage.v1.CSINode". +// +// This can be used to inline resource manifests inside other objects (e.g. as templates). +func KubeCsiNode_Manifest(props *KubeCsiNodeProps) interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "k8s.KubeCsiNode", + "manifest", + []interface{}{props}, + &returns, + ) + + return returns +} + +// Returns the `ApiObject` named `Resource` which is a child of the given construct. +// +// If `c` is an `ApiObject`, it is returned directly. Throws an +// exception if the construct does not have a child named `Default` _or_ if +// this child is not an `ApiObject`. +func KubeCsiNode_Of(c constructs.IConstruct) cdk8s.ApiObject { + _init_.Initialize() + + var returns cdk8s.ApiObject + + _jsii_.StaticInvoke( + "k8s.KubeCsiNode", + "of", + []interface{}{c}, + &returns, + ) + + return returns +} + +func KubeCsiNode_GVK() *cdk8s.GroupVersionKind { + _init_.Initialize() + var returns *cdk8s.GroupVersionKind + _jsii_.StaticGet( + "k8s.KubeCsiNode", + "GVK", + &returns, + ) + return returns +} + +func (k *jsiiProxy_KubeCsiNode) AddDependency(dependencies ...constructs.IConstruct) { + args := []interface{}{} + for _, a := range dependencies { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addDependency", + args, + ) +} + +func (k *jsiiProxy_KubeCsiNode) AddJsonPatch(ops ...cdk8s.JsonPatch) { + args := []interface{}{} + for _, a := range ops { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addJsonPatch", + args, + ) +} + +func (k *jsiiProxy_KubeCsiNode) ToJson() interface{} { + var returns interface{} + + _jsii_.Invoke( + k, + "toJson", + nil, // no parameters + &returns, + ) + + return returns +} + +func (k *jsiiProxy_KubeCsiNode) ToString() *string { + var returns *string + + _jsii_.Invoke( + k, + "toString", + nil, // no parameters + &returns, + ) + + return returns +} + +// CSINodeList is a collection of CSINode objects. +type KubeCsiNodeList interface { + cdk8s.ApiObject + // The group portion of the API version (e.g. `authorization.k8s.io`). + ApiGroup() *string + // The object's API version (e.g. `authorization.k8s.io/v1`). + ApiVersion() *string + // The chart in which this object is defined. + Chart() cdk8s.Chart + // The object kind. + Kind() *string + // Metadata associated with this API object. + Metadata() cdk8s.ApiObjectMetadataDefinition + // The name of the API object. + // + // If a name is specified in `metadata.name` this will be the name returned. + // Otherwise, a name will be generated by calling + // `AddHelm.of(this).generatedObjectName(this)`, which by default uses the + // construct path to generate a DNS-compatible name for the resource. + Name() *string + // The tree node. + Node() constructs.Node + // Create a dependency between this ApiObject and other constructs. + // + // These can be other ApiObjects, Charts, or custom. + AddDependency(dependencies ...constructs.IConstruct) + // Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. + // + // Example: + // kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true)); + // + AddJsonPatch(ops ...cdk8s.JsonPatch) + // Renders the object to Kubernetes JSON. + ToJson() interface{} + // Returns a string representation of this construct. + ToString() *string +} + +// The jsii proxy struct for KubeCsiNodeList +type jsiiProxy_KubeCsiNodeList struct { + internal.Type__cdk8sApiObject +} + +func (j *jsiiProxy_KubeCsiNodeList) ApiGroup() *string { + var returns *string + _jsii_.Get( + j, + "apiGroup", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeCsiNodeList) ApiVersion() *string { + var returns *string + _jsii_.Get( + j, + "apiVersion", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeCsiNodeList) Chart() cdk8s.Chart { + var returns cdk8s.Chart + _jsii_.Get( + j, + "chart", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeCsiNodeList) Kind() *string { + var returns *string + _jsii_.Get( + j, + "kind", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeCsiNodeList) Metadata() cdk8s.ApiObjectMetadataDefinition { + var returns cdk8s.ApiObjectMetadataDefinition + _jsii_.Get( + j, + "metadata", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeCsiNodeList) Name() *string { + var returns *string + _jsii_.Get( + j, + "name", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeCsiNodeList) Node() constructs.Node { + var returns constructs.Node + _jsii_.Get( + j, + "node", + &returns, + ) + return returns +} + +// Defines a "io.k8s.api.storage.v1.CSINodeList" API object. +func NewKubeCsiNodeList(scope constructs.Construct, id *string, props *KubeCsiNodeListProps) KubeCsiNodeList { + _init_.Initialize() + + j := jsiiProxy_KubeCsiNodeList{} + + _jsii_.Create( + "k8s.KubeCsiNodeList", + []interface{}{scope, id, props}, + &j, + ) + + return &j +} + +// Defines a "io.k8s.api.storage.v1.CSINodeList" API object. +func NewKubeCsiNodeList_Override(k KubeCsiNodeList, scope constructs.Construct, id *string, props *KubeCsiNodeListProps) { + _init_.Initialize() + + _jsii_.Create( + "k8s.KubeCsiNodeList", + []interface{}{scope, id, props}, + k, + ) +} + +// Checks if `x` is a construct. +// +// Use this method instead of `instanceof` to properly detect `Construct` +// instances, even when the construct library is symlinked. +// +// Explanation: in JavaScript, multiple copies of the `constructs` library on +// disk are seen as independent, completely different libraries. As a +// consequence, the class `Construct` in each copy of the `constructs` library +// is seen as a different class, and an instance of one class will not test as +// `instanceof` the other class. `npm install` will not create installations +// like this, but users may manually symlink construct libraries together or +// use a monorepo tool: in those cases, multiple copies of the `constructs` +// library can be accidentally installed, and `instanceof` will behave +// unpredictably. It is safest to avoid using `instanceof`, and using +// this type-testing method instead. +// +// Returns: true if `x` is an object created from a class which extends `Construct`. +func KubeCsiNodeList_IsConstruct(x interface{}) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "k8s.KubeCsiNodeList", + "isConstruct", + []interface{}{x}, + &returns, + ) + + return returns +} + +// Renders a Kubernetes manifest for "io.k8s.api.storage.v1.CSINodeList". +// +// This can be used to inline resource manifests inside other objects (e.g. as templates). +func KubeCsiNodeList_Manifest(props *KubeCsiNodeListProps) interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "k8s.KubeCsiNodeList", + "manifest", + []interface{}{props}, + &returns, + ) + + return returns +} + +// Returns the `ApiObject` named `Resource` which is a child of the given construct. +// +// If `c` is an `ApiObject`, it is returned directly. Throws an +// exception if the construct does not have a child named `Default` _or_ if +// this child is not an `ApiObject`. +func KubeCsiNodeList_Of(c constructs.IConstruct) cdk8s.ApiObject { + _init_.Initialize() + + var returns cdk8s.ApiObject + + _jsii_.StaticInvoke( + "k8s.KubeCsiNodeList", + "of", + []interface{}{c}, + &returns, + ) + + return returns +} + +func KubeCsiNodeList_GVK() *cdk8s.GroupVersionKind { + _init_.Initialize() + var returns *cdk8s.GroupVersionKind + _jsii_.StaticGet( + "k8s.KubeCsiNodeList", + "GVK", + &returns, + ) + return returns +} + +func (k *jsiiProxy_KubeCsiNodeList) AddDependency(dependencies ...constructs.IConstruct) { + args := []interface{}{} + for _, a := range dependencies { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addDependency", + args, + ) +} + +func (k *jsiiProxy_KubeCsiNodeList) AddJsonPatch(ops ...cdk8s.JsonPatch) { + args := []interface{}{} + for _, a := range ops { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addJsonPatch", + args, + ) +} + +func (k *jsiiProxy_KubeCsiNodeList) ToJson() interface{} { + var returns interface{} + + _jsii_.Invoke( + k, + "toJson", + nil, // no parameters + &returns, + ) + + return returns +} + +func (k *jsiiProxy_KubeCsiNodeList) ToString() *string { + var returns *string + + _jsii_.Invoke( + k, + "toString", + nil, // no parameters + &returns, + ) + + return returns +} + +// CSINodeList is a collection of CSINode objects. +type KubeCsiNodeListProps struct { + // items is the list of CSINode. + Items *[]*KubeCsiNodeProps `field:"required" json:"items" yaml:"items"` + // Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata. + Metadata *ListMeta `field:"optional" json:"metadata" yaml:"metadata"` +} + +// CSINode holds information about all CSI drivers installed on a node. +// +// CSI drivers do not need to create the CSINode object directly. As long as they use the node-driver-registrar sidecar container, the kubelet will automatically populate the CSINode object for the CSI driver as part of kubelet plugin registration. CSINode has the same name as a node. If the object is missing, it means either there are no CSI Drivers available on the node, or the Kubelet version is low enough that it doesn't create this object. CSINode has an OwnerReference that points to the corresponding node object. +type KubeCsiNodeProps struct { + // spec is the specification of CSINode. + Spec *CsiNodeSpec `field:"required" json:"spec" yaml:"spec"` + // metadata.name must be the Kubernetes node name. + Metadata *ObjectMeta `field:"optional" json:"metadata" yaml:"metadata"` +} + +// CSIStorageCapacityList is a collection of CSIStorageCapacity objects. +type KubeCsiStorageCapacityListV1Alpha1 interface { + cdk8s.ApiObject + // The group portion of the API version (e.g. `authorization.k8s.io`). + ApiGroup() *string + // The object's API version (e.g. `authorization.k8s.io/v1`). + ApiVersion() *string + // The chart in which this object is defined. + Chart() cdk8s.Chart + // The object kind. + Kind() *string + // Metadata associated with this API object. + Metadata() cdk8s.ApiObjectMetadataDefinition + // The name of the API object. + // + // If a name is specified in `metadata.name` this will be the name returned. + // Otherwise, a name will be generated by calling + // `AddHelm.of(this).generatedObjectName(this)`, which by default uses the + // construct path to generate a DNS-compatible name for the resource. + Name() *string + // The tree node. + Node() constructs.Node + // Create a dependency between this ApiObject and other constructs. + // + // These can be other ApiObjects, Charts, or custom. + AddDependency(dependencies ...constructs.IConstruct) + // Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. + // + // Example: + // kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true)); + // + AddJsonPatch(ops ...cdk8s.JsonPatch) + // Renders the object to Kubernetes JSON. + ToJson() interface{} + // Returns a string representation of this construct. + ToString() *string +} + +// The jsii proxy struct for KubeCsiStorageCapacityListV1Alpha1 +type jsiiProxy_KubeCsiStorageCapacityListV1Alpha1 struct { + internal.Type__cdk8sApiObject +} + +func (j *jsiiProxy_KubeCsiStorageCapacityListV1Alpha1) ApiGroup() *string { + var returns *string + _jsii_.Get( + j, + "apiGroup", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeCsiStorageCapacityListV1Alpha1) ApiVersion() *string { + var returns *string + _jsii_.Get( + j, + "apiVersion", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeCsiStorageCapacityListV1Alpha1) Chart() cdk8s.Chart { + var returns cdk8s.Chart + _jsii_.Get( + j, + "chart", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeCsiStorageCapacityListV1Alpha1) Kind() *string { + var returns *string + _jsii_.Get( + j, + "kind", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeCsiStorageCapacityListV1Alpha1) Metadata() cdk8s.ApiObjectMetadataDefinition { + var returns cdk8s.ApiObjectMetadataDefinition + _jsii_.Get( + j, + "metadata", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeCsiStorageCapacityListV1Alpha1) Name() *string { + var returns *string + _jsii_.Get( + j, + "name", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeCsiStorageCapacityListV1Alpha1) Node() constructs.Node { + var returns constructs.Node + _jsii_.Get( + j, + "node", + &returns, + ) + return returns +} + +// Defines a "io.k8s.api.storage.v1alpha1.CSIStorageCapacityList" API object. +func NewKubeCsiStorageCapacityListV1Alpha1(scope constructs.Construct, id *string, props *KubeCsiStorageCapacityListV1Alpha1Props) KubeCsiStorageCapacityListV1Alpha1 { + _init_.Initialize() + + j := jsiiProxy_KubeCsiStorageCapacityListV1Alpha1{} + + _jsii_.Create( + "k8s.KubeCsiStorageCapacityListV1Alpha1", + []interface{}{scope, id, props}, + &j, + ) + + return &j +} + +// Defines a "io.k8s.api.storage.v1alpha1.CSIStorageCapacityList" API object. +func NewKubeCsiStorageCapacityListV1Alpha1_Override(k KubeCsiStorageCapacityListV1Alpha1, scope constructs.Construct, id *string, props *KubeCsiStorageCapacityListV1Alpha1Props) { + _init_.Initialize() + + _jsii_.Create( + "k8s.KubeCsiStorageCapacityListV1Alpha1", + []interface{}{scope, id, props}, + k, + ) +} + +// Checks if `x` is a construct. +// +// Use this method instead of `instanceof` to properly detect `Construct` +// instances, even when the construct library is symlinked. +// +// Explanation: in JavaScript, multiple copies of the `constructs` library on +// disk are seen as independent, completely different libraries. As a +// consequence, the class `Construct` in each copy of the `constructs` library +// is seen as a different class, and an instance of one class will not test as +// `instanceof` the other class. `npm install` will not create installations +// like this, but users may manually symlink construct libraries together or +// use a monorepo tool: in those cases, multiple copies of the `constructs` +// library can be accidentally installed, and `instanceof` will behave +// unpredictably. It is safest to avoid using `instanceof`, and using +// this type-testing method instead. +// +// Returns: true if `x` is an object created from a class which extends `Construct`. +func KubeCsiStorageCapacityListV1Alpha1_IsConstruct(x interface{}) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "k8s.KubeCsiStorageCapacityListV1Alpha1", + "isConstruct", + []interface{}{x}, + &returns, + ) + + return returns +} + +// Renders a Kubernetes manifest for "io.k8s.api.storage.v1alpha1.CSIStorageCapacityList". +// +// This can be used to inline resource manifests inside other objects (e.g. as templates). +func KubeCsiStorageCapacityListV1Alpha1_Manifest(props *KubeCsiStorageCapacityListV1Alpha1Props) interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "k8s.KubeCsiStorageCapacityListV1Alpha1", + "manifest", + []interface{}{props}, + &returns, + ) + + return returns +} + +// Returns the `ApiObject` named `Resource` which is a child of the given construct. +// +// If `c` is an `ApiObject`, it is returned directly. Throws an +// exception if the construct does not have a child named `Default` _or_ if +// this child is not an `ApiObject`. +func KubeCsiStorageCapacityListV1Alpha1_Of(c constructs.IConstruct) cdk8s.ApiObject { + _init_.Initialize() + + var returns cdk8s.ApiObject + + _jsii_.StaticInvoke( + "k8s.KubeCsiStorageCapacityListV1Alpha1", + "of", + []interface{}{c}, + &returns, + ) + + return returns +} + +func KubeCsiStorageCapacityListV1Alpha1_GVK() *cdk8s.GroupVersionKind { + _init_.Initialize() + var returns *cdk8s.GroupVersionKind + _jsii_.StaticGet( + "k8s.KubeCsiStorageCapacityListV1Alpha1", + "GVK", + &returns, + ) + return returns +} + +func (k *jsiiProxy_KubeCsiStorageCapacityListV1Alpha1) AddDependency(dependencies ...constructs.IConstruct) { + args := []interface{}{} + for _, a := range dependencies { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addDependency", + args, + ) +} + +func (k *jsiiProxy_KubeCsiStorageCapacityListV1Alpha1) AddJsonPatch(ops ...cdk8s.JsonPatch) { + args := []interface{}{} + for _, a := range ops { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addJsonPatch", + args, + ) +} + +func (k *jsiiProxy_KubeCsiStorageCapacityListV1Alpha1) ToJson() interface{} { + var returns interface{} + + _jsii_.Invoke( + k, + "toJson", + nil, // no parameters + &returns, + ) + + return returns +} + +func (k *jsiiProxy_KubeCsiStorageCapacityListV1Alpha1) ToString() *string { + var returns *string + + _jsii_.Invoke( + k, + "toString", + nil, // no parameters + &returns, + ) + + return returns +} + +// CSIStorageCapacityList is a collection of CSIStorageCapacity objects. +type KubeCsiStorageCapacityListV1Alpha1Props struct { + // Items is the list of CSIStorageCapacity objects. + Items *[]*KubeCsiStorageCapacityV1Alpha1Props `field:"required" json:"items" yaml:"items"` + // Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata. + Metadata *ListMeta `field:"optional" json:"metadata" yaml:"metadata"` +} + +// CSIStorageCapacityList is a collection of CSIStorageCapacity objects. +type KubeCsiStorageCapacityListV1Beta1 interface { + cdk8s.ApiObject + // The group portion of the API version (e.g. `authorization.k8s.io`). + ApiGroup() *string + // The object's API version (e.g. `authorization.k8s.io/v1`). + ApiVersion() *string + // The chart in which this object is defined. + Chart() cdk8s.Chart + // The object kind. + Kind() *string + // Metadata associated with this API object. + Metadata() cdk8s.ApiObjectMetadataDefinition + // The name of the API object. + // + // If a name is specified in `metadata.name` this will be the name returned. + // Otherwise, a name will be generated by calling + // `AddHelm.of(this).generatedObjectName(this)`, which by default uses the + // construct path to generate a DNS-compatible name for the resource. + Name() *string + // The tree node. + Node() constructs.Node + // Create a dependency between this ApiObject and other constructs. + // + // These can be other ApiObjects, Charts, or custom. + AddDependency(dependencies ...constructs.IConstruct) + // Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. + // + // Example: + // kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true)); + // + AddJsonPatch(ops ...cdk8s.JsonPatch) + // Renders the object to Kubernetes JSON. + ToJson() interface{} + // Returns a string representation of this construct. + ToString() *string +} + +// The jsii proxy struct for KubeCsiStorageCapacityListV1Beta1 +type jsiiProxy_KubeCsiStorageCapacityListV1Beta1 struct { + internal.Type__cdk8sApiObject +} + +func (j *jsiiProxy_KubeCsiStorageCapacityListV1Beta1) ApiGroup() *string { + var returns *string + _jsii_.Get( + j, + "apiGroup", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeCsiStorageCapacityListV1Beta1) ApiVersion() *string { + var returns *string + _jsii_.Get( + j, + "apiVersion", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeCsiStorageCapacityListV1Beta1) Chart() cdk8s.Chart { + var returns cdk8s.Chart + _jsii_.Get( + j, + "chart", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeCsiStorageCapacityListV1Beta1) Kind() *string { + var returns *string + _jsii_.Get( + j, + "kind", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeCsiStorageCapacityListV1Beta1) Metadata() cdk8s.ApiObjectMetadataDefinition { + var returns cdk8s.ApiObjectMetadataDefinition + _jsii_.Get( + j, + "metadata", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeCsiStorageCapacityListV1Beta1) Name() *string { + var returns *string + _jsii_.Get( + j, + "name", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeCsiStorageCapacityListV1Beta1) Node() constructs.Node { + var returns constructs.Node + _jsii_.Get( + j, + "node", + &returns, + ) + return returns +} + +// Defines a "io.k8s.api.storage.v1beta1.CSIStorageCapacityList" API object. +func NewKubeCsiStorageCapacityListV1Beta1(scope constructs.Construct, id *string, props *KubeCsiStorageCapacityListV1Beta1Props) KubeCsiStorageCapacityListV1Beta1 { + _init_.Initialize() + + j := jsiiProxy_KubeCsiStorageCapacityListV1Beta1{} + + _jsii_.Create( + "k8s.KubeCsiStorageCapacityListV1Beta1", + []interface{}{scope, id, props}, + &j, + ) + + return &j +} + +// Defines a "io.k8s.api.storage.v1beta1.CSIStorageCapacityList" API object. +func NewKubeCsiStorageCapacityListV1Beta1_Override(k KubeCsiStorageCapacityListV1Beta1, scope constructs.Construct, id *string, props *KubeCsiStorageCapacityListV1Beta1Props) { + _init_.Initialize() + + _jsii_.Create( + "k8s.KubeCsiStorageCapacityListV1Beta1", + []interface{}{scope, id, props}, + k, + ) +} + +// Checks if `x` is a construct. +// +// Use this method instead of `instanceof` to properly detect `Construct` +// instances, even when the construct library is symlinked. +// +// Explanation: in JavaScript, multiple copies of the `constructs` library on +// disk are seen as independent, completely different libraries. As a +// consequence, the class `Construct` in each copy of the `constructs` library +// is seen as a different class, and an instance of one class will not test as +// `instanceof` the other class. `npm install` will not create installations +// like this, but users may manually symlink construct libraries together or +// use a monorepo tool: in those cases, multiple copies of the `constructs` +// library can be accidentally installed, and `instanceof` will behave +// unpredictably. It is safest to avoid using `instanceof`, and using +// this type-testing method instead. +// +// Returns: true if `x` is an object created from a class which extends `Construct`. +func KubeCsiStorageCapacityListV1Beta1_IsConstruct(x interface{}) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "k8s.KubeCsiStorageCapacityListV1Beta1", + "isConstruct", + []interface{}{x}, + &returns, + ) + + return returns +} + +// Renders a Kubernetes manifest for "io.k8s.api.storage.v1beta1.CSIStorageCapacityList". +// +// This can be used to inline resource manifests inside other objects (e.g. as templates). +func KubeCsiStorageCapacityListV1Beta1_Manifest(props *KubeCsiStorageCapacityListV1Beta1Props) interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "k8s.KubeCsiStorageCapacityListV1Beta1", + "manifest", + []interface{}{props}, + &returns, + ) + + return returns +} + +// Returns the `ApiObject` named `Resource` which is a child of the given construct. +// +// If `c` is an `ApiObject`, it is returned directly. Throws an +// exception if the construct does not have a child named `Default` _or_ if +// this child is not an `ApiObject`. +func KubeCsiStorageCapacityListV1Beta1_Of(c constructs.IConstruct) cdk8s.ApiObject { + _init_.Initialize() + + var returns cdk8s.ApiObject + + _jsii_.StaticInvoke( + "k8s.KubeCsiStorageCapacityListV1Beta1", + "of", + []interface{}{c}, + &returns, + ) + + return returns +} + +func KubeCsiStorageCapacityListV1Beta1_GVK() *cdk8s.GroupVersionKind { + _init_.Initialize() + var returns *cdk8s.GroupVersionKind + _jsii_.StaticGet( + "k8s.KubeCsiStorageCapacityListV1Beta1", + "GVK", + &returns, + ) + return returns +} + +func (k *jsiiProxy_KubeCsiStorageCapacityListV1Beta1) AddDependency(dependencies ...constructs.IConstruct) { + args := []interface{}{} + for _, a := range dependencies { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addDependency", + args, + ) +} + +func (k *jsiiProxy_KubeCsiStorageCapacityListV1Beta1) AddJsonPatch(ops ...cdk8s.JsonPatch) { + args := []interface{}{} + for _, a := range ops { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addJsonPatch", + args, + ) +} + +func (k *jsiiProxy_KubeCsiStorageCapacityListV1Beta1) ToJson() interface{} { + var returns interface{} + + _jsii_.Invoke( + k, + "toJson", + nil, // no parameters + &returns, + ) + + return returns +} + +func (k *jsiiProxy_KubeCsiStorageCapacityListV1Beta1) ToString() *string { + var returns *string + + _jsii_.Invoke( + k, + "toString", + nil, // no parameters + &returns, + ) + + return returns +} + +// CSIStorageCapacityList is a collection of CSIStorageCapacity objects. +type KubeCsiStorageCapacityListV1Beta1Props struct { + // Items is the list of CSIStorageCapacity objects. + Items *[]*KubeCsiStorageCapacityV1Beta1Props `field:"required" json:"items" yaml:"items"` + // Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata. + Metadata *ListMeta `field:"optional" json:"metadata" yaml:"metadata"` +} + +// CSIStorageCapacity stores the result of one CSI GetCapacity call. +// +// For a given StorageClass, this describes the available capacity in a particular topology segment. This can be used when considering where to instantiate new PersistentVolumes. +// +// For example this can express things like: - StorageClass "standard" has "1234 GiB" available in "topology.kubernetes.io/zone=us-east1" - StorageClass "localssd" has "10 GiB" available in "kubernetes.io/hostname=knode-abc123" +// +// The following three cases all imply that no capacity is available for a certain combination: - no object exists with suitable topology and storage class name - such an object exists, but the capacity is unset - such an object exists, but the capacity is zero +// +// The producer of these objects can decide which approach is more suitable. +// +// They are consumed by the kube-scheduler if the CSIStorageCapacity beta feature gate is enabled there and a CSI driver opts into capacity-aware scheduling with CSIDriver.StorageCapacity. +type KubeCsiStorageCapacityV1Alpha1 interface { + cdk8s.ApiObject + // The group portion of the API version (e.g. `authorization.k8s.io`). + ApiGroup() *string + // The object's API version (e.g. `authorization.k8s.io/v1`). + ApiVersion() *string + // The chart in which this object is defined. + Chart() cdk8s.Chart + // The object kind. + Kind() *string + // Metadata associated with this API object. + Metadata() cdk8s.ApiObjectMetadataDefinition + // The name of the API object. + // + // If a name is specified in `metadata.name` this will be the name returned. + // Otherwise, a name will be generated by calling + // `AddHelm.of(this).generatedObjectName(this)`, which by default uses the + // construct path to generate a DNS-compatible name for the resource. + Name() *string + // The tree node. + Node() constructs.Node + // Create a dependency between this ApiObject and other constructs. + // + // These can be other ApiObjects, Charts, or custom. + AddDependency(dependencies ...constructs.IConstruct) + // Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. + // + // Example: + // kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true)); + // + AddJsonPatch(ops ...cdk8s.JsonPatch) + // Renders the object to Kubernetes JSON. + ToJson() interface{} + // Returns a string representation of this construct. + ToString() *string +} + +// The jsii proxy struct for KubeCsiStorageCapacityV1Alpha1 +type jsiiProxy_KubeCsiStorageCapacityV1Alpha1 struct { + internal.Type__cdk8sApiObject +} + +func (j *jsiiProxy_KubeCsiStorageCapacityV1Alpha1) ApiGroup() *string { + var returns *string + _jsii_.Get( + j, + "apiGroup", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeCsiStorageCapacityV1Alpha1) ApiVersion() *string { + var returns *string + _jsii_.Get( + j, + "apiVersion", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeCsiStorageCapacityV1Alpha1) Chart() cdk8s.Chart { + var returns cdk8s.Chart + _jsii_.Get( + j, + "chart", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeCsiStorageCapacityV1Alpha1) Kind() *string { + var returns *string + _jsii_.Get( + j, + "kind", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeCsiStorageCapacityV1Alpha1) Metadata() cdk8s.ApiObjectMetadataDefinition { + var returns cdk8s.ApiObjectMetadataDefinition + _jsii_.Get( + j, + "metadata", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeCsiStorageCapacityV1Alpha1) Name() *string { + var returns *string + _jsii_.Get( + j, + "name", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeCsiStorageCapacityV1Alpha1) Node() constructs.Node { + var returns constructs.Node + _jsii_.Get( + j, + "node", + &returns, + ) + return returns +} + +// Defines a "io.k8s.api.storage.v1alpha1.CSIStorageCapacity" API object. +func NewKubeCsiStorageCapacityV1Alpha1(scope constructs.Construct, id *string, props *KubeCsiStorageCapacityV1Alpha1Props) KubeCsiStorageCapacityV1Alpha1 { + _init_.Initialize() + + j := jsiiProxy_KubeCsiStorageCapacityV1Alpha1{} + + _jsii_.Create( + "k8s.KubeCsiStorageCapacityV1Alpha1", + []interface{}{scope, id, props}, + &j, + ) + + return &j +} + +// Defines a "io.k8s.api.storage.v1alpha1.CSIStorageCapacity" API object. +func NewKubeCsiStorageCapacityV1Alpha1_Override(k KubeCsiStorageCapacityV1Alpha1, scope constructs.Construct, id *string, props *KubeCsiStorageCapacityV1Alpha1Props) { + _init_.Initialize() + + _jsii_.Create( + "k8s.KubeCsiStorageCapacityV1Alpha1", + []interface{}{scope, id, props}, + k, + ) +} + +// Checks if `x` is a construct. +// +// Use this method instead of `instanceof` to properly detect `Construct` +// instances, even when the construct library is symlinked. +// +// Explanation: in JavaScript, multiple copies of the `constructs` library on +// disk are seen as independent, completely different libraries. As a +// consequence, the class `Construct` in each copy of the `constructs` library +// is seen as a different class, and an instance of one class will not test as +// `instanceof` the other class. `npm install` will not create installations +// like this, but users may manually symlink construct libraries together or +// use a monorepo tool: in those cases, multiple copies of the `constructs` +// library can be accidentally installed, and `instanceof` will behave +// unpredictably. It is safest to avoid using `instanceof`, and using +// this type-testing method instead. +// +// Returns: true if `x` is an object created from a class which extends `Construct`. +func KubeCsiStorageCapacityV1Alpha1_IsConstruct(x interface{}) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "k8s.KubeCsiStorageCapacityV1Alpha1", + "isConstruct", + []interface{}{x}, + &returns, + ) + + return returns +} + +// Renders a Kubernetes manifest for "io.k8s.api.storage.v1alpha1.CSIStorageCapacity". +// +// This can be used to inline resource manifests inside other objects (e.g. as templates). +func KubeCsiStorageCapacityV1Alpha1_Manifest(props *KubeCsiStorageCapacityV1Alpha1Props) interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "k8s.KubeCsiStorageCapacityV1Alpha1", + "manifest", + []interface{}{props}, + &returns, + ) + + return returns +} + +// Returns the `ApiObject` named `Resource` which is a child of the given construct. +// +// If `c` is an `ApiObject`, it is returned directly. Throws an +// exception if the construct does not have a child named `Default` _or_ if +// this child is not an `ApiObject`. +func KubeCsiStorageCapacityV1Alpha1_Of(c constructs.IConstruct) cdk8s.ApiObject { + _init_.Initialize() + + var returns cdk8s.ApiObject + + _jsii_.StaticInvoke( + "k8s.KubeCsiStorageCapacityV1Alpha1", + "of", + []interface{}{c}, + &returns, + ) + + return returns +} + +func KubeCsiStorageCapacityV1Alpha1_GVK() *cdk8s.GroupVersionKind { + _init_.Initialize() + var returns *cdk8s.GroupVersionKind + _jsii_.StaticGet( + "k8s.KubeCsiStorageCapacityV1Alpha1", + "GVK", + &returns, + ) + return returns +} + +func (k *jsiiProxy_KubeCsiStorageCapacityV1Alpha1) AddDependency(dependencies ...constructs.IConstruct) { + args := []interface{}{} + for _, a := range dependencies { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addDependency", + args, + ) +} + +func (k *jsiiProxy_KubeCsiStorageCapacityV1Alpha1) AddJsonPatch(ops ...cdk8s.JsonPatch) { + args := []interface{}{} + for _, a := range ops { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addJsonPatch", + args, + ) +} + +func (k *jsiiProxy_KubeCsiStorageCapacityV1Alpha1) ToJson() interface{} { + var returns interface{} + + _jsii_.Invoke( + k, + "toJson", + nil, // no parameters + &returns, + ) + + return returns +} + +func (k *jsiiProxy_KubeCsiStorageCapacityV1Alpha1) ToString() *string { + var returns *string + + _jsii_.Invoke( + k, + "toString", + nil, // no parameters + &returns, + ) + + return returns +} + +// CSIStorageCapacity stores the result of one CSI GetCapacity call. +// +// For a given StorageClass, this describes the available capacity in a particular topology segment. This can be used when considering where to instantiate new PersistentVolumes. +// +// For example this can express things like: - StorageClass "standard" has "1234 GiB" available in "topology.kubernetes.io/zone=us-east1" - StorageClass "localssd" has "10 GiB" available in "kubernetes.io/hostname=knode-abc123" +// +// The following three cases all imply that no capacity is available for a certain combination: - no object exists with suitable topology and storage class name - such an object exists, but the capacity is unset - such an object exists, but the capacity is zero +// +// The producer of these objects can decide which approach is more suitable. +// +// They are consumed by the kube-scheduler if the CSIStorageCapacity beta feature gate is enabled there and a CSI driver opts into capacity-aware scheduling with CSIDriver.StorageCapacity. +type KubeCsiStorageCapacityV1Alpha1Props struct { + // The name of the StorageClass that the reported capacity applies to. + // + // It must meet the same requirements as the name of a StorageClass object (non-empty, DNS subdomain). If that object no longer exists, the CSIStorageCapacity object is obsolete and should be removed by its creator. This field is immutable. + StorageClassName *string `field:"required" json:"storageClassName" yaml:"storageClassName"` + // Capacity is the value reported by the CSI driver in its GetCapacityResponse for a GetCapacityRequest with topology and parameters that match the previous fields. + // + // The semantic is currently (CSI spec 1.2) defined as: The available capacity, in bytes, of the storage that can be used to provision volumes. If not set, that information is currently unavailable and treated like zero capacity. + Capacity Quantity `field:"optional" json:"capacity" yaml:"capacity"` + // MaximumVolumeSize is the value reported by the CSI driver in its GetCapacityResponse for a GetCapacityRequest with topology and parameters that match the previous fields. + // + // This is defined since CSI spec 1.4.0 as the largest size that may be used in a CreateVolumeRequest.capacity_range.required_bytes field to create a volume with the same parameters as those in GetCapacityRequest. The corresponding value in the Kubernetes API is ResourceRequirements.Requests in a volume claim. + MaximumVolumeSize Quantity `field:"optional" json:"maximumVolumeSize" yaml:"maximumVolumeSize"` + // Standard object's metadata. + // + // The name has no particular meaning. It must be be a DNS subdomain (dots allowed, 253 characters). To ensure that there are no conflicts with other CSI drivers on the cluster, the recommendation is to use csisc-, a generated name, or a reverse-domain name which ends with the unique CSI driver name. + // + // Objects are namespaced. + // + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + Metadata *ObjectMeta `field:"optional" json:"metadata" yaml:"metadata"` + // NodeTopology defines which nodes have access to the storage for which capacity was reported. + // + // If not set, the storage is not accessible from any node in the cluster. If empty, the storage is accessible from all nodes. This field is immutable. + NodeTopology *LabelSelector `field:"optional" json:"nodeTopology" yaml:"nodeTopology"` +} + +// CSIStorageCapacity stores the result of one CSI GetCapacity call. +// +// For a given StorageClass, this describes the available capacity in a particular topology segment. This can be used when considering where to instantiate new PersistentVolumes. +// +// For example this can express things like: - StorageClass "standard" has "1234 GiB" available in "topology.kubernetes.io/zone=us-east1" - StorageClass "localssd" has "10 GiB" available in "kubernetes.io/hostname=knode-abc123" +// +// The following three cases all imply that no capacity is available for a certain combination: - no object exists with suitable topology and storage class name - such an object exists, but the capacity is unset - such an object exists, but the capacity is zero +// +// The producer of these objects can decide which approach is more suitable. +// +// They are consumed by the kube-scheduler if the CSIStorageCapacity beta feature gate is enabled there and a CSI driver opts into capacity-aware scheduling with CSIDriver.StorageCapacity. +type KubeCsiStorageCapacityV1Beta1 interface { + cdk8s.ApiObject + // The group portion of the API version (e.g. `authorization.k8s.io`). + ApiGroup() *string + // The object's API version (e.g. `authorization.k8s.io/v1`). + ApiVersion() *string + // The chart in which this object is defined. + Chart() cdk8s.Chart + // The object kind. + Kind() *string + // Metadata associated with this API object. + Metadata() cdk8s.ApiObjectMetadataDefinition + // The name of the API object. + // + // If a name is specified in `metadata.name` this will be the name returned. + // Otherwise, a name will be generated by calling + // `AddHelm.of(this).generatedObjectName(this)`, which by default uses the + // construct path to generate a DNS-compatible name for the resource. + Name() *string + // The tree node. + Node() constructs.Node + // Create a dependency between this ApiObject and other constructs. + // + // These can be other ApiObjects, Charts, or custom. + AddDependency(dependencies ...constructs.IConstruct) + // Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. + // + // Example: + // kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true)); + // + AddJsonPatch(ops ...cdk8s.JsonPatch) + // Renders the object to Kubernetes JSON. + ToJson() interface{} + // Returns a string representation of this construct. + ToString() *string +} + +// The jsii proxy struct for KubeCsiStorageCapacityV1Beta1 +type jsiiProxy_KubeCsiStorageCapacityV1Beta1 struct { + internal.Type__cdk8sApiObject +} + +func (j *jsiiProxy_KubeCsiStorageCapacityV1Beta1) ApiGroup() *string { + var returns *string + _jsii_.Get( + j, + "apiGroup", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeCsiStorageCapacityV1Beta1) ApiVersion() *string { + var returns *string + _jsii_.Get( + j, + "apiVersion", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeCsiStorageCapacityV1Beta1) Chart() cdk8s.Chart { + var returns cdk8s.Chart + _jsii_.Get( + j, + "chart", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeCsiStorageCapacityV1Beta1) Kind() *string { + var returns *string + _jsii_.Get( + j, + "kind", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeCsiStorageCapacityV1Beta1) Metadata() cdk8s.ApiObjectMetadataDefinition { + var returns cdk8s.ApiObjectMetadataDefinition + _jsii_.Get( + j, + "metadata", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeCsiStorageCapacityV1Beta1) Name() *string { + var returns *string + _jsii_.Get( + j, + "name", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeCsiStorageCapacityV1Beta1) Node() constructs.Node { + var returns constructs.Node + _jsii_.Get( + j, + "node", + &returns, + ) + return returns +} + +// Defines a "io.k8s.api.storage.v1beta1.CSIStorageCapacity" API object. +func NewKubeCsiStorageCapacityV1Beta1(scope constructs.Construct, id *string, props *KubeCsiStorageCapacityV1Beta1Props) KubeCsiStorageCapacityV1Beta1 { + _init_.Initialize() + + j := jsiiProxy_KubeCsiStorageCapacityV1Beta1{} + + _jsii_.Create( + "k8s.KubeCsiStorageCapacityV1Beta1", + []interface{}{scope, id, props}, + &j, + ) + + return &j +} + +// Defines a "io.k8s.api.storage.v1beta1.CSIStorageCapacity" API object. +func NewKubeCsiStorageCapacityV1Beta1_Override(k KubeCsiStorageCapacityV1Beta1, scope constructs.Construct, id *string, props *KubeCsiStorageCapacityV1Beta1Props) { + _init_.Initialize() + + _jsii_.Create( + "k8s.KubeCsiStorageCapacityV1Beta1", + []interface{}{scope, id, props}, + k, + ) +} + +// Checks if `x` is a construct. +// +// Use this method instead of `instanceof` to properly detect `Construct` +// instances, even when the construct library is symlinked. +// +// Explanation: in JavaScript, multiple copies of the `constructs` library on +// disk are seen as independent, completely different libraries. As a +// consequence, the class `Construct` in each copy of the `constructs` library +// is seen as a different class, and an instance of one class will not test as +// `instanceof` the other class. `npm install` will not create installations +// like this, but users may manually symlink construct libraries together or +// use a monorepo tool: in those cases, multiple copies of the `constructs` +// library can be accidentally installed, and `instanceof` will behave +// unpredictably. It is safest to avoid using `instanceof`, and using +// this type-testing method instead. +// +// Returns: true if `x` is an object created from a class which extends `Construct`. +func KubeCsiStorageCapacityV1Beta1_IsConstruct(x interface{}) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "k8s.KubeCsiStorageCapacityV1Beta1", + "isConstruct", + []interface{}{x}, + &returns, + ) + + return returns +} + +// Renders a Kubernetes manifest for "io.k8s.api.storage.v1beta1.CSIStorageCapacity". +// +// This can be used to inline resource manifests inside other objects (e.g. as templates). +func KubeCsiStorageCapacityV1Beta1_Manifest(props *KubeCsiStorageCapacityV1Beta1Props) interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "k8s.KubeCsiStorageCapacityV1Beta1", + "manifest", + []interface{}{props}, + &returns, + ) + + return returns +} + +// Returns the `ApiObject` named `Resource` which is a child of the given construct. +// +// If `c` is an `ApiObject`, it is returned directly. Throws an +// exception if the construct does not have a child named `Default` _or_ if +// this child is not an `ApiObject`. +func KubeCsiStorageCapacityV1Beta1_Of(c constructs.IConstruct) cdk8s.ApiObject { + _init_.Initialize() + + var returns cdk8s.ApiObject + + _jsii_.StaticInvoke( + "k8s.KubeCsiStorageCapacityV1Beta1", + "of", + []interface{}{c}, + &returns, + ) + + return returns +} + +func KubeCsiStorageCapacityV1Beta1_GVK() *cdk8s.GroupVersionKind { + _init_.Initialize() + var returns *cdk8s.GroupVersionKind + _jsii_.StaticGet( + "k8s.KubeCsiStorageCapacityV1Beta1", + "GVK", + &returns, + ) + return returns +} + +func (k *jsiiProxy_KubeCsiStorageCapacityV1Beta1) AddDependency(dependencies ...constructs.IConstruct) { + args := []interface{}{} + for _, a := range dependencies { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addDependency", + args, + ) +} + +func (k *jsiiProxy_KubeCsiStorageCapacityV1Beta1) AddJsonPatch(ops ...cdk8s.JsonPatch) { + args := []interface{}{} + for _, a := range ops { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addJsonPatch", + args, + ) +} + +func (k *jsiiProxy_KubeCsiStorageCapacityV1Beta1) ToJson() interface{} { + var returns interface{} + + _jsii_.Invoke( + k, + "toJson", + nil, // no parameters + &returns, + ) + + return returns +} + +func (k *jsiiProxy_KubeCsiStorageCapacityV1Beta1) ToString() *string { + var returns *string + + _jsii_.Invoke( + k, + "toString", + nil, // no parameters + &returns, + ) + + return returns +} + +// CSIStorageCapacity stores the result of one CSI GetCapacity call. +// +// For a given StorageClass, this describes the available capacity in a particular topology segment. This can be used when considering where to instantiate new PersistentVolumes. +// +// For example this can express things like: - StorageClass "standard" has "1234 GiB" available in "topology.kubernetes.io/zone=us-east1" - StorageClass "localssd" has "10 GiB" available in "kubernetes.io/hostname=knode-abc123" +// +// The following three cases all imply that no capacity is available for a certain combination: - no object exists with suitable topology and storage class name - such an object exists, but the capacity is unset - such an object exists, but the capacity is zero +// +// The producer of these objects can decide which approach is more suitable. +// +// They are consumed by the kube-scheduler if the CSIStorageCapacity beta feature gate is enabled there and a CSI driver opts into capacity-aware scheduling with CSIDriver.StorageCapacity. +type KubeCsiStorageCapacityV1Beta1Props struct { + // The name of the StorageClass that the reported capacity applies to. + // + // It must meet the same requirements as the name of a StorageClass object (non-empty, DNS subdomain). If that object no longer exists, the CSIStorageCapacity object is obsolete and should be removed by its creator. This field is immutable. + StorageClassName *string `field:"required" json:"storageClassName" yaml:"storageClassName"` + // Capacity is the value reported by the CSI driver in its GetCapacityResponse for a GetCapacityRequest with topology and parameters that match the previous fields. + // + // The semantic is currently (CSI spec 1.2) defined as: The available capacity, in bytes, of the storage that can be used to provision volumes. If not set, that information is currently unavailable and treated like zero capacity. + Capacity Quantity `field:"optional" json:"capacity" yaml:"capacity"` + // MaximumVolumeSize is the value reported by the CSI driver in its GetCapacityResponse for a GetCapacityRequest with topology and parameters that match the previous fields. + // + // This is defined since CSI spec 1.4.0 as the largest size that may be used in a CreateVolumeRequest.capacity_range.required_bytes field to create a volume with the same parameters as those in GetCapacityRequest. The corresponding value in the Kubernetes API is ResourceRequirements.Requests in a volume claim. + MaximumVolumeSize Quantity `field:"optional" json:"maximumVolumeSize" yaml:"maximumVolumeSize"` + // Standard object's metadata. + // + // The name has no particular meaning. It must be be a DNS subdomain (dots allowed, 253 characters). To ensure that there are no conflicts with other CSI drivers on the cluster, the recommendation is to use csisc-, a generated name, or a reverse-domain name which ends with the unique CSI driver name. + // + // Objects are namespaced. + // + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + Metadata *ObjectMeta `field:"optional" json:"metadata" yaml:"metadata"` + // NodeTopology defines which nodes have access to the storage for which capacity was reported. + // + // If not set, the storage is not accessible from any node in the cluster. If empty, the storage is accessible from all nodes. This field is immutable. + NodeTopology *LabelSelector `field:"optional" json:"nodeTopology" yaml:"nodeTopology"` +} + +// CustomResourceDefinition represents a resource that should be exposed on the API server. +// +// Its name MUST be in the format <.spec.name>.<.spec.group>. +type KubeCustomResourceDefinition interface { + cdk8s.ApiObject + // The group portion of the API version (e.g. `authorization.k8s.io`). + ApiGroup() *string + // The object's API version (e.g. `authorization.k8s.io/v1`). + ApiVersion() *string + // The chart in which this object is defined. + Chart() cdk8s.Chart + // The object kind. + Kind() *string + // Metadata associated with this API object. + Metadata() cdk8s.ApiObjectMetadataDefinition + // The name of the API object. + // + // If a name is specified in `metadata.name` this will be the name returned. + // Otherwise, a name will be generated by calling + // `AddHelm.of(this).generatedObjectName(this)`, which by default uses the + // construct path to generate a DNS-compatible name for the resource. + Name() *string + // The tree node. + Node() constructs.Node + // Create a dependency between this ApiObject and other constructs. + // + // These can be other ApiObjects, Charts, or custom. + AddDependency(dependencies ...constructs.IConstruct) + // Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. + // + // Example: + // kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true)); + // + AddJsonPatch(ops ...cdk8s.JsonPatch) + // Renders the object to Kubernetes JSON. + ToJson() interface{} + // Returns a string representation of this construct. + ToString() *string +} + +// The jsii proxy struct for KubeCustomResourceDefinition +type jsiiProxy_KubeCustomResourceDefinition struct { + internal.Type__cdk8sApiObject +} + +func (j *jsiiProxy_KubeCustomResourceDefinition) ApiGroup() *string { + var returns *string + _jsii_.Get( + j, + "apiGroup", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeCustomResourceDefinition) ApiVersion() *string { + var returns *string + _jsii_.Get( + j, + "apiVersion", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeCustomResourceDefinition) Chart() cdk8s.Chart { + var returns cdk8s.Chart + _jsii_.Get( + j, + "chart", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeCustomResourceDefinition) Kind() *string { + var returns *string + _jsii_.Get( + j, + "kind", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeCustomResourceDefinition) Metadata() cdk8s.ApiObjectMetadataDefinition { + var returns cdk8s.ApiObjectMetadataDefinition + _jsii_.Get( + j, + "metadata", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeCustomResourceDefinition) Name() *string { + var returns *string + _jsii_.Get( + j, + "name", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeCustomResourceDefinition) Node() constructs.Node { + var returns constructs.Node + _jsii_.Get( + j, + "node", + &returns, + ) + return returns +} + +// Defines a "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinition" API object. +func NewKubeCustomResourceDefinition(scope constructs.Construct, id *string, props *KubeCustomResourceDefinitionProps) KubeCustomResourceDefinition { + _init_.Initialize() + + j := jsiiProxy_KubeCustomResourceDefinition{} + + _jsii_.Create( + "k8s.KubeCustomResourceDefinition", + []interface{}{scope, id, props}, + &j, + ) + + return &j +} + +// Defines a "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinition" API object. +func NewKubeCustomResourceDefinition_Override(k KubeCustomResourceDefinition, scope constructs.Construct, id *string, props *KubeCustomResourceDefinitionProps) { + _init_.Initialize() + + _jsii_.Create( + "k8s.KubeCustomResourceDefinition", + []interface{}{scope, id, props}, + k, + ) +} + +// Checks if `x` is a construct. +// +// Use this method instead of `instanceof` to properly detect `Construct` +// instances, even when the construct library is symlinked. +// +// Explanation: in JavaScript, multiple copies of the `constructs` library on +// disk are seen as independent, completely different libraries. As a +// consequence, the class `Construct` in each copy of the `constructs` library +// is seen as a different class, and an instance of one class will not test as +// `instanceof` the other class. `npm install` will not create installations +// like this, but users may manually symlink construct libraries together or +// use a monorepo tool: in those cases, multiple copies of the `constructs` +// library can be accidentally installed, and `instanceof` will behave +// unpredictably. It is safest to avoid using `instanceof`, and using +// this type-testing method instead. +// +// Returns: true if `x` is an object created from a class which extends `Construct`. +func KubeCustomResourceDefinition_IsConstruct(x interface{}) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "k8s.KubeCustomResourceDefinition", + "isConstruct", + []interface{}{x}, + &returns, + ) + + return returns +} + +// Renders a Kubernetes manifest for "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinition". +// +// This can be used to inline resource manifests inside other objects (e.g. as templates). +func KubeCustomResourceDefinition_Manifest(props *KubeCustomResourceDefinitionProps) interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "k8s.KubeCustomResourceDefinition", + "manifest", + []interface{}{props}, + &returns, + ) + + return returns +} + +// Returns the `ApiObject` named `Resource` which is a child of the given construct. +// +// If `c` is an `ApiObject`, it is returned directly. Throws an +// exception if the construct does not have a child named `Default` _or_ if +// this child is not an `ApiObject`. +func KubeCustomResourceDefinition_Of(c constructs.IConstruct) cdk8s.ApiObject { + _init_.Initialize() + + var returns cdk8s.ApiObject + + _jsii_.StaticInvoke( + "k8s.KubeCustomResourceDefinition", + "of", + []interface{}{c}, + &returns, + ) + + return returns +} + +func KubeCustomResourceDefinition_GVK() *cdk8s.GroupVersionKind { + _init_.Initialize() + var returns *cdk8s.GroupVersionKind + _jsii_.StaticGet( + "k8s.KubeCustomResourceDefinition", + "GVK", + &returns, + ) + return returns +} + +func (k *jsiiProxy_KubeCustomResourceDefinition) AddDependency(dependencies ...constructs.IConstruct) { + args := []interface{}{} + for _, a := range dependencies { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addDependency", + args, + ) +} + +func (k *jsiiProxy_KubeCustomResourceDefinition) AddJsonPatch(ops ...cdk8s.JsonPatch) { + args := []interface{}{} + for _, a := range ops { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addJsonPatch", + args, + ) +} + +func (k *jsiiProxy_KubeCustomResourceDefinition) ToJson() interface{} { + var returns interface{} + + _jsii_.Invoke( + k, + "toJson", + nil, // no parameters + &returns, + ) + + return returns +} + +func (k *jsiiProxy_KubeCustomResourceDefinition) ToString() *string { + var returns *string + + _jsii_.Invoke( + k, + "toString", + nil, // no parameters + &returns, + ) + + return returns +} + +// CustomResourceDefinitionList is a list of CustomResourceDefinition objects. +type KubeCustomResourceDefinitionList interface { + cdk8s.ApiObject + // The group portion of the API version (e.g. `authorization.k8s.io`). + ApiGroup() *string + // The object's API version (e.g. `authorization.k8s.io/v1`). + ApiVersion() *string + // The chart in which this object is defined. + Chart() cdk8s.Chart + // The object kind. + Kind() *string + // Metadata associated with this API object. + Metadata() cdk8s.ApiObjectMetadataDefinition + // The name of the API object. + // + // If a name is specified in `metadata.name` this will be the name returned. + // Otherwise, a name will be generated by calling + // `AddHelm.of(this).generatedObjectName(this)`, which by default uses the + // construct path to generate a DNS-compatible name for the resource. + Name() *string + // The tree node. + Node() constructs.Node + // Create a dependency between this ApiObject and other constructs. + // + // These can be other ApiObjects, Charts, or custom. + AddDependency(dependencies ...constructs.IConstruct) + // Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. + // + // Example: + // kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true)); + // + AddJsonPatch(ops ...cdk8s.JsonPatch) + // Renders the object to Kubernetes JSON. + ToJson() interface{} + // Returns a string representation of this construct. + ToString() *string +} + +// The jsii proxy struct for KubeCustomResourceDefinitionList +type jsiiProxy_KubeCustomResourceDefinitionList struct { + internal.Type__cdk8sApiObject +} + +func (j *jsiiProxy_KubeCustomResourceDefinitionList) ApiGroup() *string { + var returns *string + _jsii_.Get( + j, + "apiGroup", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeCustomResourceDefinitionList) ApiVersion() *string { + var returns *string + _jsii_.Get( + j, + "apiVersion", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeCustomResourceDefinitionList) Chart() cdk8s.Chart { + var returns cdk8s.Chart + _jsii_.Get( + j, + "chart", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeCustomResourceDefinitionList) Kind() *string { + var returns *string + _jsii_.Get( + j, + "kind", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeCustomResourceDefinitionList) Metadata() cdk8s.ApiObjectMetadataDefinition { + var returns cdk8s.ApiObjectMetadataDefinition + _jsii_.Get( + j, + "metadata", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeCustomResourceDefinitionList) Name() *string { + var returns *string + _jsii_.Get( + j, + "name", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeCustomResourceDefinitionList) Node() constructs.Node { + var returns constructs.Node + _jsii_.Get( + j, + "node", + &returns, + ) + return returns +} + +// Defines a "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinitionList" API object. +func NewKubeCustomResourceDefinitionList(scope constructs.Construct, id *string, props *KubeCustomResourceDefinitionListProps) KubeCustomResourceDefinitionList { + _init_.Initialize() + + j := jsiiProxy_KubeCustomResourceDefinitionList{} + + _jsii_.Create( + "k8s.KubeCustomResourceDefinitionList", + []interface{}{scope, id, props}, + &j, + ) + + return &j +} + +// Defines a "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinitionList" API object. +func NewKubeCustomResourceDefinitionList_Override(k KubeCustomResourceDefinitionList, scope constructs.Construct, id *string, props *KubeCustomResourceDefinitionListProps) { + _init_.Initialize() + + _jsii_.Create( + "k8s.KubeCustomResourceDefinitionList", + []interface{}{scope, id, props}, + k, + ) +} + +// Checks if `x` is a construct. +// +// Use this method instead of `instanceof` to properly detect `Construct` +// instances, even when the construct library is symlinked. +// +// Explanation: in JavaScript, multiple copies of the `constructs` library on +// disk are seen as independent, completely different libraries. As a +// consequence, the class `Construct` in each copy of the `constructs` library +// is seen as a different class, and an instance of one class will not test as +// `instanceof` the other class. `npm install` will not create installations +// like this, but users may manually symlink construct libraries together or +// use a monorepo tool: in those cases, multiple copies of the `constructs` +// library can be accidentally installed, and `instanceof` will behave +// unpredictably. It is safest to avoid using `instanceof`, and using +// this type-testing method instead. +// +// Returns: true if `x` is an object created from a class which extends `Construct`. +func KubeCustomResourceDefinitionList_IsConstruct(x interface{}) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "k8s.KubeCustomResourceDefinitionList", + "isConstruct", + []interface{}{x}, + &returns, + ) + + return returns +} + +// Renders a Kubernetes manifest for "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinitionList". +// +// This can be used to inline resource manifests inside other objects (e.g. as templates). +func KubeCustomResourceDefinitionList_Manifest(props *KubeCustomResourceDefinitionListProps) interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "k8s.KubeCustomResourceDefinitionList", + "manifest", + []interface{}{props}, + &returns, + ) + + return returns +} + +// Returns the `ApiObject` named `Resource` which is a child of the given construct. +// +// If `c` is an `ApiObject`, it is returned directly. Throws an +// exception if the construct does not have a child named `Default` _or_ if +// this child is not an `ApiObject`. +func KubeCustomResourceDefinitionList_Of(c constructs.IConstruct) cdk8s.ApiObject { + _init_.Initialize() + + var returns cdk8s.ApiObject + + _jsii_.StaticInvoke( + "k8s.KubeCustomResourceDefinitionList", + "of", + []interface{}{c}, + &returns, + ) + + return returns +} + +func KubeCustomResourceDefinitionList_GVK() *cdk8s.GroupVersionKind { + _init_.Initialize() + var returns *cdk8s.GroupVersionKind + _jsii_.StaticGet( + "k8s.KubeCustomResourceDefinitionList", + "GVK", + &returns, + ) + return returns +} + +func (k *jsiiProxy_KubeCustomResourceDefinitionList) AddDependency(dependencies ...constructs.IConstruct) { + args := []interface{}{} + for _, a := range dependencies { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addDependency", + args, + ) +} + +func (k *jsiiProxy_KubeCustomResourceDefinitionList) AddJsonPatch(ops ...cdk8s.JsonPatch) { + args := []interface{}{} + for _, a := range ops { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addJsonPatch", + args, + ) +} + +func (k *jsiiProxy_KubeCustomResourceDefinitionList) ToJson() interface{} { + var returns interface{} + + _jsii_.Invoke( + k, + "toJson", + nil, // no parameters + &returns, + ) + + return returns +} + +func (k *jsiiProxy_KubeCustomResourceDefinitionList) ToString() *string { + var returns *string + + _jsii_.Invoke( + k, + "toString", + nil, // no parameters + &returns, + ) + + return returns +} + +// CustomResourceDefinitionList is a list of CustomResourceDefinition objects. +type KubeCustomResourceDefinitionListProps struct { + // items list individual CustomResourceDefinition objects. + Items *[]*KubeCustomResourceDefinitionProps `field:"required" json:"items" yaml:"items"` + // Standard object's metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata. + Metadata *ListMeta `field:"optional" json:"metadata" yaml:"metadata"` +} + +// CustomResourceDefinition represents a resource that should be exposed on the API server. +// +// Its name MUST be in the format <.spec.name>.<.spec.group>. +type KubeCustomResourceDefinitionProps struct { + // spec describes how the user wants the resources to appear. + Spec *CustomResourceDefinitionSpec `field:"required" json:"spec" yaml:"spec"` + // Standard object's metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata. + Metadata *ObjectMeta `field:"optional" json:"metadata" yaml:"metadata"` +} + +// DaemonSet represents the configuration of a daemon set. +type KubeDaemonSet interface { + cdk8s.ApiObject + // The group portion of the API version (e.g. `authorization.k8s.io`). + ApiGroup() *string + // The object's API version (e.g. `authorization.k8s.io/v1`). + ApiVersion() *string + // The chart in which this object is defined. + Chart() cdk8s.Chart + // The object kind. + Kind() *string + // Metadata associated with this API object. + Metadata() cdk8s.ApiObjectMetadataDefinition + // The name of the API object. + // + // If a name is specified in `metadata.name` this will be the name returned. + // Otherwise, a name will be generated by calling + // `AddHelm.of(this).generatedObjectName(this)`, which by default uses the + // construct path to generate a DNS-compatible name for the resource. + Name() *string + // The tree node. + Node() constructs.Node + // Create a dependency between this ApiObject and other constructs. + // + // These can be other ApiObjects, Charts, or custom. + AddDependency(dependencies ...constructs.IConstruct) + // Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. + // + // Example: + // kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true)); + // + AddJsonPatch(ops ...cdk8s.JsonPatch) + // Renders the object to Kubernetes JSON. + ToJson() interface{} + // Returns a string representation of this construct. + ToString() *string +} + +// The jsii proxy struct for KubeDaemonSet +type jsiiProxy_KubeDaemonSet struct { + internal.Type__cdk8sApiObject +} + +func (j *jsiiProxy_KubeDaemonSet) ApiGroup() *string { + var returns *string + _jsii_.Get( + j, + "apiGroup", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeDaemonSet) ApiVersion() *string { + var returns *string + _jsii_.Get( + j, + "apiVersion", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeDaemonSet) Chart() cdk8s.Chart { + var returns cdk8s.Chart + _jsii_.Get( + j, + "chart", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeDaemonSet) Kind() *string { + var returns *string + _jsii_.Get( + j, + "kind", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeDaemonSet) Metadata() cdk8s.ApiObjectMetadataDefinition { + var returns cdk8s.ApiObjectMetadataDefinition + _jsii_.Get( + j, + "metadata", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeDaemonSet) Name() *string { + var returns *string + _jsii_.Get( + j, + "name", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeDaemonSet) Node() constructs.Node { + var returns constructs.Node + _jsii_.Get( + j, + "node", + &returns, + ) + return returns +} + +// Defines a "io.k8s.api.apps.v1.DaemonSet" API object. +func NewKubeDaemonSet(scope constructs.Construct, id *string, props *KubeDaemonSetProps) KubeDaemonSet { + _init_.Initialize() + + j := jsiiProxy_KubeDaemonSet{} + + _jsii_.Create( + "k8s.KubeDaemonSet", + []interface{}{scope, id, props}, + &j, + ) + + return &j +} + +// Defines a "io.k8s.api.apps.v1.DaemonSet" API object. +func NewKubeDaemonSet_Override(k KubeDaemonSet, scope constructs.Construct, id *string, props *KubeDaemonSetProps) { + _init_.Initialize() + + _jsii_.Create( + "k8s.KubeDaemonSet", + []interface{}{scope, id, props}, + k, + ) +} + +// Checks if `x` is a construct. +// +// Use this method instead of `instanceof` to properly detect `Construct` +// instances, even when the construct library is symlinked. +// +// Explanation: in JavaScript, multiple copies of the `constructs` library on +// disk are seen as independent, completely different libraries. As a +// consequence, the class `Construct` in each copy of the `constructs` library +// is seen as a different class, and an instance of one class will not test as +// `instanceof` the other class. `npm install` will not create installations +// like this, but users may manually symlink construct libraries together or +// use a monorepo tool: in those cases, multiple copies of the `constructs` +// library can be accidentally installed, and `instanceof` will behave +// unpredictably. It is safest to avoid using `instanceof`, and using +// this type-testing method instead. +// +// Returns: true if `x` is an object created from a class which extends `Construct`. +func KubeDaemonSet_IsConstruct(x interface{}) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "k8s.KubeDaemonSet", + "isConstruct", + []interface{}{x}, + &returns, + ) + + return returns +} + +// Renders a Kubernetes manifest for "io.k8s.api.apps.v1.DaemonSet". +// +// This can be used to inline resource manifests inside other objects (e.g. as templates). +func KubeDaemonSet_Manifest(props *KubeDaemonSetProps) interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "k8s.KubeDaemonSet", + "manifest", + []interface{}{props}, + &returns, + ) + + return returns +} + +// Returns the `ApiObject` named `Resource` which is a child of the given construct. +// +// If `c` is an `ApiObject`, it is returned directly. Throws an +// exception if the construct does not have a child named `Default` _or_ if +// this child is not an `ApiObject`. +func KubeDaemonSet_Of(c constructs.IConstruct) cdk8s.ApiObject { + _init_.Initialize() + + var returns cdk8s.ApiObject + + _jsii_.StaticInvoke( + "k8s.KubeDaemonSet", + "of", + []interface{}{c}, + &returns, + ) + + return returns +} + +func KubeDaemonSet_GVK() *cdk8s.GroupVersionKind { + _init_.Initialize() + var returns *cdk8s.GroupVersionKind + _jsii_.StaticGet( + "k8s.KubeDaemonSet", + "GVK", + &returns, + ) + return returns +} + +func (k *jsiiProxy_KubeDaemonSet) AddDependency(dependencies ...constructs.IConstruct) { + args := []interface{}{} + for _, a := range dependencies { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addDependency", + args, + ) +} + +func (k *jsiiProxy_KubeDaemonSet) AddJsonPatch(ops ...cdk8s.JsonPatch) { + args := []interface{}{} + for _, a := range ops { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addJsonPatch", + args, + ) +} + +func (k *jsiiProxy_KubeDaemonSet) ToJson() interface{} { + var returns interface{} + + _jsii_.Invoke( + k, + "toJson", + nil, // no parameters + &returns, + ) + + return returns +} + +func (k *jsiiProxy_KubeDaemonSet) ToString() *string { + var returns *string + + _jsii_.Invoke( + k, + "toString", + nil, // no parameters + &returns, + ) + + return returns +} + +// DaemonSetList is a collection of daemon sets. +type KubeDaemonSetList interface { + cdk8s.ApiObject + // The group portion of the API version (e.g. `authorization.k8s.io`). + ApiGroup() *string + // The object's API version (e.g. `authorization.k8s.io/v1`). + ApiVersion() *string + // The chart in which this object is defined. + Chart() cdk8s.Chart + // The object kind. + Kind() *string + // Metadata associated with this API object. + Metadata() cdk8s.ApiObjectMetadataDefinition + // The name of the API object. + // + // If a name is specified in `metadata.name` this will be the name returned. + // Otherwise, a name will be generated by calling + // `AddHelm.of(this).generatedObjectName(this)`, which by default uses the + // construct path to generate a DNS-compatible name for the resource. + Name() *string + // The tree node. + Node() constructs.Node + // Create a dependency between this ApiObject and other constructs. + // + // These can be other ApiObjects, Charts, or custom. + AddDependency(dependencies ...constructs.IConstruct) + // Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. + // + // Example: + // kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true)); + // + AddJsonPatch(ops ...cdk8s.JsonPatch) + // Renders the object to Kubernetes JSON. + ToJson() interface{} + // Returns a string representation of this construct. + ToString() *string +} + +// The jsii proxy struct for KubeDaemonSetList +type jsiiProxy_KubeDaemonSetList struct { + internal.Type__cdk8sApiObject +} + +func (j *jsiiProxy_KubeDaemonSetList) ApiGroup() *string { + var returns *string + _jsii_.Get( + j, + "apiGroup", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeDaemonSetList) ApiVersion() *string { + var returns *string + _jsii_.Get( + j, + "apiVersion", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeDaemonSetList) Chart() cdk8s.Chart { + var returns cdk8s.Chart + _jsii_.Get( + j, + "chart", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeDaemonSetList) Kind() *string { + var returns *string + _jsii_.Get( + j, + "kind", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeDaemonSetList) Metadata() cdk8s.ApiObjectMetadataDefinition { + var returns cdk8s.ApiObjectMetadataDefinition + _jsii_.Get( + j, + "metadata", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeDaemonSetList) Name() *string { + var returns *string + _jsii_.Get( + j, + "name", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeDaemonSetList) Node() constructs.Node { + var returns constructs.Node + _jsii_.Get( + j, + "node", + &returns, + ) + return returns +} + +// Defines a "io.k8s.api.apps.v1.DaemonSetList" API object. +func NewKubeDaemonSetList(scope constructs.Construct, id *string, props *KubeDaemonSetListProps) KubeDaemonSetList { + _init_.Initialize() + + j := jsiiProxy_KubeDaemonSetList{} + + _jsii_.Create( + "k8s.KubeDaemonSetList", + []interface{}{scope, id, props}, + &j, + ) + + return &j +} + +// Defines a "io.k8s.api.apps.v1.DaemonSetList" API object. +func NewKubeDaemonSetList_Override(k KubeDaemonSetList, scope constructs.Construct, id *string, props *KubeDaemonSetListProps) { + _init_.Initialize() + + _jsii_.Create( + "k8s.KubeDaemonSetList", + []interface{}{scope, id, props}, + k, + ) +} + +// Checks if `x` is a construct. +// +// Use this method instead of `instanceof` to properly detect `Construct` +// instances, even when the construct library is symlinked. +// +// Explanation: in JavaScript, multiple copies of the `constructs` library on +// disk are seen as independent, completely different libraries. As a +// consequence, the class `Construct` in each copy of the `constructs` library +// is seen as a different class, and an instance of one class will not test as +// `instanceof` the other class. `npm install` will not create installations +// like this, but users may manually symlink construct libraries together or +// use a monorepo tool: in those cases, multiple copies of the `constructs` +// library can be accidentally installed, and `instanceof` will behave +// unpredictably. It is safest to avoid using `instanceof`, and using +// this type-testing method instead. +// +// Returns: true if `x` is an object created from a class which extends `Construct`. +func KubeDaemonSetList_IsConstruct(x interface{}) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "k8s.KubeDaemonSetList", + "isConstruct", + []interface{}{x}, + &returns, + ) + + return returns +} + +// Renders a Kubernetes manifest for "io.k8s.api.apps.v1.DaemonSetList". +// +// This can be used to inline resource manifests inside other objects (e.g. as templates). +func KubeDaemonSetList_Manifest(props *KubeDaemonSetListProps) interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "k8s.KubeDaemonSetList", + "manifest", + []interface{}{props}, + &returns, + ) + + return returns +} + +// Returns the `ApiObject` named `Resource` which is a child of the given construct. +// +// If `c` is an `ApiObject`, it is returned directly. Throws an +// exception if the construct does not have a child named `Default` _or_ if +// this child is not an `ApiObject`. +func KubeDaemonSetList_Of(c constructs.IConstruct) cdk8s.ApiObject { + _init_.Initialize() + + var returns cdk8s.ApiObject + + _jsii_.StaticInvoke( + "k8s.KubeDaemonSetList", + "of", + []interface{}{c}, + &returns, + ) + + return returns +} + +func KubeDaemonSetList_GVK() *cdk8s.GroupVersionKind { + _init_.Initialize() + var returns *cdk8s.GroupVersionKind + _jsii_.StaticGet( + "k8s.KubeDaemonSetList", + "GVK", + &returns, + ) + return returns +} + +func (k *jsiiProxy_KubeDaemonSetList) AddDependency(dependencies ...constructs.IConstruct) { + args := []interface{}{} + for _, a := range dependencies { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addDependency", + args, + ) +} + +func (k *jsiiProxy_KubeDaemonSetList) AddJsonPatch(ops ...cdk8s.JsonPatch) { + args := []interface{}{} + for _, a := range ops { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addJsonPatch", + args, + ) +} + +func (k *jsiiProxy_KubeDaemonSetList) ToJson() interface{} { + var returns interface{} + + _jsii_.Invoke( + k, + "toJson", + nil, // no parameters + &returns, + ) + + return returns +} + +func (k *jsiiProxy_KubeDaemonSetList) ToString() *string { + var returns *string + + _jsii_.Invoke( + k, + "toString", + nil, // no parameters + &returns, + ) + + return returns +} + +// DaemonSetList is a collection of daemon sets. +type KubeDaemonSetListProps struct { + // A list of daemon sets. + Items *[]*KubeDaemonSetProps `field:"required" json:"items" yaml:"items"` + // Standard list metadata. + // + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + Metadata *ListMeta `field:"optional" json:"metadata" yaml:"metadata"` +} + +// DaemonSet represents the configuration of a daemon set. +type KubeDaemonSetProps struct { + // Standard object's metadata. + // + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + Metadata *ObjectMeta `field:"optional" json:"metadata" yaml:"metadata"` + // The desired behavior of this daemon set. + // + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + Spec *DaemonSetSpec `field:"optional" json:"spec" yaml:"spec"` +} + +// Deployment enables declarative updates for Pods and ReplicaSets. +type KubeDeployment interface { + cdk8s.ApiObject + // The group portion of the API version (e.g. `authorization.k8s.io`). + ApiGroup() *string + // The object's API version (e.g. `authorization.k8s.io/v1`). + ApiVersion() *string + // The chart in which this object is defined. + Chart() cdk8s.Chart + // The object kind. + Kind() *string + // Metadata associated with this API object. + Metadata() cdk8s.ApiObjectMetadataDefinition + // The name of the API object. + // + // If a name is specified in `metadata.name` this will be the name returned. + // Otherwise, a name will be generated by calling + // `AddHelm.of(this).generatedObjectName(this)`, which by default uses the + // construct path to generate a DNS-compatible name for the resource. + Name() *string + // The tree node. + Node() constructs.Node + // Create a dependency between this ApiObject and other constructs. + // + // These can be other ApiObjects, Charts, or custom. + AddDependency(dependencies ...constructs.IConstruct) + // Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. + // + // Example: + // kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true)); + // + AddJsonPatch(ops ...cdk8s.JsonPatch) + // Renders the object to Kubernetes JSON. + ToJson() interface{} + // Returns a string representation of this construct. + ToString() *string +} + +// The jsii proxy struct for KubeDeployment +type jsiiProxy_KubeDeployment struct { + internal.Type__cdk8sApiObject +} + +func (j *jsiiProxy_KubeDeployment) ApiGroup() *string { + var returns *string + _jsii_.Get( + j, + "apiGroup", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeDeployment) ApiVersion() *string { + var returns *string + _jsii_.Get( + j, + "apiVersion", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeDeployment) Chart() cdk8s.Chart { + var returns cdk8s.Chart + _jsii_.Get( + j, + "chart", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeDeployment) Kind() *string { + var returns *string + _jsii_.Get( + j, + "kind", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeDeployment) Metadata() cdk8s.ApiObjectMetadataDefinition { + var returns cdk8s.ApiObjectMetadataDefinition + _jsii_.Get( + j, + "metadata", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeDeployment) Name() *string { + var returns *string + _jsii_.Get( + j, + "name", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeDeployment) Node() constructs.Node { + var returns constructs.Node + _jsii_.Get( + j, + "node", + &returns, + ) + return returns +} + +// Defines a "io.k8s.api.apps.v1.Deployment" API object. +func NewKubeDeployment(scope constructs.Construct, id *string, props *KubeDeploymentProps) KubeDeployment { + _init_.Initialize() + + j := jsiiProxy_KubeDeployment{} + + _jsii_.Create( + "k8s.KubeDeployment", + []interface{}{scope, id, props}, + &j, + ) + + return &j +} + +// Defines a "io.k8s.api.apps.v1.Deployment" API object. +func NewKubeDeployment_Override(k KubeDeployment, scope constructs.Construct, id *string, props *KubeDeploymentProps) { + _init_.Initialize() + + _jsii_.Create( + "k8s.KubeDeployment", + []interface{}{scope, id, props}, + k, + ) +} + +// Checks if `x` is a construct. +// +// Use this method instead of `instanceof` to properly detect `Construct` +// instances, even when the construct library is symlinked. +// +// Explanation: in JavaScript, multiple copies of the `constructs` library on +// disk are seen as independent, completely different libraries. As a +// consequence, the class `Construct` in each copy of the `constructs` library +// is seen as a different class, and an instance of one class will not test as +// `instanceof` the other class. `npm install` will not create installations +// like this, but users may manually symlink construct libraries together or +// use a monorepo tool: in those cases, multiple copies of the `constructs` +// library can be accidentally installed, and `instanceof` will behave +// unpredictably. It is safest to avoid using `instanceof`, and using +// this type-testing method instead. +// +// Returns: true if `x` is an object created from a class which extends `Construct`. +func KubeDeployment_IsConstruct(x interface{}) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "k8s.KubeDeployment", + "isConstruct", + []interface{}{x}, + &returns, + ) + + return returns +} + +// Renders a Kubernetes manifest for "io.k8s.api.apps.v1.Deployment". +// +// This can be used to inline resource manifests inside other objects (e.g. as templates). +func KubeDeployment_Manifest(props *KubeDeploymentProps) interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "k8s.KubeDeployment", + "manifest", + []interface{}{props}, + &returns, + ) + + return returns +} + +// Returns the `ApiObject` named `Resource` which is a child of the given construct. +// +// If `c` is an `ApiObject`, it is returned directly. Throws an +// exception if the construct does not have a child named `Default` _or_ if +// this child is not an `ApiObject`. +func KubeDeployment_Of(c constructs.IConstruct) cdk8s.ApiObject { + _init_.Initialize() + + var returns cdk8s.ApiObject + + _jsii_.StaticInvoke( + "k8s.KubeDeployment", + "of", + []interface{}{c}, + &returns, + ) + + return returns +} + +func KubeDeployment_GVK() *cdk8s.GroupVersionKind { + _init_.Initialize() + var returns *cdk8s.GroupVersionKind + _jsii_.StaticGet( + "k8s.KubeDeployment", + "GVK", + &returns, + ) + return returns +} + +func (k *jsiiProxy_KubeDeployment) AddDependency(dependencies ...constructs.IConstruct) { + args := []interface{}{} + for _, a := range dependencies { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addDependency", + args, + ) +} + +func (k *jsiiProxy_KubeDeployment) AddJsonPatch(ops ...cdk8s.JsonPatch) { + args := []interface{}{} + for _, a := range ops { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addJsonPatch", + args, + ) +} + +func (k *jsiiProxy_KubeDeployment) ToJson() interface{} { + var returns interface{} + + _jsii_.Invoke( + k, + "toJson", + nil, // no parameters + &returns, + ) + + return returns +} + +func (k *jsiiProxy_KubeDeployment) ToString() *string { + var returns *string + + _jsii_.Invoke( + k, + "toString", + nil, // no parameters + &returns, + ) + + return returns +} + +// DeploymentList is a list of Deployments. +type KubeDeploymentList interface { + cdk8s.ApiObject + // The group portion of the API version (e.g. `authorization.k8s.io`). + ApiGroup() *string + // The object's API version (e.g. `authorization.k8s.io/v1`). + ApiVersion() *string + // The chart in which this object is defined. + Chart() cdk8s.Chart + // The object kind. + Kind() *string + // Metadata associated with this API object. + Metadata() cdk8s.ApiObjectMetadataDefinition + // The name of the API object. + // + // If a name is specified in `metadata.name` this will be the name returned. + // Otherwise, a name will be generated by calling + // `AddHelm.of(this).generatedObjectName(this)`, which by default uses the + // construct path to generate a DNS-compatible name for the resource. + Name() *string + // The tree node. + Node() constructs.Node + // Create a dependency between this ApiObject and other constructs. + // + // These can be other ApiObjects, Charts, or custom. + AddDependency(dependencies ...constructs.IConstruct) + // Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. + // + // Example: + // kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true)); + // + AddJsonPatch(ops ...cdk8s.JsonPatch) + // Renders the object to Kubernetes JSON. + ToJson() interface{} + // Returns a string representation of this construct. + ToString() *string +} + +// The jsii proxy struct for KubeDeploymentList +type jsiiProxy_KubeDeploymentList struct { + internal.Type__cdk8sApiObject +} + +func (j *jsiiProxy_KubeDeploymentList) ApiGroup() *string { + var returns *string + _jsii_.Get( + j, + "apiGroup", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeDeploymentList) ApiVersion() *string { + var returns *string + _jsii_.Get( + j, + "apiVersion", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeDeploymentList) Chart() cdk8s.Chart { + var returns cdk8s.Chart + _jsii_.Get( + j, + "chart", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeDeploymentList) Kind() *string { + var returns *string + _jsii_.Get( + j, + "kind", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeDeploymentList) Metadata() cdk8s.ApiObjectMetadataDefinition { + var returns cdk8s.ApiObjectMetadataDefinition + _jsii_.Get( + j, + "metadata", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeDeploymentList) Name() *string { + var returns *string + _jsii_.Get( + j, + "name", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeDeploymentList) Node() constructs.Node { + var returns constructs.Node + _jsii_.Get( + j, + "node", + &returns, + ) + return returns +} + +// Defines a "io.k8s.api.apps.v1.DeploymentList" API object. +func NewKubeDeploymentList(scope constructs.Construct, id *string, props *KubeDeploymentListProps) KubeDeploymentList { + _init_.Initialize() + + j := jsiiProxy_KubeDeploymentList{} + + _jsii_.Create( + "k8s.KubeDeploymentList", + []interface{}{scope, id, props}, + &j, + ) + + return &j +} + +// Defines a "io.k8s.api.apps.v1.DeploymentList" API object. +func NewKubeDeploymentList_Override(k KubeDeploymentList, scope constructs.Construct, id *string, props *KubeDeploymentListProps) { + _init_.Initialize() + + _jsii_.Create( + "k8s.KubeDeploymentList", + []interface{}{scope, id, props}, + k, + ) +} + +// Checks if `x` is a construct. +// +// Use this method instead of `instanceof` to properly detect `Construct` +// instances, even when the construct library is symlinked. +// +// Explanation: in JavaScript, multiple copies of the `constructs` library on +// disk are seen as independent, completely different libraries. As a +// consequence, the class `Construct` in each copy of the `constructs` library +// is seen as a different class, and an instance of one class will not test as +// `instanceof` the other class. `npm install` will not create installations +// like this, but users may manually symlink construct libraries together or +// use a monorepo tool: in those cases, multiple copies of the `constructs` +// library can be accidentally installed, and `instanceof` will behave +// unpredictably. It is safest to avoid using `instanceof`, and using +// this type-testing method instead. +// +// Returns: true if `x` is an object created from a class which extends `Construct`. +func KubeDeploymentList_IsConstruct(x interface{}) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "k8s.KubeDeploymentList", + "isConstruct", + []interface{}{x}, + &returns, + ) + + return returns +} + +// Renders a Kubernetes manifest for "io.k8s.api.apps.v1.DeploymentList". +// +// This can be used to inline resource manifests inside other objects (e.g. as templates). +func KubeDeploymentList_Manifest(props *KubeDeploymentListProps) interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "k8s.KubeDeploymentList", + "manifest", + []interface{}{props}, + &returns, + ) + + return returns +} + +// Returns the `ApiObject` named `Resource` which is a child of the given construct. +// +// If `c` is an `ApiObject`, it is returned directly. Throws an +// exception if the construct does not have a child named `Default` _or_ if +// this child is not an `ApiObject`. +func KubeDeploymentList_Of(c constructs.IConstruct) cdk8s.ApiObject { + _init_.Initialize() + + var returns cdk8s.ApiObject + + _jsii_.StaticInvoke( + "k8s.KubeDeploymentList", + "of", + []interface{}{c}, + &returns, + ) + + return returns +} + +func KubeDeploymentList_GVK() *cdk8s.GroupVersionKind { + _init_.Initialize() + var returns *cdk8s.GroupVersionKind + _jsii_.StaticGet( + "k8s.KubeDeploymentList", + "GVK", + &returns, + ) + return returns +} + +func (k *jsiiProxy_KubeDeploymentList) AddDependency(dependencies ...constructs.IConstruct) { + args := []interface{}{} + for _, a := range dependencies { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addDependency", + args, + ) +} + +func (k *jsiiProxy_KubeDeploymentList) AddJsonPatch(ops ...cdk8s.JsonPatch) { + args := []interface{}{} + for _, a := range ops { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addJsonPatch", + args, + ) +} + +func (k *jsiiProxy_KubeDeploymentList) ToJson() interface{} { + var returns interface{} + + _jsii_.Invoke( + k, + "toJson", + nil, // no parameters + &returns, + ) + + return returns +} + +func (k *jsiiProxy_KubeDeploymentList) ToString() *string { + var returns *string + + _jsii_.Invoke( + k, + "toString", + nil, // no parameters + &returns, + ) + + return returns +} + +// DeploymentList is a list of Deployments. +type KubeDeploymentListProps struct { + // Items is the list of Deployments. + Items *[]*KubeDeploymentProps `field:"required" json:"items" yaml:"items"` + // Standard list metadata. + Metadata *ListMeta `field:"optional" json:"metadata" yaml:"metadata"` +} + +// Deployment enables declarative updates for Pods and ReplicaSets. +type KubeDeploymentProps struct { + // Standard object's metadata. + // + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + Metadata *ObjectMeta `field:"optional" json:"metadata" yaml:"metadata"` + // Specification of the desired behavior of the Deployment. + Spec *DeploymentSpec `field:"optional" json:"spec" yaml:"spec"` +} + +// EndpointSlice represents a subset of the endpoints that implement a service. +// +// For a given service there may be multiple EndpointSlice objects, selected by labels, which must be joined to produce the full set of endpoints. +type KubeEndpointSlice interface { + cdk8s.ApiObject + // The group portion of the API version (e.g. `authorization.k8s.io`). + ApiGroup() *string + // The object's API version (e.g. `authorization.k8s.io/v1`). + ApiVersion() *string + // The chart in which this object is defined. + Chart() cdk8s.Chart + // The object kind. + Kind() *string + // Metadata associated with this API object. + Metadata() cdk8s.ApiObjectMetadataDefinition + // The name of the API object. + // + // If a name is specified in `metadata.name` this will be the name returned. + // Otherwise, a name will be generated by calling + // `AddHelm.of(this).generatedObjectName(this)`, which by default uses the + // construct path to generate a DNS-compatible name for the resource. + Name() *string + // The tree node. + Node() constructs.Node + // Create a dependency between this ApiObject and other constructs. + // + // These can be other ApiObjects, Charts, or custom. + AddDependency(dependencies ...constructs.IConstruct) + // Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. + // + // Example: + // kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true)); + // + AddJsonPatch(ops ...cdk8s.JsonPatch) + // Renders the object to Kubernetes JSON. + ToJson() interface{} + // Returns a string representation of this construct. + ToString() *string +} + +// The jsii proxy struct for KubeEndpointSlice +type jsiiProxy_KubeEndpointSlice struct { + internal.Type__cdk8sApiObject +} + +func (j *jsiiProxy_KubeEndpointSlice) ApiGroup() *string { + var returns *string + _jsii_.Get( + j, + "apiGroup", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeEndpointSlice) ApiVersion() *string { + var returns *string + _jsii_.Get( + j, + "apiVersion", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeEndpointSlice) Chart() cdk8s.Chart { + var returns cdk8s.Chart + _jsii_.Get( + j, + "chart", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeEndpointSlice) Kind() *string { + var returns *string + _jsii_.Get( + j, + "kind", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeEndpointSlice) Metadata() cdk8s.ApiObjectMetadataDefinition { + var returns cdk8s.ApiObjectMetadataDefinition + _jsii_.Get( + j, + "metadata", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeEndpointSlice) Name() *string { + var returns *string + _jsii_.Get( + j, + "name", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeEndpointSlice) Node() constructs.Node { + var returns constructs.Node + _jsii_.Get( + j, + "node", + &returns, + ) + return returns +} + +// Defines a "io.k8s.api.discovery.v1.EndpointSlice" API object. +func NewKubeEndpointSlice(scope constructs.Construct, id *string, props *KubeEndpointSliceProps) KubeEndpointSlice { + _init_.Initialize() + + j := jsiiProxy_KubeEndpointSlice{} + + _jsii_.Create( + "k8s.KubeEndpointSlice", + []interface{}{scope, id, props}, + &j, + ) + + return &j +} + +// Defines a "io.k8s.api.discovery.v1.EndpointSlice" API object. +func NewKubeEndpointSlice_Override(k KubeEndpointSlice, scope constructs.Construct, id *string, props *KubeEndpointSliceProps) { + _init_.Initialize() + + _jsii_.Create( + "k8s.KubeEndpointSlice", + []interface{}{scope, id, props}, + k, + ) +} + +// Checks if `x` is a construct. +// +// Use this method instead of `instanceof` to properly detect `Construct` +// instances, even when the construct library is symlinked. +// +// Explanation: in JavaScript, multiple copies of the `constructs` library on +// disk are seen as independent, completely different libraries. As a +// consequence, the class `Construct` in each copy of the `constructs` library +// is seen as a different class, and an instance of one class will not test as +// `instanceof` the other class. `npm install` will not create installations +// like this, but users may manually symlink construct libraries together or +// use a monorepo tool: in those cases, multiple copies of the `constructs` +// library can be accidentally installed, and `instanceof` will behave +// unpredictably. It is safest to avoid using `instanceof`, and using +// this type-testing method instead. +// +// Returns: true if `x` is an object created from a class which extends `Construct`. +func KubeEndpointSlice_IsConstruct(x interface{}) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "k8s.KubeEndpointSlice", + "isConstruct", + []interface{}{x}, + &returns, + ) + + return returns +} + +// Renders a Kubernetes manifest for "io.k8s.api.discovery.v1.EndpointSlice". +// +// This can be used to inline resource manifests inside other objects (e.g. as templates). +func KubeEndpointSlice_Manifest(props *KubeEndpointSliceProps) interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "k8s.KubeEndpointSlice", + "manifest", + []interface{}{props}, + &returns, + ) + + return returns +} + +// Returns the `ApiObject` named `Resource` which is a child of the given construct. +// +// If `c` is an `ApiObject`, it is returned directly. Throws an +// exception if the construct does not have a child named `Default` _or_ if +// this child is not an `ApiObject`. +func KubeEndpointSlice_Of(c constructs.IConstruct) cdk8s.ApiObject { + _init_.Initialize() + + var returns cdk8s.ApiObject + + _jsii_.StaticInvoke( + "k8s.KubeEndpointSlice", + "of", + []interface{}{c}, + &returns, + ) + + return returns +} + +func KubeEndpointSlice_GVK() *cdk8s.GroupVersionKind { + _init_.Initialize() + var returns *cdk8s.GroupVersionKind + _jsii_.StaticGet( + "k8s.KubeEndpointSlice", + "GVK", + &returns, + ) + return returns +} + +func (k *jsiiProxy_KubeEndpointSlice) AddDependency(dependencies ...constructs.IConstruct) { + args := []interface{}{} + for _, a := range dependencies { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addDependency", + args, + ) +} + +func (k *jsiiProxy_KubeEndpointSlice) AddJsonPatch(ops ...cdk8s.JsonPatch) { + args := []interface{}{} + for _, a := range ops { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addJsonPatch", + args, + ) +} + +func (k *jsiiProxy_KubeEndpointSlice) ToJson() interface{} { + var returns interface{} + + _jsii_.Invoke( + k, + "toJson", + nil, // no parameters + &returns, + ) + + return returns +} + +func (k *jsiiProxy_KubeEndpointSlice) ToString() *string { + var returns *string + + _jsii_.Invoke( + k, + "toString", + nil, // no parameters + &returns, + ) + + return returns +} + +// EndpointSliceList represents a list of endpoint slices. +type KubeEndpointSliceList interface { + cdk8s.ApiObject + // The group portion of the API version (e.g. `authorization.k8s.io`). + ApiGroup() *string + // The object's API version (e.g. `authorization.k8s.io/v1`). + ApiVersion() *string + // The chart in which this object is defined. + Chart() cdk8s.Chart + // The object kind. + Kind() *string + // Metadata associated with this API object. + Metadata() cdk8s.ApiObjectMetadataDefinition + // The name of the API object. + // + // If a name is specified in `metadata.name` this will be the name returned. + // Otherwise, a name will be generated by calling + // `AddHelm.of(this).generatedObjectName(this)`, which by default uses the + // construct path to generate a DNS-compatible name for the resource. + Name() *string + // The tree node. + Node() constructs.Node + // Create a dependency between this ApiObject and other constructs. + // + // These can be other ApiObjects, Charts, or custom. + AddDependency(dependencies ...constructs.IConstruct) + // Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. + // + // Example: + // kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true)); + // + AddJsonPatch(ops ...cdk8s.JsonPatch) + // Renders the object to Kubernetes JSON. + ToJson() interface{} + // Returns a string representation of this construct. + ToString() *string +} + +// The jsii proxy struct for KubeEndpointSliceList +type jsiiProxy_KubeEndpointSliceList struct { + internal.Type__cdk8sApiObject +} + +func (j *jsiiProxy_KubeEndpointSliceList) ApiGroup() *string { + var returns *string + _jsii_.Get( + j, + "apiGroup", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeEndpointSliceList) ApiVersion() *string { + var returns *string + _jsii_.Get( + j, + "apiVersion", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeEndpointSliceList) Chart() cdk8s.Chart { + var returns cdk8s.Chart + _jsii_.Get( + j, + "chart", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeEndpointSliceList) Kind() *string { + var returns *string + _jsii_.Get( + j, + "kind", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeEndpointSliceList) Metadata() cdk8s.ApiObjectMetadataDefinition { + var returns cdk8s.ApiObjectMetadataDefinition + _jsii_.Get( + j, + "metadata", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeEndpointSliceList) Name() *string { + var returns *string + _jsii_.Get( + j, + "name", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeEndpointSliceList) Node() constructs.Node { + var returns constructs.Node + _jsii_.Get( + j, + "node", + &returns, + ) + return returns +} + +// Defines a "io.k8s.api.discovery.v1.EndpointSliceList" API object. +func NewKubeEndpointSliceList(scope constructs.Construct, id *string, props *KubeEndpointSliceListProps) KubeEndpointSliceList { + _init_.Initialize() + + j := jsiiProxy_KubeEndpointSliceList{} + + _jsii_.Create( + "k8s.KubeEndpointSliceList", + []interface{}{scope, id, props}, + &j, + ) + + return &j +} + +// Defines a "io.k8s.api.discovery.v1.EndpointSliceList" API object. +func NewKubeEndpointSliceList_Override(k KubeEndpointSliceList, scope constructs.Construct, id *string, props *KubeEndpointSliceListProps) { + _init_.Initialize() + + _jsii_.Create( + "k8s.KubeEndpointSliceList", + []interface{}{scope, id, props}, + k, + ) +} + +// Checks if `x` is a construct. +// +// Use this method instead of `instanceof` to properly detect `Construct` +// instances, even when the construct library is symlinked. +// +// Explanation: in JavaScript, multiple copies of the `constructs` library on +// disk are seen as independent, completely different libraries. As a +// consequence, the class `Construct` in each copy of the `constructs` library +// is seen as a different class, and an instance of one class will not test as +// `instanceof` the other class. `npm install` will not create installations +// like this, but users may manually symlink construct libraries together or +// use a monorepo tool: in those cases, multiple copies of the `constructs` +// library can be accidentally installed, and `instanceof` will behave +// unpredictably. It is safest to avoid using `instanceof`, and using +// this type-testing method instead. +// +// Returns: true if `x` is an object created from a class which extends `Construct`. +func KubeEndpointSliceList_IsConstruct(x interface{}) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "k8s.KubeEndpointSliceList", + "isConstruct", + []interface{}{x}, + &returns, + ) + + return returns +} + +// Renders a Kubernetes manifest for "io.k8s.api.discovery.v1.EndpointSliceList". +// +// This can be used to inline resource manifests inside other objects (e.g. as templates). +func KubeEndpointSliceList_Manifest(props *KubeEndpointSliceListProps) interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "k8s.KubeEndpointSliceList", + "manifest", + []interface{}{props}, + &returns, + ) + + return returns +} + +// Returns the `ApiObject` named `Resource` which is a child of the given construct. +// +// If `c` is an `ApiObject`, it is returned directly. Throws an +// exception if the construct does not have a child named `Default` _or_ if +// this child is not an `ApiObject`. +func KubeEndpointSliceList_Of(c constructs.IConstruct) cdk8s.ApiObject { + _init_.Initialize() + + var returns cdk8s.ApiObject + + _jsii_.StaticInvoke( + "k8s.KubeEndpointSliceList", + "of", + []interface{}{c}, + &returns, + ) + + return returns +} + +func KubeEndpointSliceList_GVK() *cdk8s.GroupVersionKind { + _init_.Initialize() + var returns *cdk8s.GroupVersionKind + _jsii_.StaticGet( + "k8s.KubeEndpointSliceList", + "GVK", + &returns, + ) + return returns +} + +func (k *jsiiProxy_KubeEndpointSliceList) AddDependency(dependencies ...constructs.IConstruct) { + args := []interface{}{} + for _, a := range dependencies { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addDependency", + args, + ) +} + +func (k *jsiiProxy_KubeEndpointSliceList) AddJsonPatch(ops ...cdk8s.JsonPatch) { + args := []interface{}{} + for _, a := range ops { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addJsonPatch", + args, + ) +} + +func (k *jsiiProxy_KubeEndpointSliceList) ToJson() interface{} { + var returns interface{} + + _jsii_.Invoke( + k, + "toJson", + nil, // no parameters + &returns, + ) + + return returns +} + +func (k *jsiiProxy_KubeEndpointSliceList) ToString() *string { + var returns *string + + _jsii_.Invoke( + k, + "toString", + nil, // no parameters + &returns, + ) + + return returns +} + +// EndpointSliceList represents a list of endpoint slices. +type KubeEndpointSliceListProps struct { + // List of endpoint slices. + Items *[]*KubeEndpointSliceProps `field:"required" json:"items" yaml:"items"` + // Standard list metadata. + Metadata *ListMeta `field:"optional" json:"metadata" yaml:"metadata"` +} + +// EndpointSliceList represents a list of endpoint slices. +type KubeEndpointSliceListV1Beta1 interface { + cdk8s.ApiObject + // The group portion of the API version (e.g. `authorization.k8s.io`). + ApiGroup() *string + // The object's API version (e.g. `authorization.k8s.io/v1`). + ApiVersion() *string + // The chart in which this object is defined. + Chart() cdk8s.Chart + // The object kind. + Kind() *string + // Metadata associated with this API object. + Metadata() cdk8s.ApiObjectMetadataDefinition + // The name of the API object. + // + // If a name is specified in `metadata.name` this will be the name returned. + // Otherwise, a name will be generated by calling + // `AddHelm.of(this).generatedObjectName(this)`, which by default uses the + // construct path to generate a DNS-compatible name for the resource. + Name() *string + // The tree node. + Node() constructs.Node + // Create a dependency between this ApiObject and other constructs. + // + // These can be other ApiObjects, Charts, or custom. + AddDependency(dependencies ...constructs.IConstruct) + // Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. + // + // Example: + // kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true)); + // + AddJsonPatch(ops ...cdk8s.JsonPatch) + // Renders the object to Kubernetes JSON. + ToJson() interface{} + // Returns a string representation of this construct. + ToString() *string +} + +// The jsii proxy struct for KubeEndpointSliceListV1Beta1 +type jsiiProxy_KubeEndpointSliceListV1Beta1 struct { + internal.Type__cdk8sApiObject +} + +func (j *jsiiProxy_KubeEndpointSliceListV1Beta1) ApiGroup() *string { + var returns *string + _jsii_.Get( + j, + "apiGroup", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeEndpointSliceListV1Beta1) ApiVersion() *string { + var returns *string + _jsii_.Get( + j, + "apiVersion", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeEndpointSliceListV1Beta1) Chart() cdk8s.Chart { + var returns cdk8s.Chart + _jsii_.Get( + j, + "chart", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeEndpointSliceListV1Beta1) Kind() *string { + var returns *string + _jsii_.Get( + j, + "kind", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeEndpointSliceListV1Beta1) Metadata() cdk8s.ApiObjectMetadataDefinition { + var returns cdk8s.ApiObjectMetadataDefinition + _jsii_.Get( + j, + "metadata", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeEndpointSliceListV1Beta1) Name() *string { + var returns *string + _jsii_.Get( + j, + "name", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeEndpointSliceListV1Beta1) Node() constructs.Node { + var returns constructs.Node + _jsii_.Get( + j, + "node", + &returns, + ) + return returns +} + +// Defines a "io.k8s.api.discovery.v1beta1.EndpointSliceList" API object. +func NewKubeEndpointSliceListV1Beta1(scope constructs.Construct, id *string, props *KubeEndpointSliceListV1Beta1Props) KubeEndpointSliceListV1Beta1 { + _init_.Initialize() + + j := jsiiProxy_KubeEndpointSliceListV1Beta1{} + + _jsii_.Create( + "k8s.KubeEndpointSliceListV1Beta1", + []interface{}{scope, id, props}, + &j, + ) + + return &j +} + +// Defines a "io.k8s.api.discovery.v1beta1.EndpointSliceList" API object. +func NewKubeEndpointSliceListV1Beta1_Override(k KubeEndpointSliceListV1Beta1, scope constructs.Construct, id *string, props *KubeEndpointSliceListV1Beta1Props) { + _init_.Initialize() + + _jsii_.Create( + "k8s.KubeEndpointSliceListV1Beta1", + []interface{}{scope, id, props}, + k, + ) +} + +// Checks if `x` is a construct. +// +// Use this method instead of `instanceof` to properly detect `Construct` +// instances, even when the construct library is symlinked. +// +// Explanation: in JavaScript, multiple copies of the `constructs` library on +// disk are seen as independent, completely different libraries. As a +// consequence, the class `Construct` in each copy of the `constructs` library +// is seen as a different class, and an instance of one class will not test as +// `instanceof` the other class. `npm install` will not create installations +// like this, but users may manually symlink construct libraries together or +// use a monorepo tool: in those cases, multiple copies of the `constructs` +// library can be accidentally installed, and `instanceof` will behave +// unpredictably. It is safest to avoid using `instanceof`, and using +// this type-testing method instead. +// +// Returns: true if `x` is an object created from a class which extends `Construct`. +func KubeEndpointSliceListV1Beta1_IsConstruct(x interface{}) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "k8s.KubeEndpointSliceListV1Beta1", + "isConstruct", + []interface{}{x}, + &returns, + ) + + return returns +} + +// Renders a Kubernetes manifest for "io.k8s.api.discovery.v1beta1.EndpointSliceList". +// +// This can be used to inline resource manifests inside other objects (e.g. as templates). +func KubeEndpointSliceListV1Beta1_Manifest(props *KubeEndpointSliceListV1Beta1Props) interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "k8s.KubeEndpointSliceListV1Beta1", + "manifest", + []interface{}{props}, + &returns, + ) + + return returns +} + +// Returns the `ApiObject` named `Resource` which is a child of the given construct. +// +// If `c` is an `ApiObject`, it is returned directly. Throws an +// exception if the construct does not have a child named `Default` _or_ if +// this child is not an `ApiObject`. +func KubeEndpointSliceListV1Beta1_Of(c constructs.IConstruct) cdk8s.ApiObject { + _init_.Initialize() + + var returns cdk8s.ApiObject + + _jsii_.StaticInvoke( + "k8s.KubeEndpointSliceListV1Beta1", + "of", + []interface{}{c}, + &returns, + ) + + return returns +} + +func KubeEndpointSliceListV1Beta1_GVK() *cdk8s.GroupVersionKind { + _init_.Initialize() + var returns *cdk8s.GroupVersionKind + _jsii_.StaticGet( + "k8s.KubeEndpointSliceListV1Beta1", + "GVK", + &returns, + ) + return returns +} + +func (k *jsiiProxy_KubeEndpointSliceListV1Beta1) AddDependency(dependencies ...constructs.IConstruct) { + args := []interface{}{} + for _, a := range dependencies { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addDependency", + args, + ) +} + +func (k *jsiiProxy_KubeEndpointSliceListV1Beta1) AddJsonPatch(ops ...cdk8s.JsonPatch) { + args := []interface{}{} + for _, a := range ops { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addJsonPatch", + args, + ) +} + +func (k *jsiiProxy_KubeEndpointSliceListV1Beta1) ToJson() interface{} { + var returns interface{} + + _jsii_.Invoke( + k, + "toJson", + nil, // no parameters + &returns, + ) + + return returns +} + +func (k *jsiiProxy_KubeEndpointSliceListV1Beta1) ToString() *string { + var returns *string + + _jsii_.Invoke( + k, + "toString", + nil, // no parameters + &returns, + ) + + return returns +} + +// EndpointSliceList represents a list of endpoint slices. +type KubeEndpointSliceListV1Beta1Props struct { + // List of endpoint slices. + Items *[]*KubeEndpointSliceV1Beta1Props `field:"required" json:"items" yaml:"items"` + // Standard list metadata. + Metadata *ListMeta `field:"optional" json:"metadata" yaml:"metadata"` +} + +// EndpointSlice represents a subset of the endpoints that implement a service. +// +// For a given service there may be multiple EndpointSlice objects, selected by labels, which must be joined to produce the full set of endpoints. +type KubeEndpointSliceProps struct { + // addressType specifies the type of address carried by this EndpointSlice. + // + // All addresses in this slice must be the same type. This field is immutable after creation. The following address types are currently supported: * IPv4: Represents an IPv4 Address. * IPv6: Represents an IPv6 Address. * FQDN: Represents a Fully Qualified Domain Name. + AddressType *string `field:"required" json:"addressType" yaml:"addressType"` + // endpoints is a list of unique endpoints in this slice. + // + // Each slice may include a maximum of 1000 endpoints. + Endpoints *[]*Endpoint `field:"required" json:"endpoints" yaml:"endpoints"` + // Standard object's metadata. + Metadata *ObjectMeta `field:"optional" json:"metadata" yaml:"metadata"` + // ports specifies the list of network ports exposed by each endpoint in this slice. + // + // Each port must have a unique name. When ports is empty, it indicates that there are no defined ports. When a port is defined with a nil port value, it indicates "all ports". Each slice may include a maximum of 100 ports. + Ports *[]*EndpointPort `field:"optional" json:"ports" yaml:"ports"` +} + +// EndpointSlice represents a subset of the endpoints that implement a service. +// +// For a given service there may be multiple EndpointSlice objects, selected by labels, which must be joined to produce the full set of endpoints. +type KubeEndpointSliceV1Beta1 interface { + cdk8s.ApiObject + // The group portion of the API version (e.g. `authorization.k8s.io`). + ApiGroup() *string + // The object's API version (e.g. `authorization.k8s.io/v1`). + ApiVersion() *string + // The chart in which this object is defined. + Chart() cdk8s.Chart + // The object kind. + Kind() *string + // Metadata associated with this API object. + Metadata() cdk8s.ApiObjectMetadataDefinition + // The name of the API object. + // + // If a name is specified in `metadata.name` this will be the name returned. + // Otherwise, a name will be generated by calling + // `AddHelm.of(this).generatedObjectName(this)`, which by default uses the + // construct path to generate a DNS-compatible name for the resource. + Name() *string + // The tree node. + Node() constructs.Node + // Create a dependency between this ApiObject and other constructs. + // + // These can be other ApiObjects, Charts, or custom. + AddDependency(dependencies ...constructs.IConstruct) + // Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. + // + // Example: + // kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true)); + // + AddJsonPatch(ops ...cdk8s.JsonPatch) + // Renders the object to Kubernetes JSON. + ToJson() interface{} + // Returns a string representation of this construct. + ToString() *string +} + +// The jsii proxy struct for KubeEndpointSliceV1Beta1 +type jsiiProxy_KubeEndpointSliceV1Beta1 struct { + internal.Type__cdk8sApiObject +} + +func (j *jsiiProxy_KubeEndpointSliceV1Beta1) ApiGroup() *string { + var returns *string + _jsii_.Get( + j, + "apiGroup", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeEndpointSliceV1Beta1) ApiVersion() *string { + var returns *string + _jsii_.Get( + j, + "apiVersion", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeEndpointSliceV1Beta1) Chart() cdk8s.Chart { + var returns cdk8s.Chart + _jsii_.Get( + j, + "chart", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeEndpointSliceV1Beta1) Kind() *string { + var returns *string + _jsii_.Get( + j, + "kind", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeEndpointSliceV1Beta1) Metadata() cdk8s.ApiObjectMetadataDefinition { + var returns cdk8s.ApiObjectMetadataDefinition + _jsii_.Get( + j, + "metadata", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeEndpointSliceV1Beta1) Name() *string { + var returns *string + _jsii_.Get( + j, + "name", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeEndpointSliceV1Beta1) Node() constructs.Node { + var returns constructs.Node + _jsii_.Get( + j, + "node", + &returns, + ) + return returns +} + +// Defines a "io.k8s.api.discovery.v1beta1.EndpointSlice" API object. +func NewKubeEndpointSliceV1Beta1(scope constructs.Construct, id *string, props *KubeEndpointSliceV1Beta1Props) KubeEndpointSliceV1Beta1 { + _init_.Initialize() + + j := jsiiProxy_KubeEndpointSliceV1Beta1{} + + _jsii_.Create( + "k8s.KubeEndpointSliceV1Beta1", + []interface{}{scope, id, props}, + &j, + ) + + return &j +} + +// Defines a "io.k8s.api.discovery.v1beta1.EndpointSlice" API object. +func NewKubeEndpointSliceV1Beta1_Override(k KubeEndpointSliceV1Beta1, scope constructs.Construct, id *string, props *KubeEndpointSliceV1Beta1Props) { + _init_.Initialize() + + _jsii_.Create( + "k8s.KubeEndpointSliceV1Beta1", + []interface{}{scope, id, props}, + k, + ) +} + +// Checks if `x` is a construct. +// +// Use this method instead of `instanceof` to properly detect `Construct` +// instances, even when the construct library is symlinked. +// +// Explanation: in JavaScript, multiple copies of the `constructs` library on +// disk are seen as independent, completely different libraries. As a +// consequence, the class `Construct` in each copy of the `constructs` library +// is seen as a different class, and an instance of one class will not test as +// `instanceof` the other class. `npm install` will not create installations +// like this, but users may manually symlink construct libraries together or +// use a monorepo tool: in those cases, multiple copies of the `constructs` +// library can be accidentally installed, and `instanceof` will behave +// unpredictably. It is safest to avoid using `instanceof`, and using +// this type-testing method instead. +// +// Returns: true if `x` is an object created from a class which extends `Construct`. +func KubeEndpointSliceV1Beta1_IsConstruct(x interface{}) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "k8s.KubeEndpointSliceV1Beta1", + "isConstruct", + []interface{}{x}, + &returns, + ) + + return returns +} + +// Renders a Kubernetes manifest for "io.k8s.api.discovery.v1beta1.EndpointSlice". +// +// This can be used to inline resource manifests inside other objects (e.g. as templates). +func KubeEndpointSliceV1Beta1_Manifest(props *KubeEndpointSliceV1Beta1Props) interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "k8s.KubeEndpointSliceV1Beta1", + "manifest", + []interface{}{props}, + &returns, + ) + + return returns +} + +// Returns the `ApiObject` named `Resource` which is a child of the given construct. +// +// If `c` is an `ApiObject`, it is returned directly. Throws an +// exception if the construct does not have a child named `Default` _or_ if +// this child is not an `ApiObject`. +func KubeEndpointSliceV1Beta1_Of(c constructs.IConstruct) cdk8s.ApiObject { + _init_.Initialize() + + var returns cdk8s.ApiObject + + _jsii_.StaticInvoke( + "k8s.KubeEndpointSliceV1Beta1", + "of", + []interface{}{c}, + &returns, + ) + + return returns +} + +func KubeEndpointSliceV1Beta1_GVK() *cdk8s.GroupVersionKind { + _init_.Initialize() + var returns *cdk8s.GroupVersionKind + _jsii_.StaticGet( + "k8s.KubeEndpointSliceV1Beta1", + "GVK", + &returns, + ) + return returns +} + +func (k *jsiiProxy_KubeEndpointSliceV1Beta1) AddDependency(dependencies ...constructs.IConstruct) { + args := []interface{}{} + for _, a := range dependencies { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addDependency", + args, + ) +} + +func (k *jsiiProxy_KubeEndpointSliceV1Beta1) AddJsonPatch(ops ...cdk8s.JsonPatch) { + args := []interface{}{} + for _, a := range ops { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addJsonPatch", + args, + ) +} + +func (k *jsiiProxy_KubeEndpointSliceV1Beta1) ToJson() interface{} { + var returns interface{} + + _jsii_.Invoke( + k, + "toJson", + nil, // no parameters + &returns, + ) + + return returns +} + +func (k *jsiiProxy_KubeEndpointSliceV1Beta1) ToString() *string { + var returns *string + + _jsii_.Invoke( + k, + "toString", + nil, // no parameters + &returns, + ) + + return returns +} + +// EndpointSlice represents a subset of the endpoints that implement a service. +// +// For a given service there may be multiple EndpointSlice objects, selected by labels, which must be joined to produce the full set of endpoints. +type KubeEndpointSliceV1Beta1Props struct { + // addressType specifies the type of address carried by this EndpointSlice. + // + // All addresses in this slice must be the same type. This field is immutable after creation. The following address types are currently supported: * IPv4: Represents an IPv4 Address. * IPv6: Represents an IPv6 Address. * FQDN: Represents a Fully Qualified Domain Name. + AddressType *string `field:"required" json:"addressType" yaml:"addressType"` + // endpoints is a list of unique endpoints in this slice. + // + // Each slice may include a maximum of 1000 endpoints. + Endpoints *[]*EndpointV1Beta1 `field:"required" json:"endpoints" yaml:"endpoints"` + // Standard object's metadata. + Metadata *ObjectMeta `field:"optional" json:"metadata" yaml:"metadata"` + // ports specifies the list of network ports exposed by each endpoint in this slice. + // + // Each port must have a unique name. When ports is empty, it indicates that there are no defined ports. When a port is defined with a nil port value, it indicates "all ports". Each slice may include a maximum of 100 ports. + Ports *[]*EndpointPortV1Beta1 `field:"optional" json:"ports" yaml:"ports"` +} + +// Endpoints is a collection of endpoints that implement the actual service. +// +// Example: +// Name: "mysvc", +// Subsets: [ +// +// { +// Addresses: [{"ip": "10.10.1.1"}, {"ip": "10.10.2.2"}], +// Ports: [{"name": "a", "port": 8675}, {"name": "b", "port": 309}] +// }, +// { +// Addresses: [{"ip": "10.10.3.3"}], +// Ports: [{"name": "a", "port": 93}, {"name": "b", "port": 76}] +// }, +// +// ]. +type KubeEndpoints interface { + cdk8s.ApiObject + // The group portion of the API version (e.g. `authorization.k8s.io`). + ApiGroup() *string + // The object's API version (e.g. `authorization.k8s.io/v1`). + ApiVersion() *string + // The chart in which this object is defined. + Chart() cdk8s.Chart + // The object kind. + Kind() *string + // Metadata associated with this API object. + Metadata() cdk8s.ApiObjectMetadataDefinition + // The name of the API object. + // + // If a name is specified in `metadata.name` this will be the name returned. + // Otherwise, a name will be generated by calling + // `AddHelm.of(this).generatedObjectName(this)`, which by default uses the + // construct path to generate a DNS-compatible name for the resource. + Name() *string + // The tree node. + Node() constructs.Node + // Create a dependency between this ApiObject and other constructs. + // + // These can be other ApiObjects, Charts, or custom. + AddDependency(dependencies ...constructs.IConstruct) + // Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. + // + // Example: + // kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true)); + // + AddJsonPatch(ops ...cdk8s.JsonPatch) + // Renders the object to Kubernetes JSON. + ToJson() interface{} + // Returns a string representation of this construct. + ToString() *string +} + +// The jsii proxy struct for KubeEndpoints +type jsiiProxy_KubeEndpoints struct { + internal.Type__cdk8sApiObject +} + +func (j *jsiiProxy_KubeEndpoints) ApiGroup() *string { + var returns *string + _jsii_.Get( + j, + "apiGroup", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeEndpoints) ApiVersion() *string { + var returns *string + _jsii_.Get( + j, + "apiVersion", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeEndpoints) Chart() cdk8s.Chart { + var returns cdk8s.Chart + _jsii_.Get( + j, + "chart", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeEndpoints) Kind() *string { + var returns *string + _jsii_.Get( + j, + "kind", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeEndpoints) Metadata() cdk8s.ApiObjectMetadataDefinition { + var returns cdk8s.ApiObjectMetadataDefinition + _jsii_.Get( + j, + "metadata", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeEndpoints) Name() *string { + var returns *string + _jsii_.Get( + j, + "name", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeEndpoints) Node() constructs.Node { + var returns constructs.Node + _jsii_.Get( + j, + "node", + &returns, + ) + return returns +} + +// Defines a "io.k8s.api.core.v1.Endpoints" API object. +func NewKubeEndpoints(scope constructs.Construct, id *string, props *KubeEndpointsProps) KubeEndpoints { + _init_.Initialize() + + j := jsiiProxy_KubeEndpoints{} + + _jsii_.Create( + "k8s.KubeEndpoints", + []interface{}{scope, id, props}, + &j, + ) + + return &j +} + +// Defines a "io.k8s.api.core.v1.Endpoints" API object. +func NewKubeEndpoints_Override(k KubeEndpoints, scope constructs.Construct, id *string, props *KubeEndpointsProps) { + _init_.Initialize() + + _jsii_.Create( + "k8s.KubeEndpoints", + []interface{}{scope, id, props}, + k, + ) +} + +// Checks if `x` is a construct. +// +// Use this method instead of `instanceof` to properly detect `Construct` +// instances, even when the construct library is symlinked. +// +// Explanation: in JavaScript, multiple copies of the `constructs` library on +// disk are seen as independent, completely different libraries. As a +// consequence, the class `Construct` in each copy of the `constructs` library +// is seen as a different class, and an instance of one class will not test as +// `instanceof` the other class. `npm install` will not create installations +// like this, but users may manually symlink construct libraries together or +// use a monorepo tool: in those cases, multiple copies of the `constructs` +// library can be accidentally installed, and `instanceof` will behave +// unpredictably. It is safest to avoid using `instanceof`, and using +// this type-testing method instead. +// +// Returns: true if `x` is an object created from a class which extends `Construct`. +func KubeEndpoints_IsConstruct(x interface{}) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "k8s.KubeEndpoints", + "isConstruct", + []interface{}{x}, + &returns, + ) + + return returns +} + +// Renders a Kubernetes manifest for "io.k8s.api.core.v1.Endpoints". +// +// This can be used to inline resource manifests inside other objects (e.g. as templates). +func KubeEndpoints_Manifest(props *KubeEndpointsProps) interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "k8s.KubeEndpoints", + "manifest", + []interface{}{props}, + &returns, + ) + + return returns +} + +// Returns the `ApiObject` named `Resource` which is a child of the given construct. +// +// If `c` is an `ApiObject`, it is returned directly. Throws an +// exception if the construct does not have a child named `Default` _or_ if +// this child is not an `ApiObject`. +func KubeEndpoints_Of(c constructs.IConstruct) cdk8s.ApiObject { + _init_.Initialize() + + var returns cdk8s.ApiObject + + _jsii_.StaticInvoke( + "k8s.KubeEndpoints", + "of", + []interface{}{c}, + &returns, + ) + + return returns +} + +func KubeEndpoints_GVK() *cdk8s.GroupVersionKind { + _init_.Initialize() + var returns *cdk8s.GroupVersionKind + _jsii_.StaticGet( + "k8s.KubeEndpoints", + "GVK", + &returns, + ) + return returns +} + +func (k *jsiiProxy_KubeEndpoints) AddDependency(dependencies ...constructs.IConstruct) { + args := []interface{}{} + for _, a := range dependencies { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addDependency", + args, + ) +} + +func (k *jsiiProxy_KubeEndpoints) AddJsonPatch(ops ...cdk8s.JsonPatch) { + args := []interface{}{} + for _, a := range ops { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addJsonPatch", + args, + ) +} + +func (k *jsiiProxy_KubeEndpoints) ToJson() interface{} { + var returns interface{} + + _jsii_.Invoke( + k, + "toJson", + nil, // no parameters + &returns, + ) + + return returns +} + +func (k *jsiiProxy_KubeEndpoints) ToString() *string { + var returns *string + + _jsii_.Invoke( + k, + "toString", + nil, // no parameters + &returns, + ) + + return returns +} + +// EndpointsList is a list of endpoints. +type KubeEndpointsList interface { + cdk8s.ApiObject + // The group portion of the API version (e.g. `authorization.k8s.io`). + ApiGroup() *string + // The object's API version (e.g. `authorization.k8s.io/v1`). + ApiVersion() *string + // The chart in which this object is defined. + Chart() cdk8s.Chart + // The object kind. + Kind() *string + // Metadata associated with this API object. + Metadata() cdk8s.ApiObjectMetadataDefinition + // The name of the API object. + // + // If a name is specified in `metadata.name` this will be the name returned. + // Otherwise, a name will be generated by calling + // `AddHelm.of(this).generatedObjectName(this)`, which by default uses the + // construct path to generate a DNS-compatible name for the resource. + Name() *string + // The tree node. + Node() constructs.Node + // Create a dependency between this ApiObject and other constructs. + // + // These can be other ApiObjects, Charts, or custom. + AddDependency(dependencies ...constructs.IConstruct) + // Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. + // + // Example: + // kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true)); + // + AddJsonPatch(ops ...cdk8s.JsonPatch) + // Renders the object to Kubernetes JSON. + ToJson() interface{} + // Returns a string representation of this construct. + ToString() *string +} + +// The jsii proxy struct for KubeEndpointsList +type jsiiProxy_KubeEndpointsList struct { + internal.Type__cdk8sApiObject +} + +func (j *jsiiProxy_KubeEndpointsList) ApiGroup() *string { + var returns *string + _jsii_.Get( + j, + "apiGroup", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeEndpointsList) ApiVersion() *string { + var returns *string + _jsii_.Get( + j, + "apiVersion", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeEndpointsList) Chart() cdk8s.Chart { + var returns cdk8s.Chart + _jsii_.Get( + j, + "chart", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeEndpointsList) Kind() *string { + var returns *string + _jsii_.Get( + j, + "kind", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeEndpointsList) Metadata() cdk8s.ApiObjectMetadataDefinition { + var returns cdk8s.ApiObjectMetadataDefinition + _jsii_.Get( + j, + "metadata", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeEndpointsList) Name() *string { + var returns *string + _jsii_.Get( + j, + "name", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeEndpointsList) Node() constructs.Node { + var returns constructs.Node + _jsii_.Get( + j, + "node", + &returns, + ) + return returns +} + +// Defines a "io.k8s.api.core.v1.EndpointsList" API object. +func NewKubeEndpointsList(scope constructs.Construct, id *string, props *KubeEndpointsListProps) KubeEndpointsList { + _init_.Initialize() + + j := jsiiProxy_KubeEndpointsList{} + + _jsii_.Create( + "k8s.KubeEndpointsList", + []interface{}{scope, id, props}, + &j, + ) + + return &j +} + +// Defines a "io.k8s.api.core.v1.EndpointsList" API object. +func NewKubeEndpointsList_Override(k KubeEndpointsList, scope constructs.Construct, id *string, props *KubeEndpointsListProps) { + _init_.Initialize() + + _jsii_.Create( + "k8s.KubeEndpointsList", + []interface{}{scope, id, props}, + k, + ) +} + +// Checks if `x` is a construct. +// +// Use this method instead of `instanceof` to properly detect `Construct` +// instances, even when the construct library is symlinked. +// +// Explanation: in JavaScript, multiple copies of the `constructs` library on +// disk are seen as independent, completely different libraries. As a +// consequence, the class `Construct` in each copy of the `constructs` library +// is seen as a different class, and an instance of one class will not test as +// `instanceof` the other class. `npm install` will not create installations +// like this, but users may manually symlink construct libraries together or +// use a monorepo tool: in those cases, multiple copies of the `constructs` +// library can be accidentally installed, and `instanceof` will behave +// unpredictably. It is safest to avoid using `instanceof`, and using +// this type-testing method instead. +// +// Returns: true if `x` is an object created from a class which extends `Construct`. +func KubeEndpointsList_IsConstruct(x interface{}) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "k8s.KubeEndpointsList", + "isConstruct", + []interface{}{x}, + &returns, + ) + + return returns +} + +// Renders a Kubernetes manifest for "io.k8s.api.core.v1.EndpointsList". +// +// This can be used to inline resource manifests inside other objects (e.g. as templates). +func KubeEndpointsList_Manifest(props *KubeEndpointsListProps) interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "k8s.KubeEndpointsList", + "manifest", + []interface{}{props}, + &returns, + ) + + return returns +} + +// Returns the `ApiObject` named `Resource` which is a child of the given construct. +// +// If `c` is an `ApiObject`, it is returned directly. Throws an +// exception if the construct does not have a child named `Default` _or_ if +// this child is not an `ApiObject`. +func KubeEndpointsList_Of(c constructs.IConstruct) cdk8s.ApiObject { + _init_.Initialize() + + var returns cdk8s.ApiObject + + _jsii_.StaticInvoke( + "k8s.KubeEndpointsList", + "of", + []interface{}{c}, + &returns, + ) + + return returns +} + +func KubeEndpointsList_GVK() *cdk8s.GroupVersionKind { + _init_.Initialize() + var returns *cdk8s.GroupVersionKind + _jsii_.StaticGet( + "k8s.KubeEndpointsList", + "GVK", + &returns, + ) + return returns +} + +func (k *jsiiProxy_KubeEndpointsList) AddDependency(dependencies ...constructs.IConstruct) { + args := []interface{}{} + for _, a := range dependencies { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addDependency", + args, + ) +} + +func (k *jsiiProxy_KubeEndpointsList) AddJsonPatch(ops ...cdk8s.JsonPatch) { + args := []interface{}{} + for _, a := range ops { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addJsonPatch", + args, + ) +} + +func (k *jsiiProxy_KubeEndpointsList) ToJson() interface{} { + var returns interface{} + + _jsii_.Invoke( + k, + "toJson", + nil, // no parameters + &returns, + ) + + return returns +} + +func (k *jsiiProxy_KubeEndpointsList) ToString() *string { + var returns *string + + _jsii_.Invoke( + k, + "toString", + nil, // no parameters + &returns, + ) + + return returns +} + +// EndpointsList is a list of endpoints. +type KubeEndpointsListProps struct { + // List of endpoints. + Items *[]*KubeEndpointsProps `field:"required" json:"items" yaml:"items"` + // Standard list metadata. + // + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + Metadata *ListMeta `field:"optional" json:"metadata" yaml:"metadata"` +} + +// Endpoints is a collection of endpoints that implement the actual service. +// +// Example: +// Name: "mysvc", +// Subsets: [ +// { +// Addresses: [{"ip": "10.10.1.1"}, {"ip": "10.10.2.2"}], +// Ports: [{"name": "a", "port": 8675}, {"name": "b", "port": 309}] +// }, +// { +// Addresses: [{"ip": "10.10.3.3"}], +// Ports: [{"name": "a", "port": 93}, {"name": "b", "port": 76}] +// }, +// ]. +type KubeEndpointsProps struct { + // Standard object's metadata. + // + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + Metadata *ObjectMeta `field:"optional" json:"metadata" yaml:"metadata"` + // The set of all endpoints is the union of all subsets. + // + // Addresses are placed into subsets according to the IPs they share. A single address with multiple ports, some of which are ready and some of which are not (because they come from different containers) will result in the address being displayed in different subsets for the different ports. No address will appear in both Addresses and NotReadyAddresses in the same subset. Sets of addresses and ports that comprise a service. + Subsets *[]*EndpointSubset `field:"optional" json:"subsets" yaml:"subsets"` +} + +// Event is a report of an event somewhere in the cluster. +// +// It generally denotes some state change in the system. Events have a limited retention time and triggers and messages may evolve with time. Event consumers should not rely on the timing of an event with a given Reason reflecting a consistent underlying trigger, or the continued existence of events with that Reason. Events should be treated as informative, best-effort, supplemental data. +type KubeEvent interface { + cdk8s.ApiObject + // The group portion of the API version (e.g. `authorization.k8s.io`). + ApiGroup() *string + // The object's API version (e.g. `authorization.k8s.io/v1`). + ApiVersion() *string + // The chart in which this object is defined. + Chart() cdk8s.Chart + // The object kind. + Kind() *string + // Metadata associated with this API object. + Metadata() cdk8s.ApiObjectMetadataDefinition + // The name of the API object. + // + // If a name is specified in `metadata.name` this will be the name returned. + // Otherwise, a name will be generated by calling + // `AddHelm.of(this).generatedObjectName(this)`, which by default uses the + // construct path to generate a DNS-compatible name for the resource. + Name() *string + // The tree node. + Node() constructs.Node + // Create a dependency between this ApiObject and other constructs. + // + // These can be other ApiObjects, Charts, or custom. + AddDependency(dependencies ...constructs.IConstruct) + // Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. + // + // Example: + // kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true)); + // + AddJsonPatch(ops ...cdk8s.JsonPatch) + // Renders the object to Kubernetes JSON. + ToJson() interface{} + // Returns a string representation of this construct. + ToString() *string +} + +// The jsii proxy struct for KubeEvent +type jsiiProxy_KubeEvent struct { + internal.Type__cdk8sApiObject +} + +func (j *jsiiProxy_KubeEvent) ApiGroup() *string { + var returns *string + _jsii_.Get( + j, + "apiGroup", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeEvent) ApiVersion() *string { + var returns *string + _jsii_.Get( + j, + "apiVersion", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeEvent) Chart() cdk8s.Chart { + var returns cdk8s.Chart + _jsii_.Get( + j, + "chart", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeEvent) Kind() *string { + var returns *string + _jsii_.Get( + j, + "kind", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeEvent) Metadata() cdk8s.ApiObjectMetadataDefinition { + var returns cdk8s.ApiObjectMetadataDefinition + _jsii_.Get( + j, + "metadata", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeEvent) Name() *string { + var returns *string + _jsii_.Get( + j, + "name", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeEvent) Node() constructs.Node { + var returns constructs.Node + _jsii_.Get( + j, + "node", + &returns, + ) + return returns +} + +// Defines a "io.k8s.api.events.v1.Event" API object. +func NewKubeEvent(scope constructs.Construct, id *string, props *KubeEventProps) KubeEvent { + _init_.Initialize() + + j := jsiiProxy_KubeEvent{} + + _jsii_.Create( + "k8s.KubeEvent", + []interface{}{scope, id, props}, + &j, + ) + + return &j +} + +// Defines a "io.k8s.api.events.v1.Event" API object. +func NewKubeEvent_Override(k KubeEvent, scope constructs.Construct, id *string, props *KubeEventProps) { + _init_.Initialize() + + _jsii_.Create( + "k8s.KubeEvent", + []interface{}{scope, id, props}, + k, + ) +} + +// Checks if `x` is a construct. +// +// Use this method instead of `instanceof` to properly detect `Construct` +// instances, even when the construct library is symlinked. +// +// Explanation: in JavaScript, multiple copies of the `constructs` library on +// disk are seen as independent, completely different libraries. As a +// consequence, the class `Construct` in each copy of the `constructs` library +// is seen as a different class, and an instance of one class will not test as +// `instanceof` the other class. `npm install` will not create installations +// like this, but users may manually symlink construct libraries together or +// use a monorepo tool: in those cases, multiple copies of the `constructs` +// library can be accidentally installed, and `instanceof` will behave +// unpredictably. It is safest to avoid using `instanceof`, and using +// this type-testing method instead. +// +// Returns: true if `x` is an object created from a class which extends `Construct`. +func KubeEvent_IsConstruct(x interface{}) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "k8s.KubeEvent", + "isConstruct", + []interface{}{x}, + &returns, + ) + + return returns +} + +// Renders a Kubernetes manifest for "io.k8s.api.events.v1.Event". +// +// This can be used to inline resource manifests inside other objects (e.g. as templates). +func KubeEvent_Manifest(props *KubeEventProps) interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "k8s.KubeEvent", + "manifest", + []interface{}{props}, + &returns, + ) + + return returns +} + +// Returns the `ApiObject` named `Resource` which is a child of the given construct. +// +// If `c` is an `ApiObject`, it is returned directly. Throws an +// exception if the construct does not have a child named `Default` _or_ if +// this child is not an `ApiObject`. +func KubeEvent_Of(c constructs.IConstruct) cdk8s.ApiObject { + _init_.Initialize() + + var returns cdk8s.ApiObject + + _jsii_.StaticInvoke( + "k8s.KubeEvent", + "of", + []interface{}{c}, + &returns, + ) + + return returns +} + +func KubeEvent_GVK() *cdk8s.GroupVersionKind { + _init_.Initialize() + var returns *cdk8s.GroupVersionKind + _jsii_.StaticGet( + "k8s.KubeEvent", + "GVK", + &returns, + ) + return returns +} + +func (k *jsiiProxy_KubeEvent) AddDependency(dependencies ...constructs.IConstruct) { + args := []interface{}{} + for _, a := range dependencies { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addDependency", + args, + ) +} + +func (k *jsiiProxy_KubeEvent) AddJsonPatch(ops ...cdk8s.JsonPatch) { + args := []interface{}{} + for _, a := range ops { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addJsonPatch", + args, + ) +} + +func (k *jsiiProxy_KubeEvent) ToJson() interface{} { + var returns interface{} + + _jsii_.Invoke( + k, + "toJson", + nil, // no parameters + &returns, + ) + + return returns +} + +func (k *jsiiProxy_KubeEvent) ToString() *string { + var returns *string + + _jsii_.Invoke( + k, + "toString", + nil, // no parameters + &returns, + ) + + return returns +} + +// EventList is a list of Event objects. +type KubeEventList interface { + cdk8s.ApiObject + // The group portion of the API version (e.g. `authorization.k8s.io`). + ApiGroup() *string + // The object's API version (e.g. `authorization.k8s.io/v1`). + ApiVersion() *string + // The chart in which this object is defined. + Chart() cdk8s.Chart + // The object kind. + Kind() *string + // Metadata associated with this API object. + Metadata() cdk8s.ApiObjectMetadataDefinition + // The name of the API object. + // + // If a name is specified in `metadata.name` this will be the name returned. + // Otherwise, a name will be generated by calling + // `AddHelm.of(this).generatedObjectName(this)`, which by default uses the + // construct path to generate a DNS-compatible name for the resource. + Name() *string + // The tree node. + Node() constructs.Node + // Create a dependency between this ApiObject and other constructs. + // + // These can be other ApiObjects, Charts, or custom. + AddDependency(dependencies ...constructs.IConstruct) + // Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. + // + // Example: + // kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true)); + // + AddJsonPatch(ops ...cdk8s.JsonPatch) + // Renders the object to Kubernetes JSON. + ToJson() interface{} + // Returns a string representation of this construct. + ToString() *string +} + +// The jsii proxy struct for KubeEventList +type jsiiProxy_KubeEventList struct { + internal.Type__cdk8sApiObject +} + +func (j *jsiiProxy_KubeEventList) ApiGroup() *string { + var returns *string + _jsii_.Get( + j, + "apiGroup", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeEventList) ApiVersion() *string { + var returns *string + _jsii_.Get( + j, + "apiVersion", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeEventList) Chart() cdk8s.Chart { + var returns cdk8s.Chart + _jsii_.Get( + j, + "chart", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeEventList) Kind() *string { + var returns *string + _jsii_.Get( + j, + "kind", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeEventList) Metadata() cdk8s.ApiObjectMetadataDefinition { + var returns cdk8s.ApiObjectMetadataDefinition + _jsii_.Get( + j, + "metadata", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeEventList) Name() *string { + var returns *string + _jsii_.Get( + j, + "name", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeEventList) Node() constructs.Node { + var returns constructs.Node + _jsii_.Get( + j, + "node", + &returns, + ) + return returns +} + +// Defines a "io.k8s.api.events.v1.EventList" API object. +func NewKubeEventList(scope constructs.Construct, id *string, props *KubeEventListProps) KubeEventList { + _init_.Initialize() + + j := jsiiProxy_KubeEventList{} + + _jsii_.Create( + "k8s.KubeEventList", + []interface{}{scope, id, props}, + &j, + ) + + return &j +} + +// Defines a "io.k8s.api.events.v1.EventList" API object. +func NewKubeEventList_Override(k KubeEventList, scope constructs.Construct, id *string, props *KubeEventListProps) { + _init_.Initialize() + + _jsii_.Create( + "k8s.KubeEventList", + []interface{}{scope, id, props}, + k, + ) +} + +// Checks if `x` is a construct. +// +// Use this method instead of `instanceof` to properly detect `Construct` +// instances, even when the construct library is symlinked. +// +// Explanation: in JavaScript, multiple copies of the `constructs` library on +// disk are seen as independent, completely different libraries. As a +// consequence, the class `Construct` in each copy of the `constructs` library +// is seen as a different class, and an instance of one class will not test as +// `instanceof` the other class. `npm install` will not create installations +// like this, but users may manually symlink construct libraries together or +// use a monorepo tool: in those cases, multiple copies of the `constructs` +// library can be accidentally installed, and `instanceof` will behave +// unpredictably. It is safest to avoid using `instanceof`, and using +// this type-testing method instead. +// +// Returns: true if `x` is an object created from a class which extends `Construct`. +func KubeEventList_IsConstruct(x interface{}) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "k8s.KubeEventList", + "isConstruct", + []interface{}{x}, + &returns, + ) + + return returns +} + +// Renders a Kubernetes manifest for "io.k8s.api.events.v1.EventList". +// +// This can be used to inline resource manifests inside other objects (e.g. as templates). +func KubeEventList_Manifest(props *KubeEventListProps) interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "k8s.KubeEventList", + "manifest", + []interface{}{props}, + &returns, + ) + + return returns +} + +// Returns the `ApiObject` named `Resource` which is a child of the given construct. +// +// If `c` is an `ApiObject`, it is returned directly. Throws an +// exception if the construct does not have a child named `Default` _or_ if +// this child is not an `ApiObject`. +func KubeEventList_Of(c constructs.IConstruct) cdk8s.ApiObject { + _init_.Initialize() + + var returns cdk8s.ApiObject + + _jsii_.StaticInvoke( + "k8s.KubeEventList", + "of", + []interface{}{c}, + &returns, + ) + + return returns +} + +func KubeEventList_GVK() *cdk8s.GroupVersionKind { + _init_.Initialize() + var returns *cdk8s.GroupVersionKind + _jsii_.StaticGet( + "k8s.KubeEventList", + "GVK", + &returns, + ) + return returns +} + +func (k *jsiiProxy_KubeEventList) AddDependency(dependencies ...constructs.IConstruct) { + args := []interface{}{} + for _, a := range dependencies { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addDependency", + args, + ) +} + +func (k *jsiiProxy_KubeEventList) AddJsonPatch(ops ...cdk8s.JsonPatch) { + args := []interface{}{} + for _, a := range ops { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addJsonPatch", + args, + ) +} + +func (k *jsiiProxy_KubeEventList) ToJson() interface{} { + var returns interface{} + + _jsii_.Invoke( + k, + "toJson", + nil, // no parameters + &returns, + ) + + return returns +} + +func (k *jsiiProxy_KubeEventList) ToString() *string { + var returns *string + + _jsii_.Invoke( + k, + "toString", + nil, // no parameters + &returns, + ) + + return returns +} + +// EventList is a list of Event objects. +type KubeEventListProps struct { + // items is a list of schema objects. + Items *[]*KubeEventProps `field:"required" json:"items" yaml:"items"` + // Standard list metadata. + // + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + Metadata *ListMeta `field:"optional" json:"metadata" yaml:"metadata"` +} + +// EventList is a list of Event objects. +type KubeEventListV1Beta1 interface { + cdk8s.ApiObject + // The group portion of the API version (e.g. `authorization.k8s.io`). + ApiGroup() *string + // The object's API version (e.g. `authorization.k8s.io/v1`). + ApiVersion() *string + // The chart in which this object is defined. + Chart() cdk8s.Chart + // The object kind. + Kind() *string + // Metadata associated with this API object. + Metadata() cdk8s.ApiObjectMetadataDefinition + // The name of the API object. + // + // If a name is specified in `metadata.name` this will be the name returned. + // Otherwise, a name will be generated by calling + // `AddHelm.of(this).generatedObjectName(this)`, which by default uses the + // construct path to generate a DNS-compatible name for the resource. + Name() *string + // The tree node. + Node() constructs.Node + // Create a dependency between this ApiObject and other constructs. + // + // These can be other ApiObjects, Charts, or custom. + AddDependency(dependencies ...constructs.IConstruct) + // Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. + // + // Example: + // kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true)); + // + AddJsonPatch(ops ...cdk8s.JsonPatch) + // Renders the object to Kubernetes JSON. + ToJson() interface{} + // Returns a string representation of this construct. + ToString() *string +} + +// The jsii proxy struct for KubeEventListV1Beta1 +type jsiiProxy_KubeEventListV1Beta1 struct { + internal.Type__cdk8sApiObject +} + +func (j *jsiiProxy_KubeEventListV1Beta1) ApiGroup() *string { + var returns *string + _jsii_.Get( + j, + "apiGroup", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeEventListV1Beta1) ApiVersion() *string { + var returns *string + _jsii_.Get( + j, + "apiVersion", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeEventListV1Beta1) Chart() cdk8s.Chart { + var returns cdk8s.Chart + _jsii_.Get( + j, + "chart", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeEventListV1Beta1) Kind() *string { + var returns *string + _jsii_.Get( + j, + "kind", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeEventListV1Beta1) Metadata() cdk8s.ApiObjectMetadataDefinition { + var returns cdk8s.ApiObjectMetadataDefinition + _jsii_.Get( + j, + "metadata", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeEventListV1Beta1) Name() *string { + var returns *string + _jsii_.Get( + j, + "name", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeEventListV1Beta1) Node() constructs.Node { + var returns constructs.Node + _jsii_.Get( + j, + "node", + &returns, + ) + return returns +} + +// Defines a "io.k8s.api.events.v1beta1.EventList" API object. +func NewKubeEventListV1Beta1(scope constructs.Construct, id *string, props *KubeEventListV1Beta1Props) KubeEventListV1Beta1 { + _init_.Initialize() + + j := jsiiProxy_KubeEventListV1Beta1{} + + _jsii_.Create( + "k8s.KubeEventListV1Beta1", + []interface{}{scope, id, props}, + &j, + ) + + return &j +} + +// Defines a "io.k8s.api.events.v1beta1.EventList" API object. +func NewKubeEventListV1Beta1_Override(k KubeEventListV1Beta1, scope constructs.Construct, id *string, props *KubeEventListV1Beta1Props) { + _init_.Initialize() + + _jsii_.Create( + "k8s.KubeEventListV1Beta1", + []interface{}{scope, id, props}, + k, + ) +} + +// Checks if `x` is a construct. +// +// Use this method instead of `instanceof` to properly detect `Construct` +// instances, even when the construct library is symlinked. +// +// Explanation: in JavaScript, multiple copies of the `constructs` library on +// disk are seen as independent, completely different libraries. As a +// consequence, the class `Construct` in each copy of the `constructs` library +// is seen as a different class, and an instance of one class will not test as +// `instanceof` the other class. `npm install` will not create installations +// like this, but users may manually symlink construct libraries together or +// use a monorepo tool: in those cases, multiple copies of the `constructs` +// library can be accidentally installed, and `instanceof` will behave +// unpredictably. It is safest to avoid using `instanceof`, and using +// this type-testing method instead. +// +// Returns: true if `x` is an object created from a class which extends `Construct`. +func KubeEventListV1Beta1_IsConstruct(x interface{}) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "k8s.KubeEventListV1Beta1", + "isConstruct", + []interface{}{x}, + &returns, + ) + + return returns +} + +// Renders a Kubernetes manifest for "io.k8s.api.events.v1beta1.EventList". +// +// This can be used to inline resource manifests inside other objects (e.g. as templates). +func KubeEventListV1Beta1_Manifest(props *KubeEventListV1Beta1Props) interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "k8s.KubeEventListV1Beta1", + "manifest", + []interface{}{props}, + &returns, + ) + + return returns +} + +// Returns the `ApiObject` named `Resource` which is a child of the given construct. +// +// If `c` is an `ApiObject`, it is returned directly. Throws an +// exception if the construct does not have a child named `Default` _or_ if +// this child is not an `ApiObject`. +func KubeEventListV1Beta1_Of(c constructs.IConstruct) cdk8s.ApiObject { + _init_.Initialize() + + var returns cdk8s.ApiObject + + _jsii_.StaticInvoke( + "k8s.KubeEventListV1Beta1", + "of", + []interface{}{c}, + &returns, + ) + + return returns +} + +func KubeEventListV1Beta1_GVK() *cdk8s.GroupVersionKind { + _init_.Initialize() + var returns *cdk8s.GroupVersionKind + _jsii_.StaticGet( + "k8s.KubeEventListV1Beta1", + "GVK", + &returns, + ) + return returns +} + +func (k *jsiiProxy_KubeEventListV1Beta1) AddDependency(dependencies ...constructs.IConstruct) { + args := []interface{}{} + for _, a := range dependencies { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addDependency", + args, + ) +} + +func (k *jsiiProxy_KubeEventListV1Beta1) AddJsonPatch(ops ...cdk8s.JsonPatch) { + args := []interface{}{} + for _, a := range ops { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addJsonPatch", + args, + ) +} + +func (k *jsiiProxy_KubeEventListV1Beta1) ToJson() interface{} { + var returns interface{} + + _jsii_.Invoke( + k, + "toJson", + nil, // no parameters + &returns, + ) + + return returns +} + +func (k *jsiiProxy_KubeEventListV1Beta1) ToString() *string { + var returns *string + + _jsii_.Invoke( + k, + "toString", + nil, // no parameters + &returns, + ) + + return returns +} + +// EventList is a list of Event objects. +type KubeEventListV1Beta1Props struct { + // items is a list of schema objects. + Items *[]*KubeEventV1Beta1Props `field:"required" json:"items" yaml:"items"` + // Standard list metadata. + // + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + Metadata *ListMeta `field:"optional" json:"metadata" yaml:"metadata"` +} + +// Event is a report of an event somewhere in the cluster. +// +// It generally denotes some state change in the system. Events have a limited retention time and triggers and messages may evolve with time. Event consumers should not rely on the timing of an event with a given Reason reflecting a consistent underlying trigger, or the continued existence of events with that Reason. Events should be treated as informative, best-effort, supplemental data. +type KubeEventProps struct { + // eventTime is the time when this Event was first observed. + // + // It is required. + EventTime *time.Time `field:"required" json:"eventTime" yaml:"eventTime"` + // action is what action was taken/failed regarding to the regarding object. + // + // It is machine-readable. This field cannot be empty for new Events and it can have at most 128 characters. + Action *string `field:"optional" json:"action" yaml:"action"` + // deprecatedCount is the deprecated field assuring backward compatibility with core.v1 Event type. + DeprecatedCount *float64 `field:"optional" json:"deprecatedCount" yaml:"deprecatedCount"` + // deprecatedFirstTimestamp is the deprecated field assuring backward compatibility with core.v1 Event type. + DeprecatedFirstTimestamp *time.Time `field:"optional" json:"deprecatedFirstTimestamp" yaml:"deprecatedFirstTimestamp"` + // deprecatedLastTimestamp is the deprecated field assuring backward compatibility with core.v1 Event type. + DeprecatedLastTimestamp *time.Time `field:"optional" json:"deprecatedLastTimestamp" yaml:"deprecatedLastTimestamp"` + // deprecatedSource is the deprecated field assuring backward compatibility with core.v1 Event type. + DeprecatedSource *EventSource `field:"optional" json:"deprecatedSource" yaml:"deprecatedSource"` + // Standard object's metadata. + // + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + Metadata *ObjectMeta `field:"optional" json:"metadata" yaml:"metadata"` + // note is a human-readable description of the status of this operation. + // + // Maximal length of the note is 1kB, but libraries should be prepared to handle values up to 64kB. + Note *string `field:"optional" json:"note" yaml:"note"` + // reason is why the action was taken. + // + // It is human-readable. This field cannot be empty for new Events and it can have at most 128 characters. + Reason *string `field:"optional" json:"reason" yaml:"reason"` + // regarding contains the object this Event is about. + // + // In most cases it's an Object reporting controller implements, e.g. ReplicaSetController implements ReplicaSets and this event is emitted because it acts on some changes in a ReplicaSet object. + Regarding *ObjectReference `field:"optional" json:"regarding" yaml:"regarding"` + // related is the optional secondary object for more complex actions. + // + // E.g. when regarding object triggers a creation or deletion of related object. + Related *ObjectReference `field:"optional" json:"related" yaml:"related"` + // reportingController is the name of the controller that emitted this Event, e.g. `kubernetes.io/kubelet`. This field cannot be empty for new Events. + ReportingController *string `field:"optional" json:"reportingController" yaml:"reportingController"` + // reportingInstance is the ID of the controller instance, e.g. `kubelet-xyzf`. This field cannot be empty for new Events and it can have at most 128 characters. + ReportingInstance *string `field:"optional" json:"reportingInstance" yaml:"reportingInstance"` + // series is data about the Event series this event represents or nil if it's a singleton Event. + Series *EventSeries `field:"optional" json:"series" yaml:"series"` + // type is the type of this event (Normal, Warning), new types could be added in the future. + // + // It is machine-readable. This field cannot be empty for new Events. + Type *string `field:"optional" json:"type" yaml:"type"` +} + +// Event is a report of an event somewhere in the cluster. +// +// It generally denotes some state change in the system. Events have a limited retention time and triggers and messages may evolve with time. Event consumers should not rely on the timing of an event with a given Reason reflecting a consistent underlying trigger, or the continued existence of events with that Reason. Events should be treated as informative, best-effort, supplemental data. +type KubeEventV1Beta1 interface { + cdk8s.ApiObject + // The group portion of the API version (e.g. `authorization.k8s.io`). + ApiGroup() *string + // The object's API version (e.g. `authorization.k8s.io/v1`). + ApiVersion() *string + // The chart in which this object is defined. + Chart() cdk8s.Chart + // The object kind. + Kind() *string + // Metadata associated with this API object. + Metadata() cdk8s.ApiObjectMetadataDefinition + // The name of the API object. + // + // If a name is specified in `metadata.name` this will be the name returned. + // Otherwise, a name will be generated by calling + // `AddHelm.of(this).generatedObjectName(this)`, which by default uses the + // construct path to generate a DNS-compatible name for the resource. + Name() *string + // The tree node. + Node() constructs.Node + // Create a dependency between this ApiObject and other constructs. + // + // These can be other ApiObjects, Charts, or custom. + AddDependency(dependencies ...constructs.IConstruct) + // Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. + // + // Example: + // kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true)); + // + AddJsonPatch(ops ...cdk8s.JsonPatch) + // Renders the object to Kubernetes JSON. + ToJson() interface{} + // Returns a string representation of this construct. + ToString() *string +} + +// The jsii proxy struct for KubeEventV1Beta1 +type jsiiProxy_KubeEventV1Beta1 struct { + internal.Type__cdk8sApiObject +} + +func (j *jsiiProxy_KubeEventV1Beta1) ApiGroup() *string { + var returns *string + _jsii_.Get( + j, + "apiGroup", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeEventV1Beta1) ApiVersion() *string { + var returns *string + _jsii_.Get( + j, + "apiVersion", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeEventV1Beta1) Chart() cdk8s.Chart { + var returns cdk8s.Chart + _jsii_.Get( + j, + "chart", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeEventV1Beta1) Kind() *string { + var returns *string + _jsii_.Get( + j, + "kind", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeEventV1Beta1) Metadata() cdk8s.ApiObjectMetadataDefinition { + var returns cdk8s.ApiObjectMetadataDefinition + _jsii_.Get( + j, + "metadata", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeEventV1Beta1) Name() *string { + var returns *string + _jsii_.Get( + j, + "name", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeEventV1Beta1) Node() constructs.Node { + var returns constructs.Node + _jsii_.Get( + j, + "node", + &returns, + ) + return returns +} + +// Defines a "io.k8s.api.events.v1beta1.Event" API object. +func NewKubeEventV1Beta1(scope constructs.Construct, id *string, props *KubeEventV1Beta1Props) KubeEventV1Beta1 { + _init_.Initialize() + + j := jsiiProxy_KubeEventV1Beta1{} + + _jsii_.Create( + "k8s.KubeEventV1Beta1", + []interface{}{scope, id, props}, + &j, + ) + + return &j +} + +// Defines a "io.k8s.api.events.v1beta1.Event" API object. +func NewKubeEventV1Beta1_Override(k KubeEventV1Beta1, scope constructs.Construct, id *string, props *KubeEventV1Beta1Props) { + _init_.Initialize() + + _jsii_.Create( + "k8s.KubeEventV1Beta1", + []interface{}{scope, id, props}, + k, + ) +} + +// Checks if `x` is a construct. +// +// Use this method instead of `instanceof` to properly detect `Construct` +// instances, even when the construct library is symlinked. +// +// Explanation: in JavaScript, multiple copies of the `constructs` library on +// disk are seen as independent, completely different libraries. As a +// consequence, the class `Construct` in each copy of the `constructs` library +// is seen as a different class, and an instance of one class will not test as +// `instanceof` the other class. `npm install` will not create installations +// like this, but users may manually symlink construct libraries together or +// use a monorepo tool: in those cases, multiple copies of the `constructs` +// library can be accidentally installed, and `instanceof` will behave +// unpredictably. It is safest to avoid using `instanceof`, and using +// this type-testing method instead. +// +// Returns: true if `x` is an object created from a class which extends `Construct`. +func KubeEventV1Beta1_IsConstruct(x interface{}) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "k8s.KubeEventV1Beta1", + "isConstruct", + []interface{}{x}, + &returns, + ) + + return returns +} + +// Renders a Kubernetes manifest for "io.k8s.api.events.v1beta1.Event". +// +// This can be used to inline resource manifests inside other objects (e.g. as templates). +func KubeEventV1Beta1_Manifest(props *KubeEventV1Beta1Props) interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "k8s.KubeEventV1Beta1", + "manifest", + []interface{}{props}, + &returns, + ) + + return returns +} + +// Returns the `ApiObject` named `Resource` which is a child of the given construct. +// +// If `c` is an `ApiObject`, it is returned directly. Throws an +// exception if the construct does not have a child named `Default` _or_ if +// this child is not an `ApiObject`. +func KubeEventV1Beta1_Of(c constructs.IConstruct) cdk8s.ApiObject { + _init_.Initialize() + + var returns cdk8s.ApiObject + + _jsii_.StaticInvoke( + "k8s.KubeEventV1Beta1", + "of", + []interface{}{c}, + &returns, + ) + + return returns +} + +func KubeEventV1Beta1_GVK() *cdk8s.GroupVersionKind { + _init_.Initialize() + var returns *cdk8s.GroupVersionKind + _jsii_.StaticGet( + "k8s.KubeEventV1Beta1", + "GVK", + &returns, + ) + return returns +} + +func (k *jsiiProxy_KubeEventV1Beta1) AddDependency(dependencies ...constructs.IConstruct) { + args := []interface{}{} + for _, a := range dependencies { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addDependency", + args, + ) +} + +func (k *jsiiProxy_KubeEventV1Beta1) AddJsonPatch(ops ...cdk8s.JsonPatch) { + args := []interface{}{} + for _, a := range ops { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addJsonPatch", + args, + ) +} + +func (k *jsiiProxy_KubeEventV1Beta1) ToJson() interface{} { + var returns interface{} + + _jsii_.Invoke( + k, + "toJson", + nil, // no parameters + &returns, + ) + + return returns +} + +func (k *jsiiProxy_KubeEventV1Beta1) ToString() *string { + var returns *string + + _jsii_.Invoke( + k, + "toString", + nil, // no parameters + &returns, + ) + + return returns +} + +// Event is a report of an event somewhere in the cluster. +// +// It generally denotes some state change in the system. Events have a limited retention time and triggers and messages may evolve with time. Event consumers should not rely on the timing of an event with a given Reason reflecting a consistent underlying trigger, or the continued existence of events with that Reason. Events should be treated as informative, best-effort, supplemental data. +type KubeEventV1Beta1Props struct { + // eventTime is the time when this Event was first observed. + // + // It is required. + EventTime *time.Time `field:"required" json:"eventTime" yaml:"eventTime"` + // action is what action was taken/failed regarding to the regarding object. + // + // It is machine-readable. This field can have at most 128 characters. + Action *string `field:"optional" json:"action" yaml:"action"` + // deprecatedCount is the deprecated field assuring backward compatibility with core.v1 Event type. + DeprecatedCount *float64 `field:"optional" json:"deprecatedCount" yaml:"deprecatedCount"` + // deprecatedFirstTimestamp is the deprecated field assuring backward compatibility with core.v1 Event type. + DeprecatedFirstTimestamp *time.Time `field:"optional" json:"deprecatedFirstTimestamp" yaml:"deprecatedFirstTimestamp"` + // deprecatedLastTimestamp is the deprecated field assuring backward compatibility with core.v1 Event type. + DeprecatedLastTimestamp *time.Time `field:"optional" json:"deprecatedLastTimestamp" yaml:"deprecatedLastTimestamp"` + // deprecatedSource is the deprecated field assuring backward compatibility with core.v1 Event type. + DeprecatedSource *EventSource `field:"optional" json:"deprecatedSource" yaml:"deprecatedSource"` + // Standard object's metadata. + // + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + Metadata *ObjectMeta `field:"optional" json:"metadata" yaml:"metadata"` + // note is a human-readable description of the status of this operation. + // + // Maximal length of the note is 1kB, but libraries should be prepared to handle values up to 64kB. + Note *string `field:"optional" json:"note" yaml:"note"` + // reason is why the action was taken. + // + // It is human-readable. This field can have at most 128 characters. + Reason *string `field:"optional" json:"reason" yaml:"reason"` + // regarding contains the object this Event is about. + // + // In most cases it's an Object reporting controller implements, e.g. ReplicaSetController implements ReplicaSets and this event is emitted because it acts on some changes in a ReplicaSet object. + Regarding *ObjectReference `field:"optional" json:"regarding" yaml:"regarding"` + // related is the optional secondary object for more complex actions. + // + // E.g. when regarding object triggers a creation or deletion of related object. + Related *ObjectReference `field:"optional" json:"related" yaml:"related"` + // reportingController is the name of the controller that emitted this Event, e.g. `kubernetes.io/kubelet`. This field cannot be empty for new Events. + ReportingController *string `field:"optional" json:"reportingController" yaml:"reportingController"` + // reportingInstance is the ID of the controller instance, e.g. `kubelet-xyzf`. This field cannot be empty for new Events and it can have at most 128 characters. + ReportingInstance *string `field:"optional" json:"reportingInstance" yaml:"reportingInstance"` + // series is data about the Event series this event represents or nil if it's a singleton Event. + Series *EventSeriesV1Beta1 `field:"optional" json:"series" yaml:"series"` + // type is the type of this event (Normal, Warning), new types could be added in the future. + // + // It is machine-readable. + Type *string `field:"optional" json:"type" yaml:"type"` +} + +// Eviction evicts a pod from its node subject to certain policies and safety constraints. +// +// This is a subresource of Pod. A request to cause such an eviction is created by POSTing to .../pods//evictions. +type KubeEviction interface { + cdk8s.ApiObject + // The group portion of the API version (e.g. `authorization.k8s.io`). + ApiGroup() *string + // The object's API version (e.g. `authorization.k8s.io/v1`). + ApiVersion() *string + // The chart in which this object is defined. + Chart() cdk8s.Chart + // The object kind. + Kind() *string + // Metadata associated with this API object. + Metadata() cdk8s.ApiObjectMetadataDefinition + // The name of the API object. + // + // If a name is specified in `metadata.name` this will be the name returned. + // Otherwise, a name will be generated by calling + // `AddHelm.of(this).generatedObjectName(this)`, which by default uses the + // construct path to generate a DNS-compatible name for the resource. + Name() *string + // The tree node. + Node() constructs.Node + // Create a dependency between this ApiObject and other constructs. + // + // These can be other ApiObjects, Charts, or custom. + AddDependency(dependencies ...constructs.IConstruct) + // Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. + // + // Example: + // kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true)); + // + AddJsonPatch(ops ...cdk8s.JsonPatch) + // Renders the object to Kubernetes JSON. + ToJson() interface{} + // Returns a string representation of this construct. + ToString() *string +} + +// The jsii proxy struct for KubeEviction +type jsiiProxy_KubeEviction struct { + internal.Type__cdk8sApiObject +} + +func (j *jsiiProxy_KubeEviction) ApiGroup() *string { + var returns *string + _jsii_.Get( + j, + "apiGroup", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeEviction) ApiVersion() *string { + var returns *string + _jsii_.Get( + j, + "apiVersion", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeEviction) Chart() cdk8s.Chart { + var returns cdk8s.Chart + _jsii_.Get( + j, + "chart", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeEviction) Kind() *string { + var returns *string + _jsii_.Get( + j, + "kind", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeEviction) Metadata() cdk8s.ApiObjectMetadataDefinition { + var returns cdk8s.ApiObjectMetadataDefinition + _jsii_.Get( + j, + "metadata", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeEviction) Name() *string { + var returns *string + _jsii_.Get( + j, + "name", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeEviction) Node() constructs.Node { + var returns constructs.Node + _jsii_.Get( + j, + "node", + &returns, + ) + return returns +} + +// Defines a "io.k8s.api.policy.v1.Eviction" API object. +func NewKubeEviction(scope constructs.Construct, id *string, props *KubeEvictionProps) KubeEviction { + _init_.Initialize() + + j := jsiiProxy_KubeEviction{} + + _jsii_.Create( + "k8s.KubeEviction", + []interface{}{scope, id, props}, + &j, + ) + + return &j +} + +// Defines a "io.k8s.api.policy.v1.Eviction" API object. +func NewKubeEviction_Override(k KubeEviction, scope constructs.Construct, id *string, props *KubeEvictionProps) { + _init_.Initialize() + + _jsii_.Create( + "k8s.KubeEviction", + []interface{}{scope, id, props}, + k, + ) +} + +// Checks if `x` is a construct. +// +// Use this method instead of `instanceof` to properly detect `Construct` +// instances, even when the construct library is symlinked. +// +// Explanation: in JavaScript, multiple copies of the `constructs` library on +// disk are seen as independent, completely different libraries. As a +// consequence, the class `Construct` in each copy of the `constructs` library +// is seen as a different class, and an instance of one class will not test as +// `instanceof` the other class. `npm install` will not create installations +// like this, but users may manually symlink construct libraries together or +// use a monorepo tool: in those cases, multiple copies of the `constructs` +// library can be accidentally installed, and `instanceof` will behave +// unpredictably. It is safest to avoid using `instanceof`, and using +// this type-testing method instead. +// +// Returns: true if `x` is an object created from a class which extends `Construct`. +func KubeEviction_IsConstruct(x interface{}) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "k8s.KubeEviction", + "isConstruct", + []interface{}{x}, + &returns, + ) + + return returns +} + +// Renders a Kubernetes manifest for "io.k8s.api.policy.v1.Eviction". +// +// This can be used to inline resource manifests inside other objects (e.g. as templates). +func KubeEviction_Manifest(props *KubeEvictionProps) interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "k8s.KubeEviction", + "manifest", + []interface{}{props}, + &returns, + ) + + return returns +} + +// Returns the `ApiObject` named `Resource` which is a child of the given construct. +// +// If `c` is an `ApiObject`, it is returned directly. Throws an +// exception if the construct does not have a child named `Default` _or_ if +// this child is not an `ApiObject`. +func KubeEviction_Of(c constructs.IConstruct) cdk8s.ApiObject { + _init_.Initialize() + + var returns cdk8s.ApiObject + + _jsii_.StaticInvoke( + "k8s.KubeEviction", + "of", + []interface{}{c}, + &returns, + ) + + return returns +} + +func KubeEviction_GVK() *cdk8s.GroupVersionKind { + _init_.Initialize() + var returns *cdk8s.GroupVersionKind + _jsii_.StaticGet( + "k8s.KubeEviction", + "GVK", + &returns, + ) + return returns +} + +func (k *jsiiProxy_KubeEviction) AddDependency(dependencies ...constructs.IConstruct) { + args := []interface{}{} + for _, a := range dependencies { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addDependency", + args, + ) +} + +func (k *jsiiProxy_KubeEviction) AddJsonPatch(ops ...cdk8s.JsonPatch) { + args := []interface{}{} + for _, a := range ops { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addJsonPatch", + args, + ) +} + +func (k *jsiiProxy_KubeEviction) ToJson() interface{} { + var returns interface{} + + _jsii_.Invoke( + k, + "toJson", + nil, // no parameters + &returns, + ) + + return returns +} + +func (k *jsiiProxy_KubeEviction) ToString() *string { + var returns *string + + _jsii_.Invoke( + k, + "toString", + nil, // no parameters + &returns, + ) + + return returns +} + +// Eviction evicts a pod from its node subject to certain policies and safety constraints. +// +// This is a subresource of Pod. A request to cause such an eviction is created by POSTing to .../pods//evictions. +type KubeEvictionProps struct { + // DeleteOptions may be provided. + DeleteOptions *DeleteOptions `field:"optional" json:"deleteOptions" yaml:"deleteOptions"` + // ObjectMeta describes the pod that is being evicted. + Metadata *ObjectMeta `field:"optional" json:"metadata" yaml:"metadata"` +} + +// FlowSchemaList is a list of FlowSchema objects. +type KubeFlowSchemaListV1Beta1 interface { + cdk8s.ApiObject + // The group portion of the API version (e.g. `authorization.k8s.io`). + ApiGroup() *string + // The object's API version (e.g. `authorization.k8s.io/v1`). + ApiVersion() *string + // The chart in which this object is defined. + Chart() cdk8s.Chart + // The object kind. + Kind() *string + // Metadata associated with this API object. + Metadata() cdk8s.ApiObjectMetadataDefinition + // The name of the API object. + // + // If a name is specified in `metadata.name` this will be the name returned. + // Otherwise, a name will be generated by calling + // `AddHelm.of(this).generatedObjectName(this)`, which by default uses the + // construct path to generate a DNS-compatible name for the resource. + Name() *string + // The tree node. + Node() constructs.Node + // Create a dependency between this ApiObject and other constructs. + // + // These can be other ApiObjects, Charts, or custom. + AddDependency(dependencies ...constructs.IConstruct) + // Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. + // + // Example: + // kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true)); + // + AddJsonPatch(ops ...cdk8s.JsonPatch) + // Renders the object to Kubernetes JSON. + ToJson() interface{} + // Returns a string representation of this construct. + ToString() *string +} + +// The jsii proxy struct for KubeFlowSchemaListV1Beta1 +type jsiiProxy_KubeFlowSchemaListV1Beta1 struct { + internal.Type__cdk8sApiObject +} + +func (j *jsiiProxy_KubeFlowSchemaListV1Beta1) ApiGroup() *string { + var returns *string + _jsii_.Get( + j, + "apiGroup", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeFlowSchemaListV1Beta1) ApiVersion() *string { + var returns *string + _jsii_.Get( + j, + "apiVersion", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeFlowSchemaListV1Beta1) Chart() cdk8s.Chart { + var returns cdk8s.Chart + _jsii_.Get( + j, + "chart", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeFlowSchemaListV1Beta1) Kind() *string { + var returns *string + _jsii_.Get( + j, + "kind", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeFlowSchemaListV1Beta1) Metadata() cdk8s.ApiObjectMetadataDefinition { + var returns cdk8s.ApiObjectMetadataDefinition + _jsii_.Get( + j, + "metadata", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeFlowSchemaListV1Beta1) Name() *string { + var returns *string + _jsii_.Get( + j, + "name", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeFlowSchemaListV1Beta1) Node() constructs.Node { + var returns constructs.Node + _jsii_.Get( + j, + "node", + &returns, + ) + return returns +} + +// Defines a "io.k8s.api.flowcontrol.v1beta1.FlowSchemaList" API object. +func NewKubeFlowSchemaListV1Beta1(scope constructs.Construct, id *string, props *KubeFlowSchemaListV1Beta1Props) KubeFlowSchemaListV1Beta1 { + _init_.Initialize() + + j := jsiiProxy_KubeFlowSchemaListV1Beta1{} + + _jsii_.Create( + "k8s.KubeFlowSchemaListV1Beta1", + []interface{}{scope, id, props}, + &j, + ) + + return &j +} + +// Defines a "io.k8s.api.flowcontrol.v1beta1.FlowSchemaList" API object. +func NewKubeFlowSchemaListV1Beta1_Override(k KubeFlowSchemaListV1Beta1, scope constructs.Construct, id *string, props *KubeFlowSchemaListV1Beta1Props) { + _init_.Initialize() + + _jsii_.Create( + "k8s.KubeFlowSchemaListV1Beta1", + []interface{}{scope, id, props}, + k, + ) +} + +// Checks if `x` is a construct. +// +// Use this method instead of `instanceof` to properly detect `Construct` +// instances, even when the construct library is symlinked. +// +// Explanation: in JavaScript, multiple copies of the `constructs` library on +// disk are seen as independent, completely different libraries. As a +// consequence, the class `Construct` in each copy of the `constructs` library +// is seen as a different class, and an instance of one class will not test as +// `instanceof` the other class. `npm install` will not create installations +// like this, but users may manually symlink construct libraries together or +// use a monorepo tool: in those cases, multiple copies of the `constructs` +// library can be accidentally installed, and `instanceof` will behave +// unpredictably. It is safest to avoid using `instanceof`, and using +// this type-testing method instead. +// +// Returns: true if `x` is an object created from a class which extends `Construct`. +func KubeFlowSchemaListV1Beta1_IsConstruct(x interface{}) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "k8s.KubeFlowSchemaListV1Beta1", + "isConstruct", + []interface{}{x}, + &returns, + ) + + return returns +} + +// Renders a Kubernetes manifest for "io.k8s.api.flowcontrol.v1beta1.FlowSchemaList". +// +// This can be used to inline resource manifests inside other objects (e.g. as templates). +func KubeFlowSchemaListV1Beta1_Manifest(props *KubeFlowSchemaListV1Beta1Props) interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "k8s.KubeFlowSchemaListV1Beta1", + "manifest", + []interface{}{props}, + &returns, + ) + + return returns +} + +// Returns the `ApiObject` named `Resource` which is a child of the given construct. +// +// If `c` is an `ApiObject`, it is returned directly. Throws an +// exception if the construct does not have a child named `Default` _or_ if +// this child is not an `ApiObject`. +func KubeFlowSchemaListV1Beta1_Of(c constructs.IConstruct) cdk8s.ApiObject { + _init_.Initialize() + + var returns cdk8s.ApiObject + + _jsii_.StaticInvoke( + "k8s.KubeFlowSchemaListV1Beta1", + "of", + []interface{}{c}, + &returns, + ) + + return returns +} + +func KubeFlowSchemaListV1Beta1_GVK() *cdk8s.GroupVersionKind { + _init_.Initialize() + var returns *cdk8s.GroupVersionKind + _jsii_.StaticGet( + "k8s.KubeFlowSchemaListV1Beta1", + "GVK", + &returns, + ) + return returns +} + +func (k *jsiiProxy_KubeFlowSchemaListV1Beta1) AddDependency(dependencies ...constructs.IConstruct) { + args := []interface{}{} + for _, a := range dependencies { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addDependency", + args, + ) +} + +func (k *jsiiProxy_KubeFlowSchemaListV1Beta1) AddJsonPatch(ops ...cdk8s.JsonPatch) { + args := []interface{}{} + for _, a := range ops { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addJsonPatch", + args, + ) +} + +func (k *jsiiProxy_KubeFlowSchemaListV1Beta1) ToJson() interface{} { + var returns interface{} + + _jsii_.Invoke( + k, + "toJson", + nil, // no parameters + &returns, + ) + + return returns +} + +func (k *jsiiProxy_KubeFlowSchemaListV1Beta1) ToString() *string { + var returns *string + + _jsii_.Invoke( + k, + "toString", + nil, // no parameters + &returns, + ) + + return returns +} + +// FlowSchemaList is a list of FlowSchema objects. +type KubeFlowSchemaListV1Beta1Props struct { + // `items` is a list of FlowSchemas. + Items *[]*KubeFlowSchemaV1Beta1Props `field:"required" json:"items" yaml:"items"` + // `metadata` is the standard list metadata. + // + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + Metadata *ListMeta `field:"optional" json:"metadata" yaml:"metadata"` +} + +// FlowSchema defines the schema of a group of flows. +// +// Note that a flow is made up of a set of inbound API requests with similar attributes and is identified by a pair of strings: the name of the FlowSchema and a "flow distinguisher". +type KubeFlowSchemaV1Beta1 interface { + cdk8s.ApiObject + // The group portion of the API version (e.g. `authorization.k8s.io`). + ApiGroup() *string + // The object's API version (e.g. `authorization.k8s.io/v1`). + ApiVersion() *string + // The chart in which this object is defined. + Chart() cdk8s.Chart + // The object kind. + Kind() *string + // Metadata associated with this API object. + Metadata() cdk8s.ApiObjectMetadataDefinition + // The name of the API object. + // + // If a name is specified in `metadata.name` this will be the name returned. + // Otherwise, a name will be generated by calling + // `AddHelm.of(this).generatedObjectName(this)`, which by default uses the + // construct path to generate a DNS-compatible name for the resource. + Name() *string + // The tree node. + Node() constructs.Node + // Create a dependency between this ApiObject and other constructs. + // + // These can be other ApiObjects, Charts, or custom. + AddDependency(dependencies ...constructs.IConstruct) + // Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. + // + // Example: + // kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true)); + // + AddJsonPatch(ops ...cdk8s.JsonPatch) + // Renders the object to Kubernetes JSON. + ToJson() interface{} + // Returns a string representation of this construct. + ToString() *string +} + +// The jsii proxy struct for KubeFlowSchemaV1Beta1 +type jsiiProxy_KubeFlowSchemaV1Beta1 struct { + internal.Type__cdk8sApiObject +} + +func (j *jsiiProxy_KubeFlowSchemaV1Beta1) ApiGroup() *string { + var returns *string + _jsii_.Get( + j, + "apiGroup", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeFlowSchemaV1Beta1) ApiVersion() *string { + var returns *string + _jsii_.Get( + j, + "apiVersion", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeFlowSchemaV1Beta1) Chart() cdk8s.Chart { + var returns cdk8s.Chart + _jsii_.Get( + j, + "chart", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeFlowSchemaV1Beta1) Kind() *string { + var returns *string + _jsii_.Get( + j, + "kind", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeFlowSchemaV1Beta1) Metadata() cdk8s.ApiObjectMetadataDefinition { + var returns cdk8s.ApiObjectMetadataDefinition + _jsii_.Get( + j, + "metadata", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeFlowSchemaV1Beta1) Name() *string { + var returns *string + _jsii_.Get( + j, + "name", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeFlowSchemaV1Beta1) Node() constructs.Node { + var returns constructs.Node + _jsii_.Get( + j, + "node", + &returns, + ) + return returns +} + +// Defines a "io.k8s.api.flowcontrol.v1beta1.FlowSchema" API object. +func NewKubeFlowSchemaV1Beta1(scope constructs.Construct, id *string, props *KubeFlowSchemaV1Beta1Props) KubeFlowSchemaV1Beta1 { + _init_.Initialize() + + j := jsiiProxy_KubeFlowSchemaV1Beta1{} + + _jsii_.Create( + "k8s.KubeFlowSchemaV1Beta1", + []interface{}{scope, id, props}, + &j, + ) + + return &j +} + +// Defines a "io.k8s.api.flowcontrol.v1beta1.FlowSchema" API object. +func NewKubeFlowSchemaV1Beta1_Override(k KubeFlowSchemaV1Beta1, scope constructs.Construct, id *string, props *KubeFlowSchemaV1Beta1Props) { + _init_.Initialize() + + _jsii_.Create( + "k8s.KubeFlowSchemaV1Beta1", + []interface{}{scope, id, props}, + k, + ) +} + +// Checks if `x` is a construct. +// +// Use this method instead of `instanceof` to properly detect `Construct` +// instances, even when the construct library is symlinked. +// +// Explanation: in JavaScript, multiple copies of the `constructs` library on +// disk are seen as independent, completely different libraries. As a +// consequence, the class `Construct` in each copy of the `constructs` library +// is seen as a different class, and an instance of one class will not test as +// `instanceof` the other class. `npm install` will not create installations +// like this, but users may manually symlink construct libraries together or +// use a monorepo tool: in those cases, multiple copies of the `constructs` +// library can be accidentally installed, and `instanceof` will behave +// unpredictably. It is safest to avoid using `instanceof`, and using +// this type-testing method instead. +// +// Returns: true if `x` is an object created from a class which extends `Construct`. +func KubeFlowSchemaV1Beta1_IsConstruct(x interface{}) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "k8s.KubeFlowSchemaV1Beta1", + "isConstruct", + []interface{}{x}, + &returns, + ) + + return returns +} + +// Renders a Kubernetes manifest for "io.k8s.api.flowcontrol.v1beta1.FlowSchema". +// +// This can be used to inline resource manifests inside other objects (e.g. as templates). +func KubeFlowSchemaV1Beta1_Manifest(props *KubeFlowSchemaV1Beta1Props) interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "k8s.KubeFlowSchemaV1Beta1", + "manifest", + []interface{}{props}, + &returns, + ) + + return returns +} + +// Returns the `ApiObject` named `Resource` which is a child of the given construct. +// +// If `c` is an `ApiObject`, it is returned directly. Throws an +// exception if the construct does not have a child named `Default` _or_ if +// this child is not an `ApiObject`. +func KubeFlowSchemaV1Beta1_Of(c constructs.IConstruct) cdk8s.ApiObject { + _init_.Initialize() + + var returns cdk8s.ApiObject + + _jsii_.StaticInvoke( + "k8s.KubeFlowSchemaV1Beta1", + "of", + []interface{}{c}, + &returns, + ) + + return returns +} + +func KubeFlowSchemaV1Beta1_GVK() *cdk8s.GroupVersionKind { + _init_.Initialize() + var returns *cdk8s.GroupVersionKind + _jsii_.StaticGet( + "k8s.KubeFlowSchemaV1Beta1", + "GVK", + &returns, + ) + return returns +} + +func (k *jsiiProxy_KubeFlowSchemaV1Beta1) AddDependency(dependencies ...constructs.IConstruct) { + args := []interface{}{} + for _, a := range dependencies { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addDependency", + args, + ) +} + +func (k *jsiiProxy_KubeFlowSchemaV1Beta1) AddJsonPatch(ops ...cdk8s.JsonPatch) { + args := []interface{}{} + for _, a := range ops { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addJsonPatch", + args, + ) +} + +func (k *jsiiProxy_KubeFlowSchemaV1Beta1) ToJson() interface{} { + var returns interface{} + + _jsii_.Invoke( + k, + "toJson", + nil, // no parameters + &returns, + ) + + return returns +} + +func (k *jsiiProxy_KubeFlowSchemaV1Beta1) ToString() *string { + var returns *string + + _jsii_.Invoke( + k, + "toString", + nil, // no parameters + &returns, + ) + + return returns +} + +// FlowSchema defines the schema of a group of flows. +// +// Note that a flow is made up of a set of inbound API requests with similar attributes and is identified by a pair of strings: the name of the FlowSchema and a "flow distinguisher". +type KubeFlowSchemaV1Beta1Props struct { + // `metadata` is the standard object's metadata. + // + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + Metadata *ObjectMeta `field:"optional" json:"metadata" yaml:"metadata"` + // `spec` is the specification of the desired behavior of a FlowSchema. + // + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + Spec *FlowSchemaSpecV1Beta1 `field:"optional" json:"spec" yaml:"spec"` +} + +// configuration of a horizontal pod autoscaler. +type KubeHorizontalPodAutoscaler interface { + cdk8s.ApiObject + // The group portion of the API version (e.g. `authorization.k8s.io`). + ApiGroup() *string + // The object's API version (e.g. `authorization.k8s.io/v1`). + ApiVersion() *string + // The chart in which this object is defined. + Chart() cdk8s.Chart + // The object kind. + Kind() *string + // Metadata associated with this API object. + Metadata() cdk8s.ApiObjectMetadataDefinition + // The name of the API object. + // + // If a name is specified in `metadata.name` this will be the name returned. + // Otherwise, a name will be generated by calling + // `AddHelm.of(this).generatedObjectName(this)`, which by default uses the + // construct path to generate a DNS-compatible name for the resource. + Name() *string + // The tree node. + Node() constructs.Node + // Create a dependency between this ApiObject and other constructs. + // + // These can be other ApiObjects, Charts, or custom. + AddDependency(dependencies ...constructs.IConstruct) + // Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. + // + // Example: + // kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true)); + // + AddJsonPatch(ops ...cdk8s.JsonPatch) + // Renders the object to Kubernetes JSON. + ToJson() interface{} + // Returns a string representation of this construct. + ToString() *string +} + +// The jsii proxy struct for KubeHorizontalPodAutoscaler +type jsiiProxy_KubeHorizontalPodAutoscaler struct { + internal.Type__cdk8sApiObject +} + +func (j *jsiiProxy_KubeHorizontalPodAutoscaler) ApiGroup() *string { + var returns *string + _jsii_.Get( + j, + "apiGroup", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeHorizontalPodAutoscaler) ApiVersion() *string { + var returns *string + _jsii_.Get( + j, + "apiVersion", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeHorizontalPodAutoscaler) Chart() cdk8s.Chart { + var returns cdk8s.Chart + _jsii_.Get( + j, + "chart", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeHorizontalPodAutoscaler) Kind() *string { + var returns *string + _jsii_.Get( + j, + "kind", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeHorizontalPodAutoscaler) Metadata() cdk8s.ApiObjectMetadataDefinition { + var returns cdk8s.ApiObjectMetadataDefinition + _jsii_.Get( + j, + "metadata", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeHorizontalPodAutoscaler) Name() *string { + var returns *string + _jsii_.Get( + j, + "name", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeHorizontalPodAutoscaler) Node() constructs.Node { + var returns constructs.Node + _jsii_.Get( + j, + "node", + &returns, + ) + return returns +} + +// Defines a "io.k8s.api.autoscaling.v1.HorizontalPodAutoscaler" API object. +func NewKubeHorizontalPodAutoscaler(scope constructs.Construct, id *string, props *KubeHorizontalPodAutoscalerProps) KubeHorizontalPodAutoscaler { + _init_.Initialize() + + j := jsiiProxy_KubeHorizontalPodAutoscaler{} + + _jsii_.Create( + "k8s.KubeHorizontalPodAutoscaler", + []interface{}{scope, id, props}, + &j, + ) + + return &j +} + +// Defines a "io.k8s.api.autoscaling.v1.HorizontalPodAutoscaler" API object. +func NewKubeHorizontalPodAutoscaler_Override(k KubeHorizontalPodAutoscaler, scope constructs.Construct, id *string, props *KubeHorizontalPodAutoscalerProps) { + _init_.Initialize() + + _jsii_.Create( + "k8s.KubeHorizontalPodAutoscaler", + []interface{}{scope, id, props}, + k, + ) +} + +// Checks if `x` is a construct. +// +// Use this method instead of `instanceof` to properly detect `Construct` +// instances, even when the construct library is symlinked. +// +// Explanation: in JavaScript, multiple copies of the `constructs` library on +// disk are seen as independent, completely different libraries. As a +// consequence, the class `Construct` in each copy of the `constructs` library +// is seen as a different class, and an instance of one class will not test as +// `instanceof` the other class. `npm install` will not create installations +// like this, but users may manually symlink construct libraries together or +// use a monorepo tool: in those cases, multiple copies of the `constructs` +// library can be accidentally installed, and `instanceof` will behave +// unpredictably. It is safest to avoid using `instanceof`, and using +// this type-testing method instead. +// +// Returns: true if `x` is an object created from a class which extends `Construct`. +func KubeHorizontalPodAutoscaler_IsConstruct(x interface{}) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "k8s.KubeHorizontalPodAutoscaler", + "isConstruct", + []interface{}{x}, + &returns, + ) + + return returns +} + +// Renders a Kubernetes manifest for "io.k8s.api.autoscaling.v1.HorizontalPodAutoscaler". +// +// This can be used to inline resource manifests inside other objects (e.g. as templates). +func KubeHorizontalPodAutoscaler_Manifest(props *KubeHorizontalPodAutoscalerProps) interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "k8s.KubeHorizontalPodAutoscaler", + "manifest", + []interface{}{props}, + &returns, + ) + + return returns +} + +// Returns the `ApiObject` named `Resource` which is a child of the given construct. +// +// If `c` is an `ApiObject`, it is returned directly. Throws an +// exception if the construct does not have a child named `Default` _or_ if +// this child is not an `ApiObject`. +func KubeHorizontalPodAutoscaler_Of(c constructs.IConstruct) cdk8s.ApiObject { + _init_.Initialize() + + var returns cdk8s.ApiObject + + _jsii_.StaticInvoke( + "k8s.KubeHorizontalPodAutoscaler", + "of", + []interface{}{c}, + &returns, + ) + + return returns +} + +func KubeHorizontalPodAutoscaler_GVK() *cdk8s.GroupVersionKind { + _init_.Initialize() + var returns *cdk8s.GroupVersionKind + _jsii_.StaticGet( + "k8s.KubeHorizontalPodAutoscaler", + "GVK", + &returns, + ) + return returns +} + +func (k *jsiiProxy_KubeHorizontalPodAutoscaler) AddDependency(dependencies ...constructs.IConstruct) { + args := []interface{}{} + for _, a := range dependencies { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addDependency", + args, + ) +} + +func (k *jsiiProxy_KubeHorizontalPodAutoscaler) AddJsonPatch(ops ...cdk8s.JsonPatch) { + args := []interface{}{} + for _, a := range ops { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addJsonPatch", + args, + ) +} + +func (k *jsiiProxy_KubeHorizontalPodAutoscaler) ToJson() interface{} { + var returns interface{} + + _jsii_.Invoke( + k, + "toJson", + nil, // no parameters + &returns, + ) + + return returns +} + +func (k *jsiiProxy_KubeHorizontalPodAutoscaler) ToString() *string { + var returns *string + + _jsii_.Invoke( + k, + "toString", + nil, // no parameters + &returns, + ) + + return returns +} + +// list of horizontal pod autoscaler objects. +type KubeHorizontalPodAutoscalerList interface { + cdk8s.ApiObject + // The group portion of the API version (e.g. `authorization.k8s.io`). + ApiGroup() *string + // The object's API version (e.g. `authorization.k8s.io/v1`). + ApiVersion() *string + // The chart in which this object is defined. + Chart() cdk8s.Chart + // The object kind. + Kind() *string + // Metadata associated with this API object. + Metadata() cdk8s.ApiObjectMetadataDefinition + // The name of the API object. + // + // If a name is specified in `metadata.name` this will be the name returned. + // Otherwise, a name will be generated by calling + // `AddHelm.of(this).generatedObjectName(this)`, which by default uses the + // construct path to generate a DNS-compatible name for the resource. + Name() *string + // The tree node. + Node() constructs.Node + // Create a dependency between this ApiObject and other constructs. + // + // These can be other ApiObjects, Charts, or custom. + AddDependency(dependencies ...constructs.IConstruct) + // Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. + // + // Example: + // kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true)); + // + AddJsonPatch(ops ...cdk8s.JsonPatch) + // Renders the object to Kubernetes JSON. + ToJson() interface{} + // Returns a string representation of this construct. + ToString() *string +} + +// The jsii proxy struct for KubeHorizontalPodAutoscalerList +type jsiiProxy_KubeHorizontalPodAutoscalerList struct { + internal.Type__cdk8sApiObject +} + +func (j *jsiiProxy_KubeHorizontalPodAutoscalerList) ApiGroup() *string { + var returns *string + _jsii_.Get( + j, + "apiGroup", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeHorizontalPodAutoscalerList) ApiVersion() *string { + var returns *string + _jsii_.Get( + j, + "apiVersion", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeHorizontalPodAutoscalerList) Chart() cdk8s.Chart { + var returns cdk8s.Chart + _jsii_.Get( + j, + "chart", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeHorizontalPodAutoscalerList) Kind() *string { + var returns *string + _jsii_.Get( + j, + "kind", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeHorizontalPodAutoscalerList) Metadata() cdk8s.ApiObjectMetadataDefinition { + var returns cdk8s.ApiObjectMetadataDefinition + _jsii_.Get( + j, + "metadata", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeHorizontalPodAutoscalerList) Name() *string { + var returns *string + _jsii_.Get( + j, + "name", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeHorizontalPodAutoscalerList) Node() constructs.Node { + var returns constructs.Node + _jsii_.Get( + j, + "node", + &returns, + ) + return returns +} + +// Defines a "io.k8s.api.autoscaling.v1.HorizontalPodAutoscalerList" API object. +func NewKubeHorizontalPodAutoscalerList(scope constructs.Construct, id *string, props *KubeHorizontalPodAutoscalerListProps) KubeHorizontalPodAutoscalerList { + _init_.Initialize() + + j := jsiiProxy_KubeHorizontalPodAutoscalerList{} + + _jsii_.Create( + "k8s.KubeHorizontalPodAutoscalerList", + []interface{}{scope, id, props}, + &j, + ) + + return &j +} + +// Defines a "io.k8s.api.autoscaling.v1.HorizontalPodAutoscalerList" API object. +func NewKubeHorizontalPodAutoscalerList_Override(k KubeHorizontalPodAutoscalerList, scope constructs.Construct, id *string, props *KubeHorizontalPodAutoscalerListProps) { + _init_.Initialize() + + _jsii_.Create( + "k8s.KubeHorizontalPodAutoscalerList", + []interface{}{scope, id, props}, + k, + ) +} + +// Checks if `x` is a construct. +// +// Use this method instead of `instanceof` to properly detect `Construct` +// instances, even when the construct library is symlinked. +// +// Explanation: in JavaScript, multiple copies of the `constructs` library on +// disk are seen as independent, completely different libraries. As a +// consequence, the class `Construct` in each copy of the `constructs` library +// is seen as a different class, and an instance of one class will not test as +// `instanceof` the other class. `npm install` will not create installations +// like this, but users may manually symlink construct libraries together or +// use a monorepo tool: in those cases, multiple copies of the `constructs` +// library can be accidentally installed, and `instanceof` will behave +// unpredictably. It is safest to avoid using `instanceof`, and using +// this type-testing method instead. +// +// Returns: true if `x` is an object created from a class which extends `Construct`. +func KubeHorizontalPodAutoscalerList_IsConstruct(x interface{}) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "k8s.KubeHorizontalPodAutoscalerList", + "isConstruct", + []interface{}{x}, + &returns, + ) + + return returns +} + +// Renders a Kubernetes manifest for "io.k8s.api.autoscaling.v1.HorizontalPodAutoscalerList". +// +// This can be used to inline resource manifests inside other objects (e.g. as templates). +func KubeHorizontalPodAutoscalerList_Manifest(props *KubeHorizontalPodAutoscalerListProps) interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "k8s.KubeHorizontalPodAutoscalerList", + "manifest", + []interface{}{props}, + &returns, + ) + + return returns +} + +// Returns the `ApiObject` named `Resource` which is a child of the given construct. +// +// If `c` is an `ApiObject`, it is returned directly. Throws an +// exception if the construct does not have a child named `Default` _or_ if +// this child is not an `ApiObject`. +func KubeHorizontalPodAutoscalerList_Of(c constructs.IConstruct) cdk8s.ApiObject { + _init_.Initialize() + + var returns cdk8s.ApiObject + + _jsii_.StaticInvoke( + "k8s.KubeHorizontalPodAutoscalerList", + "of", + []interface{}{c}, + &returns, + ) + + return returns +} + +func KubeHorizontalPodAutoscalerList_GVK() *cdk8s.GroupVersionKind { + _init_.Initialize() + var returns *cdk8s.GroupVersionKind + _jsii_.StaticGet( + "k8s.KubeHorizontalPodAutoscalerList", + "GVK", + &returns, + ) + return returns +} + +func (k *jsiiProxy_KubeHorizontalPodAutoscalerList) AddDependency(dependencies ...constructs.IConstruct) { + args := []interface{}{} + for _, a := range dependencies { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addDependency", + args, + ) +} + +func (k *jsiiProxy_KubeHorizontalPodAutoscalerList) AddJsonPatch(ops ...cdk8s.JsonPatch) { + args := []interface{}{} + for _, a := range ops { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addJsonPatch", + args, + ) +} + +func (k *jsiiProxy_KubeHorizontalPodAutoscalerList) ToJson() interface{} { + var returns interface{} + + _jsii_.Invoke( + k, + "toJson", + nil, // no parameters + &returns, + ) + + return returns +} + +func (k *jsiiProxy_KubeHorizontalPodAutoscalerList) ToString() *string { + var returns *string + + _jsii_.Invoke( + k, + "toString", + nil, // no parameters + &returns, + ) + + return returns +} + +// list of horizontal pod autoscaler objects. +type KubeHorizontalPodAutoscalerListProps struct { + // list of horizontal pod autoscaler objects. + Items *[]*KubeHorizontalPodAutoscalerProps `field:"required" json:"items" yaml:"items"` + // Standard list metadata. + Metadata *ListMeta `field:"optional" json:"metadata" yaml:"metadata"` +} + +// HorizontalPodAutoscaler is a list of horizontal pod autoscaler objects. +type KubeHorizontalPodAutoscalerListV2Beta1 interface { + cdk8s.ApiObject + // The group portion of the API version (e.g. `authorization.k8s.io`). + ApiGroup() *string + // The object's API version (e.g. `authorization.k8s.io/v1`). + ApiVersion() *string + // The chart in which this object is defined. + Chart() cdk8s.Chart + // The object kind. + Kind() *string + // Metadata associated with this API object. + Metadata() cdk8s.ApiObjectMetadataDefinition + // The name of the API object. + // + // If a name is specified in `metadata.name` this will be the name returned. + // Otherwise, a name will be generated by calling + // `AddHelm.of(this).generatedObjectName(this)`, which by default uses the + // construct path to generate a DNS-compatible name for the resource. + Name() *string + // The tree node. + Node() constructs.Node + // Create a dependency between this ApiObject and other constructs. + // + // These can be other ApiObjects, Charts, or custom. + AddDependency(dependencies ...constructs.IConstruct) + // Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. + // + // Example: + // kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true)); + // + AddJsonPatch(ops ...cdk8s.JsonPatch) + // Renders the object to Kubernetes JSON. + ToJson() interface{} + // Returns a string representation of this construct. + ToString() *string +} + +// The jsii proxy struct for KubeHorizontalPodAutoscalerListV2Beta1 +type jsiiProxy_KubeHorizontalPodAutoscalerListV2Beta1 struct { + internal.Type__cdk8sApiObject +} + +func (j *jsiiProxy_KubeHorizontalPodAutoscalerListV2Beta1) ApiGroup() *string { + var returns *string + _jsii_.Get( + j, + "apiGroup", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeHorizontalPodAutoscalerListV2Beta1) ApiVersion() *string { + var returns *string + _jsii_.Get( + j, + "apiVersion", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeHorizontalPodAutoscalerListV2Beta1) Chart() cdk8s.Chart { + var returns cdk8s.Chart + _jsii_.Get( + j, + "chart", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeHorizontalPodAutoscalerListV2Beta1) Kind() *string { + var returns *string + _jsii_.Get( + j, + "kind", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeHorizontalPodAutoscalerListV2Beta1) Metadata() cdk8s.ApiObjectMetadataDefinition { + var returns cdk8s.ApiObjectMetadataDefinition + _jsii_.Get( + j, + "metadata", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeHorizontalPodAutoscalerListV2Beta1) Name() *string { + var returns *string + _jsii_.Get( + j, + "name", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeHorizontalPodAutoscalerListV2Beta1) Node() constructs.Node { + var returns constructs.Node + _jsii_.Get( + j, + "node", + &returns, + ) + return returns +} + +// Defines a "io.k8s.api.autoscaling.v2beta1.HorizontalPodAutoscalerList" API object. +func NewKubeHorizontalPodAutoscalerListV2Beta1(scope constructs.Construct, id *string, props *KubeHorizontalPodAutoscalerListV2Beta1Props) KubeHorizontalPodAutoscalerListV2Beta1 { + _init_.Initialize() + + j := jsiiProxy_KubeHorizontalPodAutoscalerListV2Beta1{} + + _jsii_.Create( + "k8s.KubeHorizontalPodAutoscalerListV2Beta1", + []interface{}{scope, id, props}, + &j, + ) + + return &j +} + +// Defines a "io.k8s.api.autoscaling.v2beta1.HorizontalPodAutoscalerList" API object. +func NewKubeHorizontalPodAutoscalerListV2Beta1_Override(k KubeHorizontalPodAutoscalerListV2Beta1, scope constructs.Construct, id *string, props *KubeHorizontalPodAutoscalerListV2Beta1Props) { + _init_.Initialize() + + _jsii_.Create( + "k8s.KubeHorizontalPodAutoscalerListV2Beta1", + []interface{}{scope, id, props}, + k, + ) +} + +// Checks if `x` is a construct. +// +// Use this method instead of `instanceof` to properly detect `Construct` +// instances, even when the construct library is symlinked. +// +// Explanation: in JavaScript, multiple copies of the `constructs` library on +// disk are seen as independent, completely different libraries. As a +// consequence, the class `Construct` in each copy of the `constructs` library +// is seen as a different class, and an instance of one class will not test as +// `instanceof` the other class. `npm install` will not create installations +// like this, but users may manually symlink construct libraries together or +// use a monorepo tool: in those cases, multiple copies of the `constructs` +// library can be accidentally installed, and `instanceof` will behave +// unpredictably. It is safest to avoid using `instanceof`, and using +// this type-testing method instead. +// +// Returns: true if `x` is an object created from a class which extends `Construct`. +func KubeHorizontalPodAutoscalerListV2Beta1_IsConstruct(x interface{}) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "k8s.KubeHorizontalPodAutoscalerListV2Beta1", + "isConstruct", + []interface{}{x}, + &returns, + ) + + return returns +} + +// Renders a Kubernetes manifest for "io.k8s.api.autoscaling.v2beta1.HorizontalPodAutoscalerList". +// +// This can be used to inline resource manifests inside other objects (e.g. as templates). +func KubeHorizontalPodAutoscalerListV2Beta1_Manifest(props *KubeHorizontalPodAutoscalerListV2Beta1Props) interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "k8s.KubeHorizontalPodAutoscalerListV2Beta1", + "manifest", + []interface{}{props}, + &returns, + ) + + return returns +} + +// Returns the `ApiObject` named `Resource` which is a child of the given construct. +// +// If `c` is an `ApiObject`, it is returned directly. Throws an +// exception if the construct does not have a child named `Default` _or_ if +// this child is not an `ApiObject`. +func KubeHorizontalPodAutoscalerListV2Beta1_Of(c constructs.IConstruct) cdk8s.ApiObject { + _init_.Initialize() + + var returns cdk8s.ApiObject + + _jsii_.StaticInvoke( + "k8s.KubeHorizontalPodAutoscalerListV2Beta1", + "of", + []interface{}{c}, + &returns, + ) + + return returns +} + +func KubeHorizontalPodAutoscalerListV2Beta1_GVK() *cdk8s.GroupVersionKind { + _init_.Initialize() + var returns *cdk8s.GroupVersionKind + _jsii_.StaticGet( + "k8s.KubeHorizontalPodAutoscalerListV2Beta1", + "GVK", + &returns, + ) + return returns +} + +func (k *jsiiProxy_KubeHorizontalPodAutoscalerListV2Beta1) AddDependency(dependencies ...constructs.IConstruct) { + args := []interface{}{} + for _, a := range dependencies { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addDependency", + args, + ) +} + +func (k *jsiiProxy_KubeHorizontalPodAutoscalerListV2Beta1) AddJsonPatch(ops ...cdk8s.JsonPatch) { + args := []interface{}{} + for _, a := range ops { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addJsonPatch", + args, + ) +} + +func (k *jsiiProxy_KubeHorizontalPodAutoscalerListV2Beta1) ToJson() interface{} { + var returns interface{} + + _jsii_.Invoke( + k, + "toJson", + nil, // no parameters + &returns, + ) + + return returns +} + +func (k *jsiiProxy_KubeHorizontalPodAutoscalerListV2Beta1) ToString() *string { + var returns *string + + _jsii_.Invoke( + k, + "toString", + nil, // no parameters + &returns, + ) + + return returns +} + +// HorizontalPodAutoscaler is a list of horizontal pod autoscaler objects. +type KubeHorizontalPodAutoscalerListV2Beta1Props struct { + // items is the list of horizontal pod autoscaler objects. + Items *[]*KubeHorizontalPodAutoscalerV2Beta1Props `field:"required" json:"items" yaml:"items"` + // metadata is the standard list metadata. + Metadata *ListMeta `field:"optional" json:"metadata" yaml:"metadata"` +} + +// HorizontalPodAutoscalerList is a list of horizontal pod autoscaler objects. +type KubeHorizontalPodAutoscalerListV2Beta2 interface { + cdk8s.ApiObject + // The group portion of the API version (e.g. `authorization.k8s.io`). + ApiGroup() *string + // The object's API version (e.g. `authorization.k8s.io/v1`). + ApiVersion() *string + // The chart in which this object is defined. + Chart() cdk8s.Chart + // The object kind. + Kind() *string + // Metadata associated with this API object. + Metadata() cdk8s.ApiObjectMetadataDefinition + // The name of the API object. + // + // If a name is specified in `metadata.name` this will be the name returned. + // Otherwise, a name will be generated by calling + // `AddHelm.of(this).generatedObjectName(this)`, which by default uses the + // construct path to generate a DNS-compatible name for the resource. + Name() *string + // The tree node. + Node() constructs.Node + // Create a dependency between this ApiObject and other constructs. + // + // These can be other ApiObjects, Charts, or custom. + AddDependency(dependencies ...constructs.IConstruct) + // Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. + // + // Example: + // kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true)); + // + AddJsonPatch(ops ...cdk8s.JsonPatch) + // Renders the object to Kubernetes JSON. + ToJson() interface{} + // Returns a string representation of this construct. + ToString() *string +} + +// The jsii proxy struct for KubeHorizontalPodAutoscalerListV2Beta2 +type jsiiProxy_KubeHorizontalPodAutoscalerListV2Beta2 struct { + internal.Type__cdk8sApiObject +} + +func (j *jsiiProxy_KubeHorizontalPodAutoscalerListV2Beta2) ApiGroup() *string { + var returns *string + _jsii_.Get( + j, + "apiGroup", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeHorizontalPodAutoscalerListV2Beta2) ApiVersion() *string { + var returns *string + _jsii_.Get( + j, + "apiVersion", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeHorizontalPodAutoscalerListV2Beta2) Chart() cdk8s.Chart { + var returns cdk8s.Chart + _jsii_.Get( + j, + "chart", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeHorizontalPodAutoscalerListV2Beta2) Kind() *string { + var returns *string + _jsii_.Get( + j, + "kind", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeHorizontalPodAutoscalerListV2Beta2) Metadata() cdk8s.ApiObjectMetadataDefinition { + var returns cdk8s.ApiObjectMetadataDefinition + _jsii_.Get( + j, + "metadata", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeHorizontalPodAutoscalerListV2Beta2) Name() *string { + var returns *string + _jsii_.Get( + j, + "name", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeHorizontalPodAutoscalerListV2Beta2) Node() constructs.Node { + var returns constructs.Node + _jsii_.Get( + j, + "node", + &returns, + ) + return returns +} + +// Defines a "io.k8s.api.autoscaling.v2beta2.HorizontalPodAutoscalerList" API object. +func NewKubeHorizontalPodAutoscalerListV2Beta2(scope constructs.Construct, id *string, props *KubeHorizontalPodAutoscalerListV2Beta2Props) KubeHorizontalPodAutoscalerListV2Beta2 { + _init_.Initialize() + + j := jsiiProxy_KubeHorizontalPodAutoscalerListV2Beta2{} + + _jsii_.Create( + "k8s.KubeHorizontalPodAutoscalerListV2Beta2", + []interface{}{scope, id, props}, + &j, + ) + + return &j +} + +// Defines a "io.k8s.api.autoscaling.v2beta2.HorizontalPodAutoscalerList" API object. +func NewKubeHorizontalPodAutoscalerListV2Beta2_Override(k KubeHorizontalPodAutoscalerListV2Beta2, scope constructs.Construct, id *string, props *KubeHorizontalPodAutoscalerListV2Beta2Props) { + _init_.Initialize() + + _jsii_.Create( + "k8s.KubeHorizontalPodAutoscalerListV2Beta2", + []interface{}{scope, id, props}, + k, + ) +} + +// Checks if `x` is a construct. +// +// Use this method instead of `instanceof` to properly detect `Construct` +// instances, even when the construct library is symlinked. +// +// Explanation: in JavaScript, multiple copies of the `constructs` library on +// disk are seen as independent, completely different libraries. As a +// consequence, the class `Construct` in each copy of the `constructs` library +// is seen as a different class, and an instance of one class will not test as +// `instanceof` the other class. `npm install` will not create installations +// like this, but users may manually symlink construct libraries together or +// use a monorepo tool: in those cases, multiple copies of the `constructs` +// library can be accidentally installed, and `instanceof` will behave +// unpredictably. It is safest to avoid using `instanceof`, and using +// this type-testing method instead. +// +// Returns: true if `x` is an object created from a class which extends `Construct`. +func KubeHorizontalPodAutoscalerListV2Beta2_IsConstruct(x interface{}) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "k8s.KubeHorizontalPodAutoscalerListV2Beta2", + "isConstruct", + []interface{}{x}, + &returns, + ) + + return returns +} + +// Renders a Kubernetes manifest for "io.k8s.api.autoscaling.v2beta2.HorizontalPodAutoscalerList". +// +// This can be used to inline resource manifests inside other objects (e.g. as templates). +func KubeHorizontalPodAutoscalerListV2Beta2_Manifest(props *KubeHorizontalPodAutoscalerListV2Beta2Props) interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "k8s.KubeHorizontalPodAutoscalerListV2Beta2", + "manifest", + []interface{}{props}, + &returns, + ) + + return returns +} + +// Returns the `ApiObject` named `Resource` which is a child of the given construct. +// +// If `c` is an `ApiObject`, it is returned directly. Throws an +// exception if the construct does not have a child named `Default` _or_ if +// this child is not an `ApiObject`. +func KubeHorizontalPodAutoscalerListV2Beta2_Of(c constructs.IConstruct) cdk8s.ApiObject { + _init_.Initialize() + + var returns cdk8s.ApiObject + + _jsii_.StaticInvoke( + "k8s.KubeHorizontalPodAutoscalerListV2Beta2", + "of", + []interface{}{c}, + &returns, + ) + + return returns +} + +func KubeHorizontalPodAutoscalerListV2Beta2_GVK() *cdk8s.GroupVersionKind { + _init_.Initialize() + var returns *cdk8s.GroupVersionKind + _jsii_.StaticGet( + "k8s.KubeHorizontalPodAutoscalerListV2Beta2", + "GVK", + &returns, + ) + return returns +} + +func (k *jsiiProxy_KubeHorizontalPodAutoscalerListV2Beta2) AddDependency(dependencies ...constructs.IConstruct) { + args := []interface{}{} + for _, a := range dependencies { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addDependency", + args, + ) +} + +func (k *jsiiProxy_KubeHorizontalPodAutoscalerListV2Beta2) AddJsonPatch(ops ...cdk8s.JsonPatch) { + args := []interface{}{} + for _, a := range ops { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addJsonPatch", + args, + ) +} + +func (k *jsiiProxy_KubeHorizontalPodAutoscalerListV2Beta2) ToJson() interface{} { + var returns interface{} + + _jsii_.Invoke( + k, + "toJson", + nil, // no parameters + &returns, + ) + + return returns +} + +func (k *jsiiProxy_KubeHorizontalPodAutoscalerListV2Beta2) ToString() *string { + var returns *string + + _jsii_.Invoke( + k, + "toString", + nil, // no parameters + &returns, + ) + + return returns +} + +// HorizontalPodAutoscalerList is a list of horizontal pod autoscaler objects. +type KubeHorizontalPodAutoscalerListV2Beta2Props struct { + // items is the list of horizontal pod autoscaler objects. + Items *[]*KubeHorizontalPodAutoscalerV2Beta2Props `field:"required" json:"items" yaml:"items"` + // metadata is the standard list metadata. + Metadata *ListMeta `field:"optional" json:"metadata" yaml:"metadata"` +} + +// configuration of a horizontal pod autoscaler. +type KubeHorizontalPodAutoscalerProps struct { + // Standard object metadata. + // + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + Metadata *ObjectMeta `field:"optional" json:"metadata" yaml:"metadata"` + // behaviour of autoscaler. + // + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status. + Spec *HorizontalPodAutoscalerSpec `field:"optional" json:"spec" yaml:"spec"` +} + +// HorizontalPodAutoscaler is the configuration for a horizontal pod autoscaler, which automatically manages the replica count of any resource implementing the scale subresource based on the metrics specified. +type KubeHorizontalPodAutoscalerV2Beta1 interface { + cdk8s.ApiObject + // The group portion of the API version (e.g. `authorization.k8s.io`). + ApiGroup() *string + // The object's API version (e.g. `authorization.k8s.io/v1`). + ApiVersion() *string + // The chart in which this object is defined. + Chart() cdk8s.Chart + // The object kind. + Kind() *string + // Metadata associated with this API object. + Metadata() cdk8s.ApiObjectMetadataDefinition + // The name of the API object. + // + // If a name is specified in `metadata.name` this will be the name returned. + // Otherwise, a name will be generated by calling + // `AddHelm.of(this).generatedObjectName(this)`, which by default uses the + // construct path to generate a DNS-compatible name for the resource. + Name() *string + // The tree node. + Node() constructs.Node + // Create a dependency between this ApiObject and other constructs. + // + // These can be other ApiObjects, Charts, or custom. + AddDependency(dependencies ...constructs.IConstruct) + // Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. + // + // Example: + // kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true)); + // + AddJsonPatch(ops ...cdk8s.JsonPatch) + // Renders the object to Kubernetes JSON. + ToJson() interface{} + // Returns a string representation of this construct. + ToString() *string +} + +// The jsii proxy struct for KubeHorizontalPodAutoscalerV2Beta1 +type jsiiProxy_KubeHorizontalPodAutoscalerV2Beta1 struct { + internal.Type__cdk8sApiObject +} + +func (j *jsiiProxy_KubeHorizontalPodAutoscalerV2Beta1) ApiGroup() *string { + var returns *string + _jsii_.Get( + j, + "apiGroup", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeHorizontalPodAutoscalerV2Beta1) ApiVersion() *string { + var returns *string + _jsii_.Get( + j, + "apiVersion", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeHorizontalPodAutoscalerV2Beta1) Chart() cdk8s.Chart { + var returns cdk8s.Chart + _jsii_.Get( + j, + "chart", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeHorizontalPodAutoscalerV2Beta1) Kind() *string { + var returns *string + _jsii_.Get( + j, + "kind", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeHorizontalPodAutoscalerV2Beta1) Metadata() cdk8s.ApiObjectMetadataDefinition { + var returns cdk8s.ApiObjectMetadataDefinition + _jsii_.Get( + j, + "metadata", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeHorizontalPodAutoscalerV2Beta1) Name() *string { + var returns *string + _jsii_.Get( + j, + "name", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeHorizontalPodAutoscalerV2Beta1) Node() constructs.Node { + var returns constructs.Node + _jsii_.Get( + j, + "node", + &returns, + ) + return returns +} + +// Defines a "io.k8s.api.autoscaling.v2beta1.HorizontalPodAutoscaler" API object. +func NewKubeHorizontalPodAutoscalerV2Beta1(scope constructs.Construct, id *string, props *KubeHorizontalPodAutoscalerV2Beta1Props) KubeHorizontalPodAutoscalerV2Beta1 { + _init_.Initialize() + + j := jsiiProxy_KubeHorizontalPodAutoscalerV2Beta1{} + + _jsii_.Create( + "k8s.KubeHorizontalPodAutoscalerV2Beta1", + []interface{}{scope, id, props}, + &j, + ) + + return &j +} + +// Defines a "io.k8s.api.autoscaling.v2beta1.HorizontalPodAutoscaler" API object. +func NewKubeHorizontalPodAutoscalerV2Beta1_Override(k KubeHorizontalPodAutoscalerV2Beta1, scope constructs.Construct, id *string, props *KubeHorizontalPodAutoscalerV2Beta1Props) { + _init_.Initialize() + + _jsii_.Create( + "k8s.KubeHorizontalPodAutoscalerV2Beta1", + []interface{}{scope, id, props}, + k, + ) +} + +// Checks if `x` is a construct. +// +// Use this method instead of `instanceof` to properly detect `Construct` +// instances, even when the construct library is symlinked. +// +// Explanation: in JavaScript, multiple copies of the `constructs` library on +// disk are seen as independent, completely different libraries. As a +// consequence, the class `Construct` in each copy of the `constructs` library +// is seen as a different class, and an instance of one class will not test as +// `instanceof` the other class. `npm install` will not create installations +// like this, but users may manually symlink construct libraries together or +// use a monorepo tool: in those cases, multiple copies of the `constructs` +// library can be accidentally installed, and `instanceof` will behave +// unpredictably. It is safest to avoid using `instanceof`, and using +// this type-testing method instead. +// +// Returns: true if `x` is an object created from a class which extends `Construct`. +func KubeHorizontalPodAutoscalerV2Beta1_IsConstruct(x interface{}) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "k8s.KubeHorizontalPodAutoscalerV2Beta1", + "isConstruct", + []interface{}{x}, + &returns, + ) + + return returns +} + +// Renders a Kubernetes manifest for "io.k8s.api.autoscaling.v2beta1.HorizontalPodAutoscaler". +// +// This can be used to inline resource manifests inside other objects (e.g. as templates). +func KubeHorizontalPodAutoscalerV2Beta1_Manifest(props *KubeHorizontalPodAutoscalerV2Beta1Props) interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "k8s.KubeHorizontalPodAutoscalerV2Beta1", + "manifest", + []interface{}{props}, + &returns, + ) + + return returns +} + +// Returns the `ApiObject` named `Resource` which is a child of the given construct. +// +// If `c` is an `ApiObject`, it is returned directly. Throws an +// exception if the construct does not have a child named `Default` _or_ if +// this child is not an `ApiObject`. +func KubeHorizontalPodAutoscalerV2Beta1_Of(c constructs.IConstruct) cdk8s.ApiObject { + _init_.Initialize() + + var returns cdk8s.ApiObject + + _jsii_.StaticInvoke( + "k8s.KubeHorizontalPodAutoscalerV2Beta1", + "of", + []interface{}{c}, + &returns, + ) + + return returns +} + +func KubeHorizontalPodAutoscalerV2Beta1_GVK() *cdk8s.GroupVersionKind { + _init_.Initialize() + var returns *cdk8s.GroupVersionKind + _jsii_.StaticGet( + "k8s.KubeHorizontalPodAutoscalerV2Beta1", + "GVK", + &returns, + ) + return returns +} + +func (k *jsiiProxy_KubeHorizontalPodAutoscalerV2Beta1) AddDependency(dependencies ...constructs.IConstruct) { + args := []interface{}{} + for _, a := range dependencies { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addDependency", + args, + ) +} + +func (k *jsiiProxy_KubeHorizontalPodAutoscalerV2Beta1) AddJsonPatch(ops ...cdk8s.JsonPatch) { + args := []interface{}{} + for _, a := range ops { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addJsonPatch", + args, + ) +} + +func (k *jsiiProxy_KubeHorizontalPodAutoscalerV2Beta1) ToJson() interface{} { + var returns interface{} + + _jsii_.Invoke( + k, + "toJson", + nil, // no parameters + &returns, + ) + + return returns +} + +func (k *jsiiProxy_KubeHorizontalPodAutoscalerV2Beta1) ToString() *string { + var returns *string + + _jsii_.Invoke( + k, + "toString", + nil, // no parameters + &returns, + ) + + return returns +} + +// HorizontalPodAutoscaler is the configuration for a horizontal pod autoscaler, which automatically manages the replica count of any resource implementing the scale subresource based on the metrics specified. +type KubeHorizontalPodAutoscalerV2Beta1Props struct { + // metadata is the standard object metadata. + // + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + Metadata *ObjectMeta `field:"optional" json:"metadata" yaml:"metadata"` + // spec is the specification for the behaviour of the autoscaler. + // + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status. + Spec *HorizontalPodAutoscalerSpecV2Beta1 `field:"optional" json:"spec" yaml:"spec"` +} + +// HorizontalPodAutoscaler is the configuration for a horizontal pod autoscaler, which automatically manages the replica count of any resource implementing the scale subresource based on the metrics specified. +type KubeHorizontalPodAutoscalerV2Beta2 interface { + cdk8s.ApiObject + // The group portion of the API version (e.g. `authorization.k8s.io`). + ApiGroup() *string + // The object's API version (e.g. `authorization.k8s.io/v1`). + ApiVersion() *string + // The chart in which this object is defined. + Chart() cdk8s.Chart + // The object kind. + Kind() *string + // Metadata associated with this API object. + Metadata() cdk8s.ApiObjectMetadataDefinition + // The name of the API object. + // + // If a name is specified in `metadata.name` this will be the name returned. + // Otherwise, a name will be generated by calling + // `AddHelm.of(this).generatedObjectName(this)`, which by default uses the + // construct path to generate a DNS-compatible name for the resource. + Name() *string + // The tree node. + Node() constructs.Node + // Create a dependency between this ApiObject and other constructs. + // + // These can be other ApiObjects, Charts, or custom. + AddDependency(dependencies ...constructs.IConstruct) + // Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. + // + // Example: + // kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true)); + // + AddJsonPatch(ops ...cdk8s.JsonPatch) + // Renders the object to Kubernetes JSON. + ToJson() interface{} + // Returns a string representation of this construct. + ToString() *string +} + +// The jsii proxy struct for KubeHorizontalPodAutoscalerV2Beta2 +type jsiiProxy_KubeHorizontalPodAutoscalerV2Beta2 struct { + internal.Type__cdk8sApiObject +} + +func (j *jsiiProxy_KubeHorizontalPodAutoscalerV2Beta2) ApiGroup() *string { + var returns *string + _jsii_.Get( + j, + "apiGroup", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeHorizontalPodAutoscalerV2Beta2) ApiVersion() *string { + var returns *string + _jsii_.Get( + j, + "apiVersion", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeHorizontalPodAutoscalerV2Beta2) Chart() cdk8s.Chart { + var returns cdk8s.Chart + _jsii_.Get( + j, + "chart", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeHorizontalPodAutoscalerV2Beta2) Kind() *string { + var returns *string + _jsii_.Get( + j, + "kind", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeHorizontalPodAutoscalerV2Beta2) Metadata() cdk8s.ApiObjectMetadataDefinition { + var returns cdk8s.ApiObjectMetadataDefinition + _jsii_.Get( + j, + "metadata", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeHorizontalPodAutoscalerV2Beta2) Name() *string { + var returns *string + _jsii_.Get( + j, + "name", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeHorizontalPodAutoscalerV2Beta2) Node() constructs.Node { + var returns constructs.Node + _jsii_.Get( + j, + "node", + &returns, + ) + return returns +} + +// Defines a "io.k8s.api.autoscaling.v2beta2.HorizontalPodAutoscaler" API object. +func NewKubeHorizontalPodAutoscalerV2Beta2(scope constructs.Construct, id *string, props *KubeHorizontalPodAutoscalerV2Beta2Props) KubeHorizontalPodAutoscalerV2Beta2 { + _init_.Initialize() + + j := jsiiProxy_KubeHorizontalPodAutoscalerV2Beta2{} + + _jsii_.Create( + "k8s.KubeHorizontalPodAutoscalerV2Beta2", + []interface{}{scope, id, props}, + &j, + ) + + return &j +} + +// Defines a "io.k8s.api.autoscaling.v2beta2.HorizontalPodAutoscaler" API object. +func NewKubeHorizontalPodAutoscalerV2Beta2_Override(k KubeHorizontalPodAutoscalerV2Beta2, scope constructs.Construct, id *string, props *KubeHorizontalPodAutoscalerV2Beta2Props) { + _init_.Initialize() + + _jsii_.Create( + "k8s.KubeHorizontalPodAutoscalerV2Beta2", + []interface{}{scope, id, props}, + k, + ) +} + +// Checks if `x` is a construct. +// +// Use this method instead of `instanceof` to properly detect `Construct` +// instances, even when the construct library is symlinked. +// +// Explanation: in JavaScript, multiple copies of the `constructs` library on +// disk are seen as independent, completely different libraries. As a +// consequence, the class `Construct` in each copy of the `constructs` library +// is seen as a different class, and an instance of one class will not test as +// `instanceof` the other class. `npm install` will not create installations +// like this, but users may manually symlink construct libraries together or +// use a monorepo tool: in those cases, multiple copies of the `constructs` +// library can be accidentally installed, and `instanceof` will behave +// unpredictably. It is safest to avoid using `instanceof`, and using +// this type-testing method instead. +// +// Returns: true if `x` is an object created from a class which extends `Construct`. +func KubeHorizontalPodAutoscalerV2Beta2_IsConstruct(x interface{}) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "k8s.KubeHorizontalPodAutoscalerV2Beta2", + "isConstruct", + []interface{}{x}, + &returns, + ) + + return returns +} + +// Renders a Kubernetes manifest for "io.k8s.api.autoscaling.v2beta2.HorizontalPodAutoscaler". +// +// This can be used to inline resource manifests inside other objects (e.g. as templates). +func KubeHorizontalPodAutoscalerV2Beta2_Manifest(props *KubeHorizontalPodAutoscalerV2Beta2Props) interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "k8s.KubeHorizontalPodAutoscalerV2Beta2", + "manifest", + []interface{}{props}, + &returns, + ) + + return returns +} + +// Returns the `ApiObject` named `Resource` which is a child of the given construct. +// +// If `c` is an `ApiObject`, it is returned directly. Throws an +// exception if the construct does not have a child named `Default` _or_ if +// this child is not an `ApiObject`. +func KubeHorizontalPodAutoscalerV2Beta2_Of(c constructs.IConstruct) cdk8s.ApiObject { + _init_.Initialize() + + var returns cdk8s.ApiObject + + _jsii_.StaticInvoke( + "k8s.KubeHorizontalPodAutoscalerV2Beta2", + "of", + []interface{}{c}, + &returns, + ) + + return returns +} + +func KubeHorizontalPodAutoscalerV2Beta2_GVK() *cdk8s.GroupVersionKind { + _init_.Initialize() + var returns *cdk8s.GroupVersionKind + _jsii_.StaticGet( + "k8s.KubeHorizontalPodAutoscalerV2Beta2", + "GVK", + &returns, + ) + return returns +} + +func (k *jsiiProxy_KubeHorizontalPodAutoscalerV2Beta2) AddDependency(dependencies ...constructs.IConstruct) { + args := []interface{}{} + for _, a := range dependencies { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addDependency", + args, + ) +} + +func (k *jsiiProxy_KubeHorizontalPodAutoscalerV2Beta2) AddJsonPatch(ops ...cdk8s.JsonPatch) { + args := []interface{}{} + for _, a := range ops { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addJsonPatch", + args, + ) +} + +func (k *jsiiProxy_KubeHorizontalPodAutoscalerV2Beta2) ToJson() interface{} { + var returns interface{} + + _jsii_.Invoke( + k, + "toJson", + nil, // no parameters + &returns, + ) + + return returns +} + +func (k *jsiiProxy_KubeHorizontalPodAutoscalerV2Beta2) ToString() *string { + var returns *string + + _jsii_.Invoke( + k, + "toString", + nil, // no parameters + &returns, + ) + + return returns +} + +// HorizontalPodAutoscaler is the configuration for a horizontal pod autoscaler, which automatically manages the replica count of any resource implementing the scale subresource based on the metrics specified. +type KubeHorizontalPodAutoscalerV2Beta2Props struct { + // metadata is the standard object metadata. + // + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + Metadata *ObjectMeta `field:"optional" json:"metadata" yaml:"metadata"` + // spec is the specification for the behaviour of the autoscaler. + // + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status. + Spec *HorizontalPodAutoscalerSpecV2Beta2 `field:"optional" json:"spec" yaml:"spec"` +} + +// Ingress is a collection of rules that allow inbound connections to reach the endpoints defined by a backend. +// +// An Ingress can be configured to give services externally-reachable urls, load balance traffic, terminate SSL, offer name based virtual hosting etc. +type KubeIngress interface { + cdk8s.ApiObject + // The group portion of the API version (e.g. `authorization.k8s.io`). + ApiGroup() *string + // The object's API version (e.g. `authorization.k8s.io/v1`). + ApiVersion() *string + // The chart in which this object is defined. + Chart() cdk8s.Chart + // The object kind. + Kind() *string + // Metadata associated with this API object. + Metadata() cdk8s.ApiObjectMetadataDefinition + // The name of the API object. + // + // If a name is specified in `metadata.name` this will be the name returned. + // Otherwise, a name will be generated by calling + // `AddHelm.of(this).generatedObjectName(this)`, which by default uses the + // construct path to generate a DNS-compatible name for the resource. + Name() *string + // The tree node. + Node() constructs.Node + // Create a dependency between this ApiObject and other constructs. + // + // These can be other ApiObjects, Charts, or custom. + AddDependency(dependencies ...constructs.IConstruct) + // Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. + // + // Example: + // kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true)); + // + AddJsonPatch(ops ...cdk8s.JsonPatch) + // Renders the object to Kubernetes JSON. + ToJson() interface{} + // Returns a string representation of this construct. + ToString() *string +} + +// The jsii proxy struct for KubeIngress +type jsiiProxy_KubeIngress struct { + internal.Type__cdk8sApiObject +} + +func (j *jsiiProxy_KubeIngress) ApiGroup() *string { + var returns *string + _jsii_.Get( + j, + "apiGroup", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeIngress) ApiVersion() *string { + var returns *string + _jsii_.Get( + j, + "apiVersion", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeIngress) Chart() cdk8s.Chart { + var returns cdk8s.Chart + _jsii_.Get( + j, + "chart", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeIngress) Kind() *string { + var returns *string + _jsii_.Get( + j, + "kind", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeIngress) Metadata() cdk8s.ApiObjectMetadataDefinition { + var returns cdk8s.ApiObjectMetadataDefinition + _jsii_.Get( + j, + "metadata", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeIngress) Name() *string { + var returns *string + _jsii_.Get( + j, + "name", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeIngress) Node() constructs.Node { + var returns constructs.Node + _jsii_.Get( + j, + "node", + &returns, + ) + return returns +} + +// Defines a "io.k8s.api.networking.v1.Ingress" API object. +func NewKubeIngress(scope constructs.Construct, id *string, props *KubeIngressProps) KubeIngress { + _init_.Initialize() + + j := jsiiProxy_KubeIngress{} + + _jsii_.Create( + "k8s.KubeIngress", + []interface{}{scope, id, props}, + &j, + ) + + return &j +} + +// Defines a "io.k8s.api.networking.v1.Ingress" API object. +func NewKubeIngress_Override(k KubeIngress, scope constructs.Construct, id *string, props *KubeIngressProps) { + _init_.Initialize() + + _jsii_.Create( + "k8s.KubeIngress", + []interface{}{scope, id, props}, + k, + ) +} + +// Checks if `x` is a construct. +// +// Use this method instead of `instanceof` to properly detect `Construct` +// instances, even when the construct library is symlinked. +// +// Explanation: in JavaScript, multiple copies of the `constructs` library on +// disk are seen as independent, completely different libraries. As a +// consequence, the class `Construct` in each copy of the `constructs` library +// is seen as a different class, and an instance of one class will not test as +// `instanceof` the other class. `npm install` will not create installations +// like this, but users may manually symlink construct libraries together or +// use a monorepo tool: in those cases, multiple copies of the `constructs` +// library can be accidentally installed, and `instanceof` will behave +// unpredictably. It is safest to avoid using `instanceof`, and using +// this type-testing method instead. +// +// Returns: true if `x` is an object created from a class which extends `Construct`. +func KubeIngress_IsConstruct(x interface{}) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "k8s.KubeIngress", + "isConstruct", + []interface{}{x}, + &returns, + ) + + return returns +} + +// Renders a Kubernetes manifest for "io.k8s.api.networking.v1.Ingress". +// +// This can be used to inline resource manifests inside other objects (e.g. as templates). +func KubeIngress_Manifest(props *KubeIngressProps) interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "k8s.KubeIngress", + "manifest", + []interface{}{props}, + &returns, + ) + + return returns +} + +// Returns the `ApiObject` named `Resource` which is a child of the given construct. +// +// If `c` is an `ApiObject`, it is returned directly. Throws an +// exception if the construct does not have a child named `Default` _or_ if +// this child is not an `ApiObject`. +func KubeIngress_Of(c constructs.IConstruct) cdk8s.ApiObject { + _init_.Initialize() + + var returns cdk8s.ApiObject + + _jsii_.StaticInvoke( + "k8s.KubeIngress", + "of", + []interface{}{c}, + &returns, + ) + + return returns +} + +func KubeIngress_GVK() *cdk8s.GroupVersionKind { + _init_.Initialize() + var returns *cdk8s.GroupVersionKind + _jsii_.StaticGet( + "k8s.KubeIngress", + "GVK", + &returns, + ) + return returns +} + +func (k *jsiiProxy_KubeIngress) AddDependency(dependencies ...constructs.IConstruct) { + args := []interface{}{} + for _, a := range dependencies { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addDependency", + args, + ) +} + +func (k *jsiiProxy_KubeIngress) AddJsonPatch(ops ...cdk8s.JsonPatch) { + args := []interface{}{} + for _, a := range ops { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addJsonPatch", + args, + ) +} + +func (k *jsiiProxy_KubeIngress) ToJson() interface{} { + var returns interface{} + + _jsii_.Invoke( + k, + "toJson", + nil, // no parameters + &returns, + ) + + return returns +} + +func (k *jsiiProxy_KubeIngress) ToString() *string { + var returns *string + + _jsii_.Invoke( + k, + "toString", + nil, // no parameters + &returns, + ) + + return returns +} + +// IngressClass represents the class of the Ingress, referenced by the Ingress Spec. +// +// The `ingressclass.kubernetes.io/is-default-class` annotation can be used to indicate that an IngressClass should be considered default. When a single IngressClass resource has this annotation set to true, new Ingress resources without a class specified will be assigned this default class. +type KubeIngressClass interface { + cdk8s.ApiObject + // The group portion of the API version (e.g. `authorization.k8s.io`). + ApiGroup() *string + // The object's API version (e.g. `authorization.k8s.io/v1`). + ApiVersion() *string + // The chart in which this object is defined. + Chart() cdk8s.Chart + // The object kind. + Kind() *string + // Metadata associated with this API object. + Metadata() cdk8s.ApiObjectMetadataDefinition + // The name of the API object. + // + // If a name is specified in `metadata.name` this will be the name returned. + // Otherwise, a name will be generated by calling + // `AddHelm.of(this).generatedObjectName(this)`, which by default uses the + // construct path to generate a DNS-compatible name for the resource. + Name() *string + // The tree node. + Node() constructs.Node + // Create a dependency between this ApiObject and other constructs. + // + // These can be other ApiObjects, Charts, or custom. + AddDependency(dependencies ...constructs.IConstruct) + // Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. + // + // Example: + // kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true)); + // + AddJsonPatch(ops ...cdk8s.JsonPatch) + // Renders the object to Kubernetes JSON. + ToJson() interface{} + // Returns a string representation of this construct. + ToString() *string +} + +// The jsii proxy struct for KubeIngressClass +type jsiiProxy_KubeIngressClass struct { + internal.Type__cdk8sApiObject +} + +func (j *jsiiProxy_KubeIngressClass) ApiGroup() *string { + var returns *string + _jsii_.Get( + j, + "apiGroup", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeIngressClass) ApiVersion() *string { + var returns *string + _jsii_.Get( + j, + "apiVersion", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeIngressClass) Chart() cdk8s.Chart { + var returns cdk8s.Chart + _jsii_.Get( + j, + "chart", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeIngressClass) Kind() *string { + var returns *string + _jsii_.Get( + j, + "kind", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeIngressClass) Metadata() cdk8s.ApiObjectMetadataDefinition { + var returns cdk8s.ApiObjectMetadataDefinition + _jsii_.Get( + j, + "metadata", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeIngressClass) Name() *string { + var returns *string + _jsii_.Get( + j, + "name", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeIngressClass) Node() constructs.Node { + var returns constructs.Node + _jsii_.Get( + j, + "node", + &returns, + ) + return returns +} + +// Defines a "io.k8s.api.networking.v1.IngressClass" API object. +func NewKubeIngressClass(scope constructs.Construct, id *string, props *KubeIngressClassProps) KubeIngressClass { + _init_.Initialize() + + j := jsiiProxy_KubeIngressClass{} + + _jsii_.Create( + "k8s.KubeIngressClass", + []interface{}{scope, id, props}, + &j, + ) + + return &j +} + +// Defines a "io.k8s.api.networking.v1.IngressClass" API object. +func NewKubeIngressClass_Override(k KubeIngressClass, scope constructs.Construct, id *string, props *KubeIngressClassProps) { + _init_.Initialize() + + _jsii_.Create( + "k8s.KubeIngressClass", + []interface{}{scope, id, props}, + k, + ) +} + +// Checks if `x` is a construct. +// +// Use this method instead of `instanceof` to properly detect `Construct` +// instances, even when the construct library is symlinked. +// +// Explanation: in JavaScript, multiple copies of the `constructs` library on +// disk are seen as independent, completely different libraries. As a +// consequence, the class `Construct` in each copy of the `constructs` library +// is seen as a different class, and an instance of one class will not test as +// `instanceof` the other class. `npm install` will not create installations +// like this, but users may manually symlink construct libraries together or +// use a monorepo tool: in those cases, multiple copies of the `constructs` +// library can be accidentally installed, and `instanceof` will behave +// unpredictably. It is safest to avoid using `instanceof`, and using +// this type-testing method instead. +// +// Returns: true if `x` is an object created from a class which extends `Construct`. +func KubeIngressClass_IsConstruct(x interface{}) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "k8s.KubeIngressClass", + "isConstruct", + []interface{}{x}, + &returns, + ) + + return returns +} + +// Renders a Kubernetes manifest for "io.k8s.api.networking.v1.IngressClass". +// +// This can be used to inline resource manifests inside other objects (e.g. as templates). +func KubeIngressClass_Manifest(props *KubeIngressClassProps) interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "k8s.KubeIngressClass", + "manifest", + []interface{}{props}, + &returns, + ) + + return returns +} + +// Returns the `ApiObject` named `Resource` which is a child of the given construct. +// +// If `c` is an `ApiObject`, it is returned directly. Throws an +// exception if the construct does not have a child named `Default` _or_ if +// this child is not an `ApiObject`. +func KubeIngressClass_Of(c constructs.IConstruct) cdk8s.ApiObject { + _init_.Initialize() + + var returns cdk8s.ApiObject + + _jsii_.StaticInvoke( + "k8s.KubeIngressClass", + "of", + []interface{}{c}, + &returns, + ) + + return returns +} + +func KubeIngressClass_GVK() *cdk8s.GroupVersionKind { + _init_.Initialize() + var returns *cdk8s.GroupVersionKind + _jsii_.StaticGet( + "k8s.KubeIngressClass", + "GVK", + &returns, + ) + return returns +} + +func (k *jsiiProxy_KubeIngressClass) AddDependency(dependencies ...constructs.IConstruct) { + args := []interface{}{} + for _, a := range dependencies { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addDependency", + args, + ) +} + +func (k *jsiiProxy_KubeIngressClass) AddJsonPatch(ops ...cdk8s.JsonPatch) { + args := []interface{}{} + for _, a := range ops { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addJsonPatch", + args, + ) +} + +func (k *jsiiProxy_KubeIngressClass) ToJson() interface{} { + var returns interface{} + + _jsii_.Invoke( + k, + "toJson", + nil, // no parameters + &returns, + ) + + return returns +} + +func (k *jsiiProxy_KubeIngressClass) ToString() *string { + var returns *string + + _jsii_.Invoke( + k, + "toString", + nil, // no parameters + &returns, + ) + + return returns +} + +// IngressClassList is a collection of IngressClasses. +type KubeIngressClassList interface { + cdk8s.ApiObject + // The group portion of the API version (e.g. `authorization.k8s.io`). + ApiGroup() *string + // The object's API version (e.g. `authorization.k8s.io/v1`). + ApiVersion() *string + // The chart in which this object is defined. + Chart() cdk8s.Chart + // The object kind. + Kind() *string + // Metadata associated with this API object. + Metadata() cdk8s.ApiObjectMetadataDefinition + // The name of the API object. + // + // If a name is specified in `metadata.name` this will be the name returned. + // Otherwise, a name will be generated by calling + // `AddHelm.of(this).generatedObjectName(this)`, which by default uses the + // construct path to generate a DNS-compatible name for the resource. + Name() *string + // The tree node. + Node() constructs.Node + // Create a dependency between this ApiObject and other constructs. + // + // These can be other ApiObjects, Charts, or custom. + AddDependency(dependencies ...constructs.IConstruct) + // Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. + // + // Example: + // kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true)); + // + AddJsonPatch(ops ...cdk8s.JsonPatch) + // Renders the object to Kubernetes JSON. + ToJson() interface{} + // Returns a string representation of this construct. + ToString() *string +} + +// The jsii proxy struct for KubeIngressClassList +type jsiiProxy_KubeIngressClassList struct { + internal.Type__cdk8sApiObject +} + +func (j *jsiiProxy_KubeIngressClassList) ApiGroup() *string { + var returns *string + _jsii_.Get( + j, + "apiGroup", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeIngressClassList) ApiVersion() *string { + var returns *string + _jsii_.Get( + j, + "apiVersion", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeIngressClassList) Chart() cdk8s.Chart { + var returns cdk8s.Chart + _jsii_.Get( + j, + "chart", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeIngressClassList) Kind() *string { + var returns *string + _jsii_.Get( + j, + "kind", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeIngressClassList) Metadata() cdk8s.ApiObjectMetadataDefinition { + var returns cdk8s.ApiObjectMetadataDefinition + _jsii_.Get( + j, + "metadata", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeIngressClassList) Name() *string { + var returns *string + _jsii_.Get( + j, + "name", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeIngressClassList) Node() constructs.Node { + var returns constructs.Node + _jsii_.Get( + j, + "node", + &returns, + ) + return returns +} + +// Defines a "io.k8s.api.networking.v1.IngressClassList" API object. +func NewKubeIngressClassList(scope constructs.Construct, id *string, props *KubeIngressClassListProps) KubeIngressClassList { + _init_.Initialize() + + j := jsiiProxy_KubeIngressClassList{} + + _jsii_.Create( + "k8s.KubeIngressClassList", + []interface{}{scope, id, props}, + &j, + ) + + return &j +} + +// Defines a "io.k8s.api.networking.v1.IngressClassList" API object. +func NewKubeIngressClassList_Override(k KubeIngressClassList, scope constructs.Construct, id *string, props *KubeIngressClassListProps) { + _init_.Initialize() + + _jsii_.Create( + "k8s.KubeIngressClassList", + []interface{}{scope, id, props}, + k, + ) +} + +// Checks if `x` is a construct. +// +// Use this method instead of `instanceof` to properly detect `Construct` +// instances, even when the construct library is symlinked. +// +// Explanation: in JavaScript, multiple copies of the `constructs` library on +// disk are seen as independent, completely different libraries. As a +// consequence, the class `Construct` in each copy of the `constructs` library +// is seen as a different class, and an instance of one class will not test as +// `instanceof` the other class. `npm install` will not create installations +// like this, but users may manually symlink construct libraries together or +// use a monorepo tool: in those cases, multiple copies of the `constructs` +// library can be accidentally installed, and `instanceof` will behave +// unpredictably. It is safest to avoid using `instanceof`, and using +// this type-testing method instead. +// +// Returns: true if `x` is an object created from a class which extends `Construct`. +func KubeIngressClassList_IsConstruct(x interface{}) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "k8s.KubeIngressClassList", + "isConstruct", + []interface{}{x}, + &returns, + ) + + return returns +} + +// Renders a Kubernetes manifest for "io.k8s.api.networking.v1.IngressClassList". +// +// This can be used to inline resource manifests inside other objects (e.g. as templates). +func KubeIngressClassList_Manifest(props *KubeIngressClassListProps) interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "k8s.KubeIngressClassList", + "manifest", + []interface{}{props}, + &returns, + ) + + return returns +} + +// Returns the `ApiObject` named `Resource` which is a child of the given construct. +// +// If `c` is an `ApiObject`, it is returned directly. Throws an +// exception if the construct does not have a child named `Default` _or_ if +// this child is not an `ApiObject`. +func KubeIngressClassList_Of(c constructs.IConstruct) cdk8s.ApiObject { + _init_.Initialize() + + var returns cdk8s.ApiObject + + _jsii_.StaticInvoke( + "k8s.KubeIngressClassList", + "of", + []interface{}{c}, + &returns, + ) + + return returns +} + +func KubeIngressClassList_GVK() *cdk8s.GroupVersionKind { + _init_.Initialize() + var returns *cdk8s.GroupVersionKind + _jsii_.StaticGet( + "k8s.KubeIngressClassList", + "GVK", + &returns, + ) + return returns +} + +func (k *jsiiProxy_KubeIngressClassList) AddDependency(dependencies ...constructs.IConstruct) { + args := []interface{}{} + for _, a := range dependencies { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addDependency", + args, + ) +} + +func (k *jsiiProxy_KubeIngressClassList) AddJsonPatch(ops ...cdk8s.JsonPatch) { + args := []interface{}{} + for _, a := range ops { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addJsonPatch", + args, + ) +} + +func (k *jsiiProxy_KubeIngressClassList) ToJson() interface{} { + var returns interface{} + + _jsii_.Invoke( + k, + "toJson", + nil, // no parameters + &returns, + ) + + return returns +} + +func (k *jsiiProxy_KubeIngressClassList) ToString() *string { + var returns *string + + _jsii_.Invoke( + k, + "toString", + nil, // no parameters + &returns, + ) + + return returns +} + +// IngressClassList is a collection of IngressClasses. +type KubeIngressClassListProps struct { + // Items is the list of IngressClasses. + Items *[]*KubeIngressClassProps `field:"required" json:"items" yaml:"items"` + // Standard list metadata. + Metadata *ListMeta `field:"optional" json:"metadata" yaml:"metadata"` +} + +// IngressClass represents the class of the Ingress, referenced by the Ingress Spec. +// +// The `ingressclass.kubernetes.io/is-default-class` annotation can be used to indicate that an IngressClass should be considered default. When a single IngressClass resource has this annotation set to true, new Ingress resources without a class specified will be assigned this default class. +type KubeIngressClassProps struct { + // Standard object's metadata. + // + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + Metadata *ObjectMeta `field:"optional" json:"metadata" yaml:"metadata"` + // Spec is the desired state of the IngressClass. + // + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + Spec *IngressClassSpec `field:"optional" json:"spec" yaml:"spec"` +} + +// IngressList is a collection of Ingress. +type KubeIngressList interface { + cdk8s.ApiObject + // The group portion of the API version (e.g. `authorization.k8s.io`). + ApiGroup() *string + // The object's API version (e.g. `authorization.k8s.io/v1`). + ApiVersion() *string + // The chart in which this object is defined. + Chart() cdk8s.Chart + // The object kind. + Kind() *string + // Metadata associated with this API object. + Metadata() cdk8s.ApiObjectMetadataDefinition + // The name of the API object. + // + // If a name is specified in `metadata.name` this will be the name returned. + // Otherwise, a name will be generated by calling + // `AddHelm.of(this).generatedObjectName(this)`, which by default uses the + // construct path to generate a DNS-compatible name for the resource. + Name() *string + // The tree node. + Node() constructs.Node + // Create a dependency between this ApiObject and other constructs. + // + // These can be other ApiObjects, Charts, or custom. + AddDependency(dependencies ...constructs.IConstruct) + // Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. + // + // Example: + // kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true)); + // + AddJsonPatch(ops ...cdk8s.JsonPatch) + // Renders the object to Kubernetes JSON. + ToJson() interface{} + // Returns a string representation of this construct. + ToString() *string +} + +// The jsii proxy struct for KubeIngressList +type jsiiProxy_KubeIngressList struct { + internal.Type__cdk8sApiObject +} + +func (j *jsiiProxy_KubeIngressList) ApiGroup() *string { + var returns *string + _jsii_.Get( + j, + "apiGroup", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeIngressList) ApiVersion() *string { + var returns *string + _jsii_.Get( + j, + "apiVersion", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeIngressList) Chart() cdk8s.Chart { + var returns cdk8s.Chart + _jsii_.Get( + j, + "chart", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeIngressList) Kind() *string { + var returns *string + _jsii_.Get( + j, + "kind", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeIngressList) Metadata() cdk8s.ApiObjectMetadataDefinition { + var returns cdk8s.ApiObjectMetadataDefinition + _jsii_.Get( + j, + "metadata", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeIngressList) Name() *string { + var returns *string + _jsii_.Get( + j, + "name", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeIngressList) Node() constructs.Node { + var returns constructs.Node + _jsii_.Get( + j, + "node", + &returns, + ) + return returns +} + +// Defines a "io.k8s.api.networking.v1.IngressList" API object. +func NewKubeIngressList(scope constructs.Construct, id *string, props *KubeIngressListProps) KubeIngressList { + _init_.Initialize() + + j := jsiiProxy_KubeIngressList{} + + _jsii_.Create( + "k8s.KubeIngressList", + []interface{}{scope, id, props}, + &j, + ) + + return &j +} + +// Defines a "io.k8s.api.networking.v1.IngressList" API object. +func NewKubeIngressList_Override(k KubeIngressList, scope constructs.Construct, id *string, props *KubeIngressListProps) { + _init_.Initialize() + + _jsii_.Create( + "k8s.KubeIngressList", + []interface{}{scope, id, props}, + k, + ) +} + +// Checks if `x` is a construct. +// +// Use this method instead of `instanceof` to properly detect `Construct` +// instances, even when the construct library is symlinked. +// +// Explanation: in JavaScript, multiple copies of the `constructs` library on +// disk are seen as independent, completely different libraries. As a +// consequence, the class `Construct` in each copy of the `constructs` library +// is seen as a different class, and an instance of one class will not test as +// `instanceof` the other class. `npm install` will not create installations +// like this, but users may manually symlink construct libraries together or +// use a monorepo tool: in those cases, multiple copies of the `constructs` +// library can be accidentally installed, and `instanceof` will behave +// unpredictably. It is safest to avoid using `instanceof`, and using +// this type-testing method instead. +// +// Returns: true if `x` is an object created from a class which extends `Construct`. +func KubeIngressList_IsConstruct(x interface{}) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "k8s.KubeIngressList", + "isConstruct", + []interface{}{x}, + &returns, + ) + + return returns +} + +// Renders a Kubernetes manifest for "io.k8s.api.networking.v1.IngressList". +// +// This can be used to inline resource manifests inside other objects (e.g. as templates). +func KubeIngressList_Manifest(props *KubeIngressListProps) interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "k8s.KubeIngressList", + "manifest", + []interface{}{props}, + &returns, + ) + + return returns +} + +// Returns the `ApiObject` named `Resource` which is a child of the given construct. +// +// If `c` is an `ApiObject`, it is returned directly. Throws an +// exception if the construct does not have a child named `Default` _or_ if +// this child is not an `ApiObject`. +func KubeIngressList_Of(c constructs.IConstruct) cdk8s.ApiObject { + _init_.Initialize() + + var returns cdk8s.ApiObject + + _jsii_.StaticInvoke( + "k8s.KubeIngressList", + "of", + []interface{}{c}, + &returns, + ) + + return returns +} + +func KubeIngressList_GVK() *cdk8s.GroupVersionKind { + _init_.Initialize() + var returns *cdk8s.GroupVersionKind + _jsii_.StaticGet( + "k8s.KubeIngressList", + "GVK", + &returns, + ) + return returns +} + +func (k *jsiiProxy_KubeIngressList) AddDependency(dependencies ...constructs.IConstruct) { + args := []interface{}{} + for _, a := range dependencies { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addDependency", + args, + ) +} + +func (k *jsiiProxy_KubeIngressList) AddJsonPatch(ops ...cdk8s.JsonPatch) { + args := []interface{}{} + for _, a := range ops { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addJsonPatch", + args, + ) +} + +func (k *jsiiProxy_KubeIngressList) ToJson() interface{} { + var returns interface{} + + _jsii_.Invoke( + k, + "toJson", + nil, // no parameters + &returns, + ) + + return returns +} + +func (k *jsiiProxy_KubeIngressList) ToString() *string { + var returns *string + + _jsii_.Invoke( + k, + "toString", + nil, // no parameters + &returns, + ) + + return returns +} + +// IngressList is a collection of Ingress. +type KubeIngressListProps struct { + // Items is the list of Ingress. + Items *[]*KubeIngressProps `field:"required" json:"items" yaml:"items"` + // Standard object's metadata. + // + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + Metadata *ListMeta `field:"optional" json:"metadata" yaml:"metadata"` +} + +// Ingress is a collection of rules that allow inbound connections to reach the endpoints defined by a backend. +// +// An Ingress can be configured to give services externally-reachable urls, load balance traffic, terminate SSL, offer name based virtual hosting etc. +type KubeIngressProps struct { + // Standard object's metadata. + // + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + Metadata *ObjectMeta `field:"optional" json:"metadata" yaml:"metadata"` + // Spec is the desired state of the Ingress. + // + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + Spec *IngressSpec `field:"optional" json:"spec" yaml:"spec"` +} + +// Job represents the configuration of a single job. +type KubeJob interface { + cdk8s.ApiObject + // The group portion of the API version (e.g. `authorization.k8s.io`). + ApiGroup() *string + // The object's API version (e.g. `authorization.k8s.io/v1`). + ApiVersion() *string + // The chart in which this object is defined. + Chart() cdk8s.Chart + // The object kind. + Kind() *string + // Metadata associated with this API object. + Metadata() cdk8s.ApiObjectMetadataDefinition + // The name of the API object. + // + // If a name is specified in `metadata.name` this will be the name returned. + // Otherwise, a name will be generated by calling + // `AddHelm.of(this).generatedObjectName(this)`, which by default uses the + // construct path to generate a DNS-compatible name for the resource. + Name() *string + // The tree node. + Node() constructs.Node + // Create a dependency between this ApiObject and other constructs. + // + // These can be other ApiObjects, Charts, or custom. + AddDependency(dependencies ...constructs.IConstruct) + // Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. + // + // Example: + // kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true)); + // + AddJsonPatch(ops ...cdk8s.JsonPatch) + // Renders the object to Kubernetes JSON. + ToJson() interface{} + // Returns a string representation of this construct. + ToString() *string +} + +// The jsii proxy struct for KubeJob +type jsiiProxy_KubeJob struct { + internal.Type__cdk8sApiObject +} + +func (j *jsiiProxy_KubeJob) ApiGroup() *string { + var returns *string + _jsii_.Get( + j, + "apiGroup", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeJob) ApiVersion() *string { + var returns *string + _jsii_.Get( + j, + "apiVersion", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeJob) Chart() cdk8s.Chart { + var returns cdk8s.Chart + _jsii_.Get( + j, + "chart", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeJob) Kind() *string { + var returns *string + _jsii_.Get( + j, + "kind", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeJob) Metadata() cdk8s.ApiObjectMetadataDefinition { + var returns cdk8s.ApiObjectMetadataDefinition + _jsii_.Get( + j, + "metadata", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeJob) Name() *string { + var returns *string + _jsii_.Get( + j, + "name", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeJob) Node() constructs.Node { + var returns constructs.Node + _jsii_.Get( + j, + "node", + &returns, + ) + return returns +} + +// Defines a "io.k8s.api.batch.v1.Job" API object. +func NewKubeJob(scope constructs.Construct, id *string, props *KubeJobProps) KubeJob { + _init_.Initialize() + + j := jsiiProxy_KubeJob{} + + _jsii_.Create( + "k8s.KubeJob", + []interface{}{scope, id, props}, + &j, + ) + + return &j +} + +// Defines a "io.k8s.api.batch.v1.Job" API object. +func NewKubeJob_Override(k KubeJob, scope constructs.Construct, id *string, props *KubeJobProps) { + _init_.Initialize() + + _jsii_.Create( + "k8s.KubeJob", + []interface{}{scope, id, props}, + k, + ) +} + +// Checks if `x` is a construct. +// +// Use this method instead of `instanceof` to properly detect `Construct` +// instances, even when the construct library is symlinked. +// +// Explanation: in JavaScript, multiple copies of the `constructs` library on +// disk are seen as independent, completely different libraries. As a +// consequence, the class `Construct` in each copy of the `constructs` library +// is seen as a different class, and an instance of one class will not test as +// `instanceof` the other class. `npm install` will not create installations +// like this, but users may manually symlink construct libraries together or +// use a monorepo tool: in those cases, multiple copies of the `constructs` +// library can be accidentally installed, and `instanceof` will behave +// unpredictably. It is safest to avoid using `instanceof`, and using +// this type-testing method instead. +// +// Returns: true if `x` is an object created from a class which extends `Construct`. +func KubeJob_IsConstruct(x interface{}) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "k8s.KubeJob", + "isConstruct", + []interface{}{x}, + &returns, + ) + + return returns +} + +// Renders a Kubernetes manifest for "io.k8s.api.batch.v1.Job". +// +// This can be used to inline resource manifests inside other objects (e.g. as templates). +func KubeJob_Manifest(props *KubeJobProps) interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "k8s.KubeJob", + "manifest", + []interface{}{props}, + &returns, + ) + + return returns +} + +// Returns the `ApiObject` named `Resource` which is a child of the given construct. +// +// If `c` is an `ApiObject`, it is returned directly. Throws an +// exception if the construct does not have a child named `Default` _or_ if +// this child is not an `ApiObject`. +func KubeJob_Of(c constructs.IConstruct) cdk8s.ApiObject { + _init_.Initialize() + + var returns cdk8s.ApiObject + + _jsii_.StaticInvoke( + "k8s.KubeJob", + "of", + []interface{}{c}, + &returns, + ) + + return returns +} + +func KubeJob_GVK() *cdk8s.GroupVersionKind { + _init_.Initialize() + var returns *cdk8s.GroupVersionKind + _jsii_.StaticGet( + "k8s.KubeJob", + "GVK", + &returns, + ) + return returns +} + +func (k *jsiiProxy_KubeJob) AddDependency(dependencies ...constructs.IConstruct) { + args := []interface{}{} + for _, a := range dependencies { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addDependency", + args, + ) +} + +func (k *jsiiProxy_KubeJob) AddJsonPatch(ops ...cdk8s.JsonPatch) { + args := []interface{}{} + for _, a := range ops { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addJsonPatch", + args, + ) +} + +func (k *jsiiProxy_KubeJob) ToJson() interface{} { + var returns interface{} + + _jsii_.Invoke( + k, + "toJson", + nil, // no parameters + &returns, + ) + + return returns +} + +func (k *jsiiProxy_KubeJob) ToString() *string { + var returns *string + + _jsii_.Invoke( + k, + "toString", + nil, // no parameters + &returns, + ) + + return returns +} + +// JobList is a collection of jobs. +type KubeJobList interface { + cdk8s.ApiObject + // The group portion of the API version (e.g. `authorization.k8s.io`). + ApiGroup() *string + // The object's API version (e.g. `authorization.k8s.io/v1`). + ApiVersion() *string + // The chart in which this object is defined. + Chart() cdk8s.Chart + // The object kind. + Kind() *string + // Metadata associated with this API object. + Metadata() cdk8s.ApiObjectMetadataDefinition + // The name of the API object. + // + // If a name is specified in `metadata.name` this will be the name returned. + // Otherwise, a name will be generated by calling + // `AddHelm.of(this).generatedObjectName(this)`, which by default uses the + // construct path to generate a DNS-compatible name for the resource. + Name() *string + // The tree node. + Node() constructs.Node + // Create a dependency between this ApiObject and other constructs. + // + // These can be other ApiObjects, Charts, or custom. + AddDependency(dependencies ...constructs.IConstruct) + // Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. + // + // Example: + // kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true)); + // + AddJsonPatch(ops ...cdk8s.JsonPatch) + // Renders the object to Kubernetes JSON. + ToJson() interface{} + // Returns a string representation of this construct. + ToString() *string +} + +// The jsii proxy struct for KubeJobList +type jsiiProxy_KubeJobList struct { + internal.Type__cdk8sApiObject +} + +func (j *jsiiProxy_KubeJobList) ApiGroup() *string { + var returns *string + _jsii_.Get( + j, + "apiGroup", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeJobList) ApiVersion() *string { + var returns *string + _jsii_.Get( + j, + "apiVersion", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeJobList) Chart() cdk8s.Chart { + var returns cdk8s.Chart + _jsii_.Get( + j, + "chart", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeJobList) Kind() *string { + var returns *string + _jsii_.Get( + j, + "kind", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeJobList) Metadata() cdk8s.ApiObjectMetadataDefinition { + var returns cdk8s.ApiObjectMetadataDefinition + _jsii_.Get( + j, + "metadata", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeJobList) Name() *string { + var returns *string + _jsii_.Get( + j, + "name", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeJobList) Node() constructs.Node { + var returns constructs.Node + _jsii_.Get( + j, + "node", + &returns, + ) + return returns +} + +// Defines a "io.k8s.api.batch.v1.JobList" API object. +func NewKubeJobList(scope constructs.Construct, id *string, props *KubeJobListProps) KubeJobList { + _init_.Initialize() + + j := jsiiProxy_KubeJobList{} + + _jsii_.Create( + "k8s.KubeJobList", + []interface{}{scope, id, props}, + &j, + ) + + return &j +} + +// Defines a "io.k8s.api.batch.v1.JobList" API object. +func NewKubeJobList_Override(k KubeJobList, scope constructs.Construct, id *string, props *KubeJobListProps) { + _init_.Initialize() + + _jsii_.Create( + "k8s.KubeJobList", + []interface{}{scope, id, props}, + k, + ) +} + +// Checks if `x` is a construct. +// +// Use this method instead of `instanceof` to properly detect `Construct` +// instances, even when the construct library is symlinked. +// +// Explanation: in JavaScript, multiple copies of the `constructs` library on +// disk are seen as independent, completely different libraries. As a +// consequence, the class `Construct` in each copy of the `constructs` library +// is seen as a different class, and an instance of one class will not test as +// `instanceof` the other class. `npm install` will not create installations +// like this, but users may manually symlink construct libraries together or +// use a monorepo tool: in those cases, multiple copies of the `constructs` +// library can be accidentally installed, and `instanceof` will behave +// unpredictably. It is safest to avoid using `instanceof`, and using +// this type-testing method instead. +// +// Returns: true if `x` is an object created from a class which extends `Construct`. +func KubeJobList_IsConstruct(x interface{}) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "k8s.KubeJobList", + "isConstruct", + []interface{}{x}, + &returns, + ) + + return returns +} + +// Renders a Kubernetes manifest for "io.k8s.api.batch.v1.JobList". +// +// This can be used to inline resource manifests inside other objects (e.g. as templates). +func KubeJobList_Manifest(props *KubeJobListProps) interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "k8s.KubeJobList", + "manifest", + []interface{}{props}, + &returns, + ) + + return returns +} + +// Returns the `ApiObject` named `Resource` which is a child of the given construct. +// +// If `c` is an `ApiObject`, it is returned directly. Throws an +// exception if the construct does not have a child named `Default` _or_ if +// this child is not an `ApiObject`. +func KubeJobList_Of(c constructs.IConstruct) cdk8s.ApiObject { + _init_.Initialize() + + var returns cdk8s.ApiObject + + _jsii_.StaticInvoke( + "k8s.KubeJobList", + "of", + []interface{}{c}, + &returns, + ) + + return returns +} + +func KubeJobList_GVK() *cdk8s.GroupVersionKind { + _init_.Initialize() + var returns *cdk8s.GroupVersionKind + _jsii_.StaticGet( + "k8s.KubeJobList", + "GVK", + &returns, + ) + return returns +} + +func (k *jsiiProxy_KubeJobList) AddDependency(dependencies ...constructs.IConstruct) { + args := []interface{}{} + for _, a := range dependencies { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addDependency", + args, + ) +} + +func (k *jsiiProxy_KubeJobList) AddJsonPatch(ops ...cdk8s.JsonPatch) { + args := []interface{}{} + for _, a := range ops { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addJsonPatch", + args, + ) +} + +func (k *jsiiProxy_KubeJobList) ToJson() interface{} { + var returns interface{} + + _jsii_.Invoke( + k, + "toJson", + nil, // no parameters + &returns, + ) + + return returns +} + +func (k *jsiiProxy_KubeJobList) ToString() *string { + var returns *string + + _jsii_.Invoke( + k, + "toString", + nil, // no parameters + &returns, + ) + + return returns +} + +// JobList is a collection of jobs. +type KubeJobListProps struct { + // items is the list of Jobs. + Items *[]*KubeJobProps `field:"required" json:"items" yaml:"items"` + // Standard list metadata. + // + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + Metadata *ListMeta `field:"optional" json:"metadata" yaml:"metadata"` +} + +// Job represents the configuration of a single job. +type KubeJobProps struct { + // Standard object's metadata. + // + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + Metadata *ObjectMeta `field:"optional" json:"metadata" yaml:"metadata"` + // Specification of the desired behavior of a job. + // + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + Spec *JobSpec `field:"optional" json:"spec" yaml:"spec"` +} + +// Lease defines a lease concept. +type KubeLease interface { + cdk8s.ApiObject + // The group portion of the API version (e.g. `authorization.k8s.io`). + ApiGroup() *string + // The object's API version (e.g. `authorization.k8s.io/v1`). + ApiVersion() *string + // The chart in which this object is defined. + Chart() cdk8s.Chart + // The object kind. + Kind() *string + // Metadata associated with this API object. + Metadata() cdk8s.ApiObjectMetadataDefinition + // The name of the API object. + // + // If a name is specified in `metadata.name` this will be the name returned. + // Otherwise, a name will be generated by calling + // `AddHelm.of(this).generatedObjectName(this)`, which by default uses the + // construct path to generate a DNS-compatible name for the resource. + Name() *string + // The tree node. + Node() constructs.Node + // Create a dependency between this ApiObject and other constructs. + // + // These can be other ApiObjects, Charts, or custom. + AddDependency(dependencies ...constructs.IConstruct) + // Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. + // + // Example: + // kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true)); + // + AddJsonPatch(ops ...cdk8s.JsonPatch) + // Renders the object to Kubernetes JSON. + ToJson() interface{} + // Returns a string representation of this construct. + ToString() *string +} + +// The jsii proxy struct for KubeLease +type jsiiProxy_KubeLease struct { + internal.Type__cdk8sApiObject +} + +func (j *jsiiProxy_KubeLease) ApiGroup() *string { + var returns *string + _jsii_.Get( + j, + "apiGroup", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeLease) ApiVersion() *string { + var returns *string + _jsii_.Get( + j, + "apiVersion", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeLease) Chart() cdk8s.Chart { + var returns cdk8s.Chart + _jsii_.Get( + j, + "chart", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeLease) Kind() *string { + var returns *string + _jsii_.Get( + j, + "kind", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeLease) Metadata() cdk8s.ApiObjectMetadataDefinition { + var returns cdk8s.ApiObjectMetadataDefinition + _jsii_.Get( + j, + "metadata", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeLease) Name() *string { + var returns *string + _jsii_.Get( + j, + "name", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeLease) Node() constructs.Node { + var returns constructs.Node + _jsii_.Get( + j, + "node", + &returns, + ) + return returns +} + +// Defines a "io.k8s.api.coordination.v1.Lease" API object. +func NewKubeLease(scope constructs.Construct, id *string, props *KubeLeaseProps) KubeLease { + _init_.Initialize() + + j := jsiiProxy_KubeLease{} + + _jsii_.Create( + "k8s.KubeLease", + []interface{}{scope, id, props}, + &j, + ) + + return &j +} + +// Defines a "io.k8s.api.coordination.v1.Lease" API object. +func NewKubeLease_Override(k KubeLease, scope constructs.Construct, id *string, props *KubeLeaseProps) { + _init_.Initialize() + + _jsii_.Create( + "k8s.KubeLease", + []interface{}{scope, id, props}, + k, + ) +} + +// Checks if `x` is a construct. +// +// Use this method instead of `instanceof` to properly detect `Construct` +// instances, even when the construct library is symlinked. +// +// Explanation: in JavaScript, multiple copies of the `constructs` library on +// disk are seen as independent, completely different libraries. As a +// consequence, the class `Construct` in each copy of the `constructs` library +// is seen as a different class, and an instance of one class will not test as +// `instanceof` the other class. `npm install` will not create installations +// like this, but users may manually symlink construct libraries together or +// use a monorepo tool: in those cases, multiple copies of the `constructs` +// library can be accidentally installed, and `instanceof` will behave +// unpredictably. It is safest to avoid using `instanceof`, and using +// this type-testing method instead. +// +// Returns: true if `x` is an object created from a class which extends `Construct`. +func KubeLease_IsConstruct(x interface{}) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "k8s.KubeLease", + "isConstruct", + []interface{}{x}, + &returns, + ) + + return returns +} + +// Renders a Kubernetes manifest for "io.k8s.api.coordination.v1.Lease". +// +// This can be used to inline resource manifests inside other objects (e.g. as templates). +func KubeLease_Manifest(props *KubeLeaseProps) interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "k8s.KubeLease", + "manifest", + []interface{}{props}, + &returns, + ) + + return returns +} + +// Returns the `ApiObject` named `Resource` which is a child of the given construct. +// +// If `c` is an `ApiObject`, it is returned directly. Throws an +// exception if the construct does not have a child named `Default` _or_ if +// this child is not an `ApiObject`. +func KubeLease_Of(c constructs.IConstruct) cdk8s.ApiObject { + _init_.Initialize() + + var returns cdk8s.ApiObject + + _jsii_.StaticInvoke( + "k8s.KubeLease", + "of", + []interface{}{c}, + &returns, + ) + + return returns +} + +func KubeLease_GVK() *cdk8s.GroupVersionKind { + _init_.Initialize() + var returns *cdk8s.GroupVersionKind + _jsii_.StaticGet( + "k8s.KubeLease", + "GVK", + &returns, + ) + return returns +} + +func (k *jsiiProxy_KubeLease) AddDependency(dependencies ...constructs.IConstruct) { + args := []interface{}{} + for _, a := range dependencies { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addDependency", + args, + ) +} + +func (k *jsiiProxy_KubeLease) AddJsonPatch(ops ...cdk8s.JsonPatch) { + args := []interface{}{} + for _, a := range ops { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addJsonPatch", + args, + ) +} + +func (k *jsiiProxy_KubeLease) ToJson() interface{} { + var returns interface{} + + _jsii_.Invoke( + k, + "toJson", + nil, // no parameters + &returns, + ) + + return returns +} + +func (k *jsiiProxy_KubeLease) ToString() *string { + var returns *string + + _jsii_.Invoke( + k, + "toString", + nil, // no parameters + &returns, + ) + + return returns +} + +// LeaseList is a list of Lease objects. +type KubeLeaseList interface { + cdk8s.ApiObject + // The group portion of the API version (e.g. `authorization.k8s.io`). + ApiGroup() *string + // The object's API version (e.g. `authorization.k8s.io/v1`). + ApiVersion() *string + // The chart in which this object is defined. + Chart() cdk8s.Chart + // The object kind. + Kind() *string + // Metadata associated with this API object. + Metadata() cdk8s.ApiObjectMetadataDefinition + // The name of the API object. + // + // If a name is specified in `metadata.name` this will be the name returned. + // Otherwise, a name will be generated by calling + // `AddHelm.of(this).generatedObjectName(this)`, which by default uses the + // construct path to generate a DNS-compatible name for the resource. + Name() *string + // The tree node. + Node() constructs.Node + // Create a dependency between this ApiObject and other constructs. + // + // These can be other ApiObjects, Charts, or custom. + AddDependency(dependencies ...constructs.IConstruct) + // Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. + // + // Example: + // kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true)); + // + AddJsonPatch(ops ...cdk8s.JsonPatch) + // Renders the object to Kubernetes JSON. + ToJson() interface{} + // Returns a string representation of this construct. + ToString() *string +} + +// The jsii proxy struct for KubeLeaseList +type jsiiProxy_KubeLeaseList struct { + internal.Type__cdk8sApiObject +} + +func (j *jsiiProxy_KubeLeaseList) ApiGroup() *string { + var returns *string + _jsii_.Get( + j, + "apiGroup", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeLeaseList) ApiVersion() *string { + var returns *string + _jsii_.Get( + j, + "apiVersion", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeLeaseList) Chart() cdk8s.Chart { + var returns cdk8s.Chart + _jsii_.Get( + j, + "chart", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeLeaseList) Kind() *string { + var returns *string + _jsii_.Get( + j, + "kind", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeLeaseList) Metadata() cdk8s.ApiObjectMetadataDefinition { + var returns cdk8s.ApiObjectMetadataDefinition + _jsii_.Get( + j, + "metadata", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeLeaseList) Name() *string { + var returns *string + _jsii_.Get( + j, + "name", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeLeaseList) Node() constructs.Node { + var returns constructs.Node + _jsii_.Get( + j, + "node", + &returns, + ) + return returns +} + +// Defines a "io.k8s.api.coordination.v1.LeaseList" API object. +func NewKubeLeaseList(scope constructs.Construct, id *string, props *KubeLeaseListProps) KubeLeaseList { + _init_.Initialize() + + j := jsiiProxy_KubeLeaseList{} + + _jsii_.Create( + "k8s.KubeLeaseList", + []interface{}{scope, id, props}, + &j, + ) + + return &j +} + +// Defines a "io.k8s.api.coordination.v1.LeaseList" API object. +func NewKubeLeaseList_Override(k KubeLeaseList, scope constructs.Construct, id *string, props *KubeLeaseListProps) { + _init_.Initialize() + + _jsii_.Create( + "k8s.KubeLeaseList", + []interface{}{scope, id, props}, + k, + ) +} + +// Checks if `x` is a construct. +// +// Use this method instead of `instanceof` to properly detect `Construct` +// instances, even when the construct library is symlinked. +// +// Explanation: in JavaScript, multiple copies of the `constructs` library on +// disk are seen as independent, completely different libraries. As a +// consequence, the class `Construct` in each copy of the `constructs` library +// is seen as a different class, and an instance of one class will not test as +// `instanceof` the other class. `npm install` will not create installations +// like this, but users may manually symlink construct libraries together or +// use a monorepo tool: in those cases, multiple copies of the `constructs` +// library can be accidentally installed, and `instanceof` will behave +// unpredictably. It is safest to avoid using `instanceof`, and using +// this type-testing method instead. +// +// Returns: true if `x` is an object created from a class which extends `Construct`. +func KubeLeaseList_IsConstruct(x interface{}) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "k8s.KubeLeaseList", + "isConstruct", + []interface{}{x}, + &returns, + ) + + return returns +} + +// Renders a Kubernetes manifest for "io.k8s.api.coordination.v1.LeaseList". +// +// This can be used to inline resource manifests inside other objects (e.g. as templates). +func KubeLeaseList_Manifest(props *KubeLeaseListProps) interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "k8s.KubeLeaseList", + "manifest", + []interface{}{props}, + &returns, + ) + + return returns +} + +// Returns the `ApiObject` named `Resource` which is a child of the given construct. +// +// If `c` is an `ApiObject`, it is returned directly. Throws an +// exception if the construct does not have a child named `Default` _or_ if +// this child is not an `ApiObject`. +func KubeLeaseList_Of(c constructs.IConstruct) cdk8s.ApiObject { + _init_.Initialize() + + var returns cdk8s.ApiObject + + _jsii_.StaticInvoke( + "k8s.KubeLeaseList", + "of", + []interface{}{c}, + &returns, + ) + + return returns +} + +func KubeLeaseList_GVK() *cdk8s.GroupVersionKind { + _init_.Initialize() + var returns *cdk8s.GroupVersionKind + _jsii_.StaticGet( + "k8s.KubeLeaseList", + "GVK", + &returns, + ) + return returns +} + +func (k *jsiiProxy_KubeLeaseList) AddDependency(dependencies ...constructs.IConstruct) { + args := []interface{}{} + for _, a := range dependencies { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addDependency", + args, + ) +} + +func (k *jsiiProxy_KubeLeaseList) AddJsonPatch(ops ...cdk8s.JsonPatch) { + args := []interface{}{} + for _, a := range ops { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addJsonPatch", + args, + ) +} + +func (k *jsiiProxy_KubeLeaseList) ToJson() interface{} { + var returns interface{} + + _jsii_.Invoke( + k, + "toJson", + nil, // no parameters + &returns, + ) + + return returns +} + +func (k *jsiiProxy_KubeLeaseList) ToString() *string { + var returns *string + + _jsii_.Invoke( + k, + "toString", + nil, // no parameters + &returns, + ) + + return returns +} + +// LeaseList is a list of Lease objects. +type KubeLeaseListProps struct { + // Items is a list of schema objects. + Items *[]*KubeLeaseProps `field:"required" json:"items" yaml:"items"` + // Standard list metadata. + // + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + Metadata *ListMeta `field:"optional" json:"metadata" yaml:"metadata"` +} + +// Lease defines a lease concept. +type KubeLeaseProps struct { + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata. + Metadata *ObjectMeta `field:"optional" json:"metadata" yaml:"metadata"` + // Specification of the Lease. + // + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + Spec *LeaseSpec `field:"optional" json:"spec" yaml:"spec"` +} + +// LimitRange sets resource usage limits for each kind of resource in a Namespace. +type KubeLimitRange interface { + cdk8s.ApiObject + // The group portion of the API version (e.g. `authorization.k8s.io`). + ApiGroup() *string + // The object's API version (e.g. `authorization.k8s.io/v1`). + ApiVersion() *string + // The chart in which this object is defined. + Chart() cdk8s.Chart + // The object kind. + Kind() *string + // Metadata associated with this API object. + Metadata() cdk8s.ApiObjectMetadataDefinition + // The name of the API object. + // + // If a name is specified in `metadata.name` this will be the name returned. + // Otherwise, a name will be generated by calling + // `AddHelm.of(this).generatedObjectName(this)`, which by default uses the + // construct path to generate a DNS-compatible name for the resource. + Name() *string + // The tree node. + Node() constructs.Node + // Create a dependency between this ApiObject and other constructs. + // + // These can be other ApiObjects, Charts, or custom. + AddDependency(dependencies ...constructs.IConstruct) + // Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. + // + // Example: + // kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true)); + // + AddJsonPatch(ops ...cdk8s.JsonPatch) + // Renders the object to Kubernetes JSON. + ToJson() interface{} + // Returns a string representation of this construct. + ToString() *string +} + +// The jsii proxy struct for KubeLimitRange +type jsiiProxy_KubeLimitRange struct { + internal.Type__cdk8sApiObject +} + +func (j *jsiiProxy_KubeLimitRange) ApiGroup() *string { + var returns *string + _jsii_.Get( + j, + "apiGroup", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeLimitRange) ApiVersion() *string { + var returns *string + _jsii_.Get( + j, + "apiVersion", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeLimitRange) Chart() cdk8s.Chart { + var returns cdk8s.Chart + _jsii_.Get( + j, + "chart", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeLimitRange) Kind() *string { + var returns *string + _jsii_.Get( + j, + "kind", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeLimitRange) Metadata() cdk8s.ApiObjectMetadataDefinition { + var returns cdk8s.ApiObjectMetadataDefinition + _jsii_.Get( + j, + "metadata", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeLimitRange) Name() *string { + var returns *string + _jsii_.Get( + j, + "name", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeLimitRange) Node() constructs.Node { + var returns constructs.Node + _jsii_.Get( + j, + "node", + &returns, + ) + return returns +} + +// Defines a "io.k8s.api.core.v1.LimitRange" API object. +func NewKubeLimitRange(scope constructs.Construct, id *string, props *KubeLimitRangeProps) KubeLimitRange { + _init_.Initialize() + + j := jsiiProxy_KubeLimitRange{} + + _jsii_.Create( + "k8s.KubeLimitRange", + []interface{}{scope, id, props}, + &j, + ) + + return &j +} + +// Defines a "io.k8s.api.core.v1.LimitRange" API object. +func NewKubeLimitRange_Override(k KubeLimitRange, scope constructs.Construct, id *string, props *KubeLimitRangeProps) { + _init_.Initialize() + + _jsii_.Create( + "k8s.KubeLimitRange", + []interface{}{scope, id, props}, + k, + ) +} + +// Checks if `x` is a construct. +// +// Use this method instead of `instanceof` to properly detect `Construct` +// instances, even when the construct library is symlinked. +// +// Explanation: in JavaScript, multiple copies of the `constructs` library on +// disk are seen as independent, completely different libraries. As a +// consequence, the class `Construct` in each copy of the `constructs` library +// is seen as a different class, and an instance of one class will not test as +// `instanceof` the other class. `npm install` will not create installations +// like this, but users may manually symlink construct libraries together or +// use a monorepo tool: in those cases, multiple copies of the `constructs` +// library can be accidentally installed, and `instanceof` will behave +// unpredictably. It is safest to avoid using `instanceof`, and using +// this type-testing method instead. +// +// Returns: true if `x` is an object created from a class which extends `Construct`. +func KubeLimitRange_IsConstruct(x interface{}) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "k8s.KubeLimitRange", + "isConstruct", + []interface{}{x}, + &returns, + ) + + return returns +} + +// Renders a Kubernetes manifest for "io.k8s.api.core.v1.LimitRange". +// +// This can be used to inline resource manifests inside other objects (e.g. as templates). +func KubeLimitRange_Manifest(props *KubeLimitRangeProps) interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "k8s.KubeLimitRange", + "manifest", + []interface{}{props}, + &returns, + ) + + return returns +} + +// Returns the `ApiObject` named `Resource` which is a child of the given construct. +// +// If `c` is an `ApiObject`, it is returned directly. Throws an +// exception if the construct does not have a child named `Default` _or_ if +// this child is not an `ApiObject`. +func KubeLimitRange_Of(c constructs.IConstruct) cdk8s.ApiObject { + _init_.Initialize() + + var returns cdk8s.ApiObject + + _jsii_.StaticInvoke( + "k8s.KubeLimitRange", + "of", + []interface{}{c}, + &returns, + ) + + return returns +} + +func KubeLimitRange_GVK() *cdk8s.GroupVersionKind { + _init_.Initialize() + var returns *cdk8s.GroupVersionKind + _jsii_.StaticGet( + "k8s.KubeLimitRange", + "GVK", + &returns, + ) + return returns +} + +func (k *jsiiProxy_KubeLimitRange) AddDependency(dependencies ...constructs.IConstruct) { + args := []interface{}{} + for _, a := range dependencies { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addDependency", + args, + ) +} + +func (k *jsiiProxy_KubeLimitRange) AddJsonPatch(ops ...cdk8s.JsonPatch) { + args := []interface{}{} + for _, a := range ops { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addJsonPatch", + args, + ) +} + +func (k *jsiiProxy_KubeLimitRange) ToJson() interface{} { + var returns interface{} + + _jsii_.Invoke( + k, + "toJson", + nil, // no parameters + &returns, + ) + + return returns +} + +func (k *jsiiProxy_KubeLimitRange) ToString() *string { + var returns *string + + _jsii_.Invoke( + k, + "toString", + nil, // no parameters + &returns, + ) + + return returns +} + +// LimitRangeList is a list of LimitRange items. +type KubeLimitRangeList interface { + cdk8s.ApiObject + // The group portion of the API version (e.g. `authorization.k8s.io`). + ApiGroup() *string + // The object's API version (e.g. `authorization.k8s.io/v1`). + ApiVersion() *string + // The chart in which this object is defined. + Chart() cdk8s.Chart + // The object kind. + Kind() *string + // Metadata associated with this API object. + Metadata() cdk8s.ApiObjectMetadataDefinition + // The name of the API object. + // + // If a name is specified in `metadata.name` this will be the name returned. + // Otherwise, a name will be generated by calling + // `AddHelm.of(this).generatedObjectName(this)`, which by default uses the + // construct path to generate a DNS-compatible name for the resource. + Name() *string + // The tree node. + Node() constructs.Node + // Create a dependency between this ApiObject and other constructs. + // + // These can be other ApiObjects, Charts, or custom. + AddDependency(dependencies ...constructs.IConstruct) + // Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. + // + // Example: + // kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true)); + // + AddJsonPatch(ops ...cdk8s.JsonPatch) + // Renders the object to Kubernetes JSON. + ToJson() interface{} + // Returns a string representation of this construct. + ToString() *string +} + +// The jsii proxy struct for KubeLimitRangeList +type jsiiProxy_KubeLimitRangeList struct { + internal.Type__cdk8sApiObject +} + +func (j *jsiiProxy_KubeLimitRangeList) ApiGroup() *string { + var returns *string + _jsii_.Get( + j, + "apiGroup", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeLimitRangeList) ApiVersion() *string { + var returns *string + _jsii_.Get( + j, + "apiVersion", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeLimitRangeList) Chart() cdk8s.Chart { + var returns cdk8s.Chart + _jsii_.Get( + j, + "chart", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeLimitRangeList) Kind() *string { + var returns *string + _jsii_.Get( + j, + "kind", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeLimitRangeList) Metadata() cdk8s.ApiObjectMetadataDefinition { + var returns cdk8s.ApiObjectMetadataDefinition + _jsii_.Get( + j, + "metadata", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeLimitRangeList) Name() *string { + var returns *string + _jsii_.Get( + j, + "name", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeLimitRangeList) Node() constructs.Node { + var returns constructs.Node + _jsii_.Get( + j, + "node", + &returns, + ) + return returns +} + +// Defines a "io.k8s.api.core.v1.LimitRangeList" API object. +func NewKubeLimitRangeList(scope constructs.Construct, id *string, props *KubeLimitRangeListProps) KubeLimitRangeList { + _init_.Initialize() + + j := jsiiProxy_KubeLimitRangeList{} + + _jsii_.Create( + "k8s.KubeLimitRangeList", + []interface{}{scope, id, props}, + &j, + ) + + return &j +} + +// Defines a "io.k8s.api.core.v1.LimitRangeList" API object. +func NewKubeLimitRangeList_Override(k KubeLimitRangeList, scope constructs.Construct, id *string, props *KubeLimitRangeListProps) { + _init_.Initialize() + + _jsii_.Create( + "k8s.KubeLimitRangeList", + []interface{}{scope, id, props}, + k, + ) +} + +// Checks if `x` is a construct. +// +// Use this method instead of `instanceof` to properly detect `Construct` +// instances, even when the construct library is symlinked. +// +// Explanation: in JavaScript, multiple copies of the `constructs` library on +// disk are seen as independent, completely different libraries. As a +// consequence, the class `Construct` in each copy of the `constructs` library +// is seen as a different class, and an instance of one class will not test as +// `instanceof` the other class. `npm install` will not create installations +// like this, but users may manually symlink construct libraries together or +// use a monorepo tool: in those cases, multiple copies of the `constructs` +// library can be accidentally installed, and `instanceof` will behave +// unpredictably. It is safest to avoid using `instanceof`, and using +// this type-testing method instead. +// +// Returns: true if `x` is an object created from a class which extends `Construct`. +func KubeLimitRangeList_IsConstruct(x interface{}) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "k8s.KubeLimitRangeList", + "isConstruct", + []interface{}{x}, + &returns, + ) + + return returns +} + +// Renders a Kubernetes manifest for "io.k8s.api.core.v1.LimitRangeList". +// +// This can be used to inline resource manifests inside other objects (e.g. as templates). +func KubeLimitRangeList_Manifest(props *KubeLimitRangeListProps) interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "k8s.KubeLimitRangeList", + "manifest", + []interface{}{props}, + &returns, + ) + + return returns +} + +// Returns the `ApiObject` named `Resource` which is a child of the given construct. +// +// If `c` is an `ApiObject`, it is returned directly. Throws an +// exception if the construct does not have a child named `Default` _or_ if +// this child is not an `ApiObject`. +func KubeLimitRangeList_Of(c constructs.IConstruct) cdk8s.ApiObject { + _init_.Initialize() + + var returns cdk8s.ApiObject + + _jsii_.StaticInvoke( + "k8s.KubeLimitRangeList", + "of", + []interface{}{c}, + &returns, + ) + + return returns +} + +func KubeLimitRangeList_GVK() *cdk8s.GroupVersionKind { + _init_.Initialize() + var returns *cdk8s.GroupVersionKind + _jsii_.StaticGet( + "k8s.KubeLimitRangeList", + "GVK", + &returns, + ) + return returns +} + +func (k *jsiiProxy_KubeLimitRangeList) AddDependency(dependencies ...constructs.IConstruct) { + args := []interface{}{} + for _, a := range dependencies { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addDependency", + args, + ) +} + +func (k *jsiiProxy_KubeLimitRangeList) AddJsonPatch(ops ...cdk8s.JsonPatch) { + args := []interface{}{} + for _, a := range ops { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addJsonPatch", + args, + ) +} + +func (k *jsiiProxy_KubeLimitRangeList) ToJson() interface{} { + var returns interface{} + + _jsii_.Invoke( + k, + "toJson", + nil, // no parameters + &returns, + ) + + return returns +} + +func (k *jsiiProxy_KubeLimitRangeList) ToString() *string { + var returns *string + + _jsii_.Invoke( + k, + "toString", + nil, // no parameters + &returns, + ) + + return returns +} + +// LimitRangeList is a list of LimitRange items. +type KubeLimitRangeListProps struct { + // Items is a list of LimitRange objects. + // + // More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + Items *[]*KubeLimitRangeProps `field:"required" json:"items" yaml:"items"` + // Standard list metadata. + // + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + Metadata *ListMeta `field:"optional" json:"metadata" yaml:"metadata"` +} + +// LimitRange sets resource usage limits for each kind of resource in a Namespace. +type KubeLimitRangeProps struct { + // Standard object's metadata. + // + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + Metadata *ObjectMeta `field:"optional" json:"metadata" yaml:"metadata"` + // Spec defines the limits enforced. + // + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + Spec *LimitRangeSpec `field:"optional" json:"spec" yaml:"spec"` +} + +// LocalSubjectAccessReview checks whether or not a user or group can perform an action in a given namespace. +// +// Having a namespace scoped resource makes it much easier to grant namespace scoped policy that includes permissions checking. +type KubeLocalSubjectAccessReview interface { + cdk8s.ApiObject + // The group portion of the API version (e.g. `authorization.k8s.io`). + ApiGroup() *string + // The object's API version (e.g. `authorization.k8s.io/v1`). + ApiVersion() *string + // The chart in which this object is defined. + Chart() cdk8s.Chart + // The object kind. + Kind() *string + // Metadata associated with this API object. + Metadata() cdk8s.ApiObjectMetadataDefinition + // The name of the API object. + // + // If a name is specified in `metadata.name` this will be the name returned. + // Otherwise, a name will be generated by calling + // `AddHelm.of(this).generatedObjectName(this)`, which by default uses the + // construct path to generate a DNS-compatible name for the resource. + Name() *string + // The tree node. + Node() constructs.Node + // Create a dependency between this ApiObject and other constructs. + // + // These can be other ApiObjects, Charts, or custom. + AddDependency(dependencies ...constructs.IConstruct) + // Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. + // + // Example: + // kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true)); + // + AddJsonPatch(ops ...cdk8s.JsonPatch) + // Renders the object to Kubernetes JSON. + ToJson() interface{} + // Returns a string representation of this construct. + ToString() *string +} + +// The jsii proxy struct for KubeLocalSubjectAccessReview +type jsiiProxy_KubeLocalSubjectAccessReview struct { + internal.Type__cdk8sApiObject +} + +func (j *jsiiProxy_KubeLocalSubjectAccessReview) ApiGroup() *string { + var returns *string + _jsii_.Get( + j, + "apiGroup", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeLocalSubjectAccessReview) ApiVersion() *string { + var returns *string + _jsii_.Get( + j, + "apiVersion", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeLocalSubjectAccessReview) Chart() cdk8s.Chart { + var returns cdk8s.Chart + _jsii_.Get( + j, + "chart", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeLocalSubjectAccessReview) Kind() *string { + var returns *string + _jsii_.Get( + j, + "kind", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeLocalSubjectAccessReview) Metadata() cdk8s.ApiObjectMetadataDefinition { + var returns cdk8s.ApiObjectMetadataDefinition + _jsii_.Get( + j, + "metadata", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeLocalSubjectAccessReview) Name() *string { + var returns *string + _jsii_.Get( + j, + "name", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeLocalSubjectAccessReview) Node() constructs.Node { + var returns constructs.Node + _jsii_.Get( + j, + "node", + &returns, + ) + return returns +} + +// Defines a "io.k8s.api.authorization.v1.LocalSubjectAccessReview" API object. +func NewKubeLocalSubjectAccessReview(scope constructs.Construct, id *string, props *KubeLocalSubjectAccessReviewProps) KubeLocalSubjectAccessReview { + _init_.Initialize() + + j := jsiiProxy_KubeLocalSubjectAccessReview{} + + _jsii_.Create( + "k8s.KubeLocalSubjectAccessReview", + []interface{}{scope, id, props}, + &j, + ) + + return &j +} + +// Defines a "io.k8s.api.authorization.v1.LocalSubjectAccessReview" API object. +func NewKubeLocalSubjectAccessReview_Override(k KubeLocalSubjectAccessReview, scope constructs.Construct, id *string, props *KubeLocalSubjectAccessReviewProps) { + _init_.Initialize() + + _jsii_.Create( + "k8s.KubeLocalSubjectAccessReview", + []interface{}{scope, id, props}, + k, + ) +} + +// Checks if `x` is a construct. +// +// Use this method instead of `instanceof` to properly detect `Construct` +// instances, even when the construct library is symlinked. +// +// Explanation: in JavaScript, multiple copies of the `constructs` library on +// disk are seen as independent, completely different libraries. As a +// consequence, the class `Construct` in each copy of the `constructs` library +// is seen as a different class, and an instance of one class will not test as +// `instanceof` the other class. `npm install` will not create installations +// like this, but users may manually symlink construct libraries together or +// use a monorepo tool: in those cases, multiple copies of the `constructs` +// library can be accidentally installed, and `instanceof` will behave +// unpredictably. It is safest to avoid using `instanceof`, and using +// this type-testing method instead. +// +// Returns: true if `x` is an object created from a class which extends `Construct`. +func KubeLocalSubjectAccessReview_IsConstruct(x interface{}) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "k8s.KubeLocalSubjectAccessReview", + "isConstruct", + []interface{}{x}, + &returns, + ) + + return returns +} + +// Renders a Kubernetes manifest for "io.k8s.api.authorization.v1.LocalSubjectAccessReview". +// +// This can be used to inline resource manifests inside other objects (e.g. as templates). +func KubeLocalSubjectAccessReview_Manifest(props *KubeLocalSubjectAccessReviewProps) interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "k8s.KubeLocalSubjectAccessReview", + "manifest", + []interface{}{props}, + &returns, + ) + + return returns +} + +// Returns the `ApiObject` named `Resource` which is a child of the given construct. +// +// If `c` is an `ApiObject`, it is returned directly. Throws an +// exception if the construct does not have a child named `Default` _or_ if +// this child is not an `ApiObject`. +func KubeLocalSubjectAccessReview_Of(c constructs.IConstruct) cdk8s.ApiObject { + _init_.Initialize() + + var returns cdk8s.ApiObject + + _jsii_.StaticInvoke( + "k8s.KubeLocalSubjectAccessReview", + "of", + []interface{}{c}, + &returns, + ) + + return returns +} + +func KubeLocalSubjectAccessReview_GVK() *cdk8s.GroupVersionKind { + _init_.Initialize() + var returns *cdk8s.GroupVersionKind + _jsii_.StaticGet( + "k8s.KubeLocalSubjectAccessReview", + "GVK", + &returns, + ) + return returns +} + +func (k *jsiiProxy_KubeLocalSubjectAccessReview) AddDependency(dependencies ...constructs.IConstruct) { + args := []interface{}{} + for _, a := range dependencies { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addDependency", + args, + ) +} + +func (k *jsiiProxy_KubeLocalSubjectAccessReview) AddJsonPatch(ops ...cdk8s.JsonPatch) { + args := []interface{}{} + for _, a := range ops { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addJsonPatch", + args, + ) +} + +func (k *jsiiProxy_KubeLocalSubjectAccessReview) ToJson() interface{} { + var returns interface{} + + _jsii_.Invoke( + k, + "toJson", + nil, // no parameters + &returns, + ) + + return returns +} + +func (k *jsiiProxy_KubeLocalSubjectAccessReview) ToString() *string { + var returns *string + + _jsii_.Invoke( + k, + "toString", + nil, // no parameters + &returns, + ) + + return returns +} + +// LocalSubjectAccessReview checks whether or not a user or group can perform an action in a given namespace. +// +// Having a namespace scoped resource makes it much easier to grant namespace scoped policy that includes permissions checking. +type KubeLocalSubjectAccessReviewProps struct { + // Spec holds information about the request being evaluated. + // + // spec.namespace must be equal to the namespace you made the request against. If empty, it is defaulted. + Spec *SubjectAccessReviewSpec `field:"required" json:"spec" yaml:"spec"` + // Standard list metadata. + // + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + Metadata *ObjectMeta `field:"optional" json:"metadata" yaml:"metadata"` +} + +// MutatingWebhookConfiguration describes the configuration of and admission webhook that accept or reject and may change the object. +type KubeMutatingWebhookConfiguration interface { + cdk8s.ApiObject + // The group portion of the API version (e.g. `authorization.k8s.io`). + ApiGroup() *string + // The object's API version (e.g. `authorization.k8s.io/v1`). + ApiVersion() *string + // The chart in which this object is defined. + Chart() cdk8s.Chart + // The object kind. + Kind() *string + // Metadata associated with this API object. + Metadata() cdk8s.ApiObjectMetadataDefinition + // The name of the API object. + // + // If a name is specified in `metadata.name` this will be the name returned. + // Otherwise, a name will be generated by calling + // `AddHelm.of(this).generatedObjectName(this)`, which by default uses the + // construct path to generate a DNS-compatible name for the resource. + Name() *string + // The tree node. + Node() constructs.Node + // Create a dependency between this ApiObject and other constructs. + // + // These can be other ApiObjects, Charts, or custom. + AddDependency(dependencies ...constructs.IConstruct) + // Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. + // + // Example: + // kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true)); + // + AddJsonPatch(ops ...cdk8s.JsonPatch) + // Renders the object to Kubernetes JSON. + ToJson() interface{} + // Returns a string representation of this construct. + ToString() *string +} + +// The jsii proxy struct for KubeMutatingWebhookConfiguration +type jsiiProxy_KubeMutatingWebhookConfiguration struct { + internal.Type__cdk8sApiObject +} + +func (j *jsiiProxy_KubeMutatingWebhookConfiguration) ApiGroup() *string { + var returns *string + _jsii_.Get( + j, + "apiGroup", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeMutatingWebhookConfiguration) ApiVersion() *string { + var returns *string + _jsii_.Get( + j, + "apiVersion", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeMutatingWebhookConfiguration) Chart() cdk8s.Chart { + var returns cdk8s.Chart + _jsii_.Get( + j, + "chart", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeMutatingWebhookConfiguration) Kind() *string { + var returns *string + _jsii_.Get( + j, + "kind", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeMutatingWebhookConfiguration) Metadata() cdk8s.ApiObjectMetadataDefinition { + var returns cdk8s.ApiObjectMetadataDefinition + _jsii_.Get( + j, + "metadata", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeMutatingWebhookConfiguration) Name() *string { + var returns *string + _jsii_.Get( + j, + "name", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeMutatingWebhookConfiguration) Node() constructs.Node { + var returns constructs.Node + _jsii_.Get( + j, + "node", + &returns, + ) + return returns +} + +// Defines a "io.k8s.api.admissionregistration.v1.MutatingWebhookConfiguration" API object. +func NewKubeMutatingWebhookConfiguration(scope constructs.Construct, id *string, props *KubeMutatingWebhookConfigurationProps) KubeMutatingWebhookConfiguration { + _init_.Initialize() + + j := jsiiProxy_KubeMutatingWebhookConfiguration{} + + _jsii_.Create( + "k8s.KubeMutatingWebhookConfiguration", + []interface{}{scope, id, props}, + &j, + ) + + return &j +} + +// Defines a "io.k8s.api.admissionregistration.v1.MutatingWebhookConfiguration" API object. +func NewKubeMutatingWebhookConfiguration_Override(k KubeMutatingWebhookConfiguration, scope constructs.Construct, id *string, props *KubeMutatingWebhookConfigurationProps) { + _init_.Initialize() + + _jsii_.Create( + "k8s.KubeMutatingWebhookConfiguration", + []interface{}{scope, id, props}, + k, + ) +} + +// Checks if `x` is a construct. +// +// Use this method instead of `instanceof` to properly detect `Construct` +// instances, even when the construct library is symlinked. +// +// Explanation: in JavaScript, multiple copies of the `constructs` library on +// disk are seen as independent, completely different libraries. As a +// consequence, the class `Construct` in each copy of the `constructs` library +// is seen as a different class, and an instance of one class will not test as +// `instanceof` the other class. `npm install` will not create installations +// like this, but users may manually symlink construct libraries together or +// use a monorepo tool: in those cases, multiple copies of the `constructs` +// library can be accidentally installed, and `instanceof` will behave +// unpredictably. It is safest to avoid using `instanceof`, and using +// this type-testing method instead. +// +// Returns: true if `x` is an object created from a class which extends `Construct`. +func KubeMutatingWebhookConfiguration_IsConstruct(x interface{}) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "k8s.KubeMutatingWebhookConfiguration", + "isConstruct", + []interface{}{x}, + &returns, + ) + + return returns +} + +// Renders a Kubernetes manifest for "io.k8s.api.admissionregistration.v1.MutatingWebhookConfiguration". +// +// This can be used to inline resource manifests inside other objects (e.g. as templates). +func KubeMutatingWebhookConfiguration_Manifest(props *KubeMutatingWebhookConfigurationProps) interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "k8s.KubeMutatingWebhookConfiguration", + "manifest", + []interface{}{props}, + &returns, + ) + + return returns +} + +// Returns the `ApiObject` named `Resource` which is a child of the given construct. +// +// If `c` is an `ApiObject`, it is returned directly. Throws an +// exception if the construct does not have a child named `Default` _or_ if +// this child is not an `ApiObject`. +func KubeMutatingWebhookConfiguration_Of(c constructs.IConstruct) cdk8s.ApiObject { + _init_.Initialize() + + var returns cdk8s.ApiObject + + _jsii_.StaticInvoke( + "k8s.KubeMutatingWebhookConfiguration", + "of", + []interface{}{c}, + &returns, + ) + + return returns +} + +func KubeMutatingWebhookConfiguration_GVK() *cdk8s.GroupVersionKind { + _init_.Initialize() + var returns *cdk8s.GroupVersionKind + _jsii_.StaticGet( + "k8s.KubeMutatingWebhookConfiguration", + "GVK", + &returns, + ) + return returns +} + +func (k *jsiiProxy_KubeMutatingWebhookConfiguration) AddDependency(dependencies ...constructs.IConstruct) { + args := []interface{}{} + for _, a := range dependencies { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addDependency", + args, + ) +} + +func (k *jsiiProxy_KubeMutatingWebhookConfiguration) AddJsonPatch(ops ...cdk8s.JsonPatch) { + args := []interface{}{} + for _, a := range ops { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addJsonPatch", + args, + ) +} + +func (k *jsiiProxy_KubeMutatingWebhookConfiguration) ToJson() interface{} { + var returns interface{} + + _jsii_.Invoke( + k, + "toJson", + nil, // no parameters + &returns, + ) + + return returns +} + +func (k *jsiiProxy_KubeMutatingWebhookConfiguration) ToString() *string { + var returns *string + + _jsii_.Invoke( + k, + "toString", + nil, // no parameters + &returns, + ) + + return returns +} + +// MutatingWebhookConfigurationList is a list of MutatingWebhookConfiguration. +type KubeMutatingWebhookConfigurationList interface { + cdk8s.ApiObject + // The group portion of the API version (e.g. `authorization.k8s.io`). + ApiGroup() *string + // The object's API version (e.g. `authorization.k8s.io/v1`). + ApiVersion() *string + // The chart in which this object is defined. + Chart() cdk8s.Chart + // The object kind. + Kind() *string + // Metadata associated with this API object. + Metadata() cdk8s.ApiObjectMetadataDefinition + // The name of the API object. + // + // If a name is specified in `metadata.name` this will be the name returned. + // Otherwise, a name will be generated by calling + // `AddHelm.of(this).generatedObjectName(this)`, which by default uses the + // construct path to generate a DNS-compatible name for the resource. + Name() *string + // The tree node. + Node() constructs.Node + // Create a dependency between this ApiObject and other constructs. + // + // These can be other ApiObjects, Charts, or custom. + AddDependency(dependencies ...constructs.IConstruct) + // Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. + // + // Example: + // kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true)); + // + AddJsonPatch(ops ...cdk8s.JsonPatch) + // Renders the object to Kubernetes JSON. + ToJson() interface{} + // Returns a string representation of this construct. + ToString() *string +} + +// The jsii proxy struct for KubeMutatingWebhookConfigurationList +type jsiiProxy_KubeMutatingWebhookConfigurationList struct { + internal.Type__cdk8sApiObject +} + +func (j *jsiiProxy_KubeMutatingWebhookConfigurationList) ApiGroup() *string { + var returns *string + _jsii_.Get( + j, + "apiGroup", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeMutatingWebhookConfigurationList) ApiVersion() *string { + var returns *string + _jsii_.Get( + j, + "apiVersion", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeMutatingWebhookConfigurationList) Chart() cdk8s.Chart { + var returns cdk8s.Chart + _jsii_.Get( + j, + "chart", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeMutatingWebhookConfigurationList) Kind() *string { + var returns *string + _jsii_.Get( + j, + "kind", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeMutatingWebhookConfigurationList) Metadata() cdk8s.ApiObjectMetadataDefinition { + var returns cdk8s.ApiObjectMetadataDefinition + _jsii_.Get( + j, + "metadata", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeMutatingWebhookConfigurationList) Name() *string { + var returns *string + _jsii_.Get( + j, + "name", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeMutatingWebhookConfigurationList) Node() constructs.Node { + var returns constructs.Node + _jsii_.Get( + j, + "node", + &returns, + ) + return returns +} + +// Defines a "io.k8s.api.admissionregistration.v1.MutatingWebhookConfigurationList" API object. +func NewKubeMutatingWebhookConfigurationList(scope constructs.Construct, id *string, props *KubeMutatingWebhookConfigurationListProps) KubeMutatingWebhookConfigurationList { + _init_.Initialize() + + j := jsiiProxy_KubeMutatingWebhookConfigurationList{} + + _jsii_.Create( + "k8s.KubeMutatingWebhookConfigurationList", + []interface{}{scope, id, props}, + &j, + ) + + return &j +} + +// Defines a "io.k8s.api.admissionregistration.v1.MutatingWebhookConfigurationList" API object. +func NewKubeMutatingWebhookConfigurationList_Override(k KubeMutatingWebhookConfigurationList, scope constructs.Construct, id *string, props *KubeMutatingWebhookConfigurationListProps) { + _init_.Initialize() + + _jsii_.Create( + "k8s.KubeMutatingWebhookConfigurationList", + []interface{}{scope, id, props}, + k, + ) +} + +// Checks if `x` is a construct. +// +// Use this method instead of `instanceof` to properly detect `Construct` +// instances, even when the construct library is symlinked. +// +// Explanation: in JavaScript, multiple copies of the `constructs` library on +// disk are seen as independent, completely different libraries. As a +// consequence, the class `Construct` in each copy of the `constructs` library +// is seen as a different class, and an instance of one class will not test as +// `instanceof` the other class. `npm install` will not create installations +// like this, but users may manually symlink construct libraries together or +// use a monorepo tool: in those cases, multiple copies of the `constructs` +// library can be accidentally installed, and `instanceof` will behave +// unpredictably. It is safest to avoid using `instanceof`, and using +// this type-testing method instead. +// +// Returns: true if `x` is an object created from a class which extends `Construct`. +func KubeMutatingWebhookConfigurationList_IsConstruct(x interface{}) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "k8s.KubeMutatingWebhookConfigurationList", + "isConstruct", + []interface{}{x}, + &returns, + ) + + return returns +} + +// Renders a Kubernetes manifest for "io.k8s.api.admissionregistration.v1.MutatingWebhookConfigurationList". +// +// This can be used to inline resource manifests inside other objects (e.g. as templates). +func KubeMutatingWebhookConfigurationList_Manifest(props *KubeMutatingWebhookConfigurationListProps) interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "k8s.KubeMutatingWebhookConfigurationList", + "manifest", + []interface{}{props}, + &returns, + ) + + return returns +} + +// Returns the `ApiObject` named `Resource` which is a child of the given construct. +// +// If `c` is an `ApiObject`, it is returned directly. Throws an +// exception if the construct does not have a child named `Default` _or_ if +// this child is not an `ApiObject`. +func KubeMutatingWebhookConfigurationList_Of(c constructs.IConstruct) cdk8s.ApiObject { + _init_.Initialize() + + var returns cdk8s.ApiObject + + _jsii_.StaticInvoke( + "k8s.KubeMutatingWebhookConfigurationList", + "of", + []interface{}{c}, + &returns, + ) + + return returns +} + +func KubeMutatingWebhookConfigurationList_GVK() *cdk8s.GroupVersionKind { + _init_.Initialize() + var returns *cdk8s.GroupVersionKind + _jsii_.StaticGet( + "k8s.KubeMutatingWebhookConfigurationList", + "GVK", + &returns, + ) + return returns +} + +func (k *jsiiProxy_KubeMutatingWebhookConfigurationList) AddDependency(dependencies ...constructs.IConstruct) { + args := []interface{}{} + for _, a := range dependencies { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addDependency", + args, + ) +} + +func (k *jsiiProxy_KubeMutatingWebhookConfigurationList) AddJsonPatch(ops ...cdk8s.JsonPatch) { + args := []interface{}{} + for _, a := range ops { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addJsonPatch", + args, + ) +} + +func (k *jsiiProxy_KubeMutatingWebhookConfigurationList) ToJson() interface{} { + var returns interface{} + + _jsii_.Invoke( + k, + "toJson", + nil, // no parameters + &returns, + ) + + return returns +} + +func (k *jsiiProxy_KubeMutatingWebhookConfigurationList) ToString() *string { + var returns *string + + _jsii_.Invoke( + k, + "toString", + nil, // no parameters + &returns, + ) + + return returns +} + +// MutatingWebhookConfigurationList is a list of MutatingWebhookConfiguration. +type KubeMutatingWebhookConfigurationListProps struct { + // List of MutatingWebhookConfiguration. + Items *[]*KubeMutatingWebhookConfigurationProps `field:"required" json:"items" yaml:"items"` + // Standard list metadata. + // + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + Metadata *ListMeta `field:"optional" json:"metadata" yaml:"metadata"` +} + +// MutatingWebhookConfiguration describes the configuration of and admission webhook that accept or reject and may change the object. +type KubeMutatingWebhookConfigurationProps struct { + // Standard object metadata; + // + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata. + Metadata *ObjectMeta `field:"optional" json:"metadata" yaml:"metadata"` + // Webhooks is a list of webhooks and the affected resources and operations. + Webhooks *[]*MutatingWebhook `field:"optional" json:"webhooks" yaml:"webhooks"` +} + +// Namespace provides a scope for Names. +// +// Use of multiple namespaces is optional. +type KubeNamespace interface { + cdk8s.ApiObject + // The group portion of the API version (e.g. `authorization.k8s.io`). + ApiGroup() *string + // The object's API version (e.g. `authorization.k8s.io/v1`). + ApiVersion() *string + // The chart in which this object is defined. + Chart() cdk8s.Chart + // The object kind. + Kind() *string + // Metadata associated with this API object. + Metadata() cdk8s.ApiObjectMetadataDefinition + // The name of the API object. + // + // If a name is specified in `metadata.name` this will be the name returned. + // Otherwise, a name will be generated by calling + // `AddHelm.of(this).generatedObjectName(this)`, which by default uses the + // construct path to generate a DNS-compatible name for the resource. + Name() *string + // The tree node. + Node() constructs.Node + // Create a dependency between this ApiObject and other constructs. + // + // These can be other ApiObjects, Charts, or custom. + AddDependency(dependencies ...constructs.IConstruct) + // Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. + // + // Example: + // kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true)); + // + AddJsonPatch(ops ...cdk8s.JsonPatch) + // Renders the object to Kubernetes JSON. + ToJson() interface{} + // Returns a string representation of this construct. + ToString() *string +} + +// The jsii proxy struct for KubeNamespace +type jsiiProxy_KubeNamespace struct { + internal.Type__cdk8sApiObject +} + +func (j *jsiiProxy_KubeNamespace) ApiGroup() *string { + var returns *string + _jsii_.Get( + j, + "apiGroup", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeNamespace) ApiVersion() *string { + var returns *string + _jsii_.Get( + j, + "apiVersion", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeNamespace) Chart() cdk8s.Chart { + var returns cdk8s.Chart + _jsii_.Get( + j, + "chart", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeNamespace) Kind() *string { + var returns *string + _jsii_.Get( + j, + "kind", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeNamespace) Metadata() cdk8s.ApiObjectMetadataDefinition { + var returns cdk8s.ApiObjectMetadataDefinition + _jsii_.Get( + j, + "metadata", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeNamespace) Name() *string { + var returns *string + _jsii_.Get( + j, + "name", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeNamespace) Node() constructs.Node { + var returns constructs.Node + _jsii_.Get( + j, + "node", + &returns, + ) + return returns +} + +// Defines a "io.k8s.api.core.v1.Namespace" API object. +func NewKubeNamespace(scope constructs.Construct, id *string, props *KubeNamespaceProps) KubeNamespace { + _init_.Initialize() + + j := jsiiProxy_KubeNamespace{} + + _jsii_.Create( + "k8s.KubeNamespace", + []interface{}{scope, id, props}, + &j, + ) + + return &j +} + +// Defines a "io.k8s.api.core.v1.Namespace" API object. +func NewKubeNamespace_Override(k KubeNamespace, scope constructs.Construct, id *string, props *KubeNamespaceProps) { + _init_.Initialize() + + _jsii_.Create( + "k8s.KubeNamespace", + []interface{}{scope, id, props}, + k, + ) +} + +// Checks if `x` is a construct. +// +// Use this method instead of `instanceof` to properly detect `Construct` +// instances, even when the construct library is symlinked. +// +// Explanation: in JavaScript, multiple copies of the `constructs` library on +// disk are seen as independent, completely different libraries. As a +// consequence, the class `Construct` in each copy of the `constructs` library +// is seen as a different class, and an instance of one class will not test as +// `instanceof` the other class. `npm install` will not create installations +// like this, but users may manually symlink construct libraries together or +// use a monorepo tool: in those cases, multiple copies of the `constructs` +// library can be accidentally installed, and `instanceof` will behave +// unpredictably. It is safest to avoid using `instanceof`, and using +// this type-testing method instead. +// +// Returns: true if `x` is an object created from a class which extends `Construct`. +func KubeNamespace_IsConstruct(x interface{}) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "k8s.KubeNamespace", + "isConstruct", + []interface{}{x}, + &returns, + ) + + return returns +} + +// Renders a Kubernetes manifest for "io.k8s.api.core.v1.Namespace". +// +// This can be used to inline resource manifests inside other objects (e.g. as templates). +func KubeNamespace_Manifest(props *KubeNamespaceProps) interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "k8s.KubeNamespace", + "manifest", + []interface{}{props}, + &returns, + ) + + return returns +} + +// Returns the `ApiObject` named `Resource` which is a child of the given construct. +// +// If `c` is an `ApiObject`, it is returned directly. Throws an +// exception if the construct does not have a child named `Default` _or_ if +// this child is not an `ApiObject`. +func KubeNamespace_Of(c constructs.IConstruct) cdk8s.ApiObject { + _init_.Initialize() + + var returns cdk8s.ApiObject + + _jsii_.StaticInvoke( + "k8s.KubeNamespace", + "of", + []interface{}{c}, + &returns, + ) + + return returns +} + +func KubeNamespace_GVK() *cdk8s.GroupVersionKind { + _init_.Initialize() + var returns *cdk8s.GroupVersionKind + _jsii_.StaticGet( + "k8s.KubeNamespace", + "GVK", + &returns, + ) + return returns +} + +func (k *jsiiProxy_KubeNamespace) AddDependency(dependencies ...constructs.IConstruct) { + args := []interface{}{} + for _, a := range dependencies { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addDependency", + args, + ) +} + +func (k *jsiiProxy_KubeNamespace) AddJsonPatch(ops ...cdk8s.JsonPatch) { + args := []interface{}{} + for _, a := range ops { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addJsonPatch", + args, + ) +} + +func (k *jsiiProxy_KubeNamespace) ToJson() interface{} { + var returns interface{} + + _jsii_.Invoke( + k, + "toJson", + nil, // no parameters + &returns, + ) + + return returns +} + +func (k *jsiiProxy_KubeNamespace) ToString() *string { + var returns *string + + _jsii_.Invoke( + k, + "toString", + nil, // no parameters + &returns, + ) + + return returns +} + +// NamespaceList is a list of Namespaces. +type KubeNamespaceList interface { + cdk8s.ApiObject + // The group portion of the API version (e.g. `authorization.k8s.io`). + ApiGroup() *string + // The object's API version (e.g. `authorization.k8s.io/v1`). + ApiVersion() *string + // The chart in which this object is defined. + Chart() cdk8s.Chart + // The object kind. + Kind() *string + // Metadata associated with this API object. + Metadata() cdk8s.ApiObjectMetadataDefinition + // The name of the API object. + // + // If a name is specified in `metadata.name` this will be the name returned. + // Otherwise, a name will be generated by calling + // `AddHelm.of(this).generatedObjectName(this)`, which by default uses the + // construct path to generate a DNS-compatible name for the resource. + Name() *string + // The tree node. + Node() constructs.Node + // Create a dependency between this ApiObject and other constructs. + // + // These can be other ApiObjects, Charts, or custom. + AddDependency(dependencies ...constructs.IConstruct) + // Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. + // + // Example: + // kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true)); + // + AddJsonPatch(ops ...cdk8s.JsonPatch) + // Renders the object to Kubernetes JSON. + ToJson() interface{} + // Returns a string representation of this construct. + ToString() *string +} + +// The jsii proxy struct for KubeNamespaceList +type jsiiProxy_KubeNamespaceList struct { + internal.Type__cdk8sApiObject +} + +func (j *jsiiProxy_KubeNamespaceList) ApiGroup() *string { + var returns *string + _jsii_.Get( + j, + "apiGroup", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeNamespaceList) ApiVersion() *string { + var returns *string + _jsii_.Get( + j, + "apiVersion", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeNamespaceList) Chart() cdk8s.Chart { + var returns cdk8s.Chart + _jsii_.Get( + j, + "chart", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeNamespaceList) Kind() *string { + var returns *string + _jsii_.Get( + j, + "kind", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeNamespaceList) Metadata() cdk8s.ApiObjectMetadataDefinition { + var returns cdk8s.ApiObjectMetadataDefinition + _jsii_.Get( + j, + "metadata", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeNamespaceList) Name() *string { + var returns *string + _jsii_.Get( + j, + "name", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeNamespaceList) Node() constructs.Node { + var returns constructs.Node + _jsii_.Get( + j, + "node", + &returns, + ) + return returns +} + +// Defines a "io.k8s.api.core.v1.NamespaceList" API object. +func NewKubeNamespaceList(scope constructs.Construct, id *string, props *KubeNamespaceListProps) KubeNamespaceList { + _init_.Initialize() + + j := jsiiProxy_KubeNamespaceList{} + + _jsii_.Create( + "k8s.KubeNamespaceList", + []interface{}{scope, id, props}, + &j, + ) + + return &j +} + +// Defines a "io.k8s.api.core.v1.NamespaceList" API object. +func NewKubeNamespaceList_Override(k KubeNamespaceList, scope constructs.Construct, id *string, props *KubeNamespaceListProps) { + _init_.Initialize() + + _jsii_.Create( + "k8s.KubeNamespaceList", + []interface{}{scope, id, props}, + k, + ) +} + +// Checks if `x` is a construct. +// +// Use this method instead of `instanceof` to properly detect `Construct` +// instances, even when the construct library is symlinked. +// +// Explanation: in JavaScript, multiple copies of the `constructs` library on +// disk are seen as independent, completely different libraries. As a +// consequence, the class `Construct` in each copy of the `constructs` library +// is seen as a different class, and an instance of one class will not test as +// `instanceof` the other class. `npm install` will not create installations +// like this, but users may manually symlink construct libraries together or +// use a monorepo tool: in those cases, multiple copies of the `constructs` +// library can be accidentally installed, and `instanceof` will behave +// unpredictably. It is safest to avoid using `instanceof`, and using +// this type-testing method instead. +// +// Returns: true if `x` is an object created from a class which extends `Construct`. +func KubeNamespaceList_IsConstruct(x interface{}) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "k8s.KubeNamespaceList", + "isConstruct", + []interface{}{x}, + &returns, + ) + + return returns +} + +// Renders a Kubernetes manifest for "io.k8s.api.core.v1.NamespaceList". +// +// This can be used to inline resource manifests inside other objects (e.g. as templates). +func KubeNamespaceList_Manifest(props *KubeNamespaceListProps) interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "k8s.KubeNamespaceList", + "manifest", + []interface{}{props}, + &returns, + ) + + return returns +} + +// Returns the `ApiObject` named `Resource` which is a child of the given construct. +// +// If `c` is an `ApiObject`, it is returned directly. Throws an +// exception if the construct does not have a child named `Default` _or_ if +// this child is not an `ApiObject`. +func KubeNamespaceList_Of(c constructs.IConstruct) cdk8s.ApiObject { + _init_.Initialize() + + var returns cdk8s.ApiObject + + _jsii_.StaticInvoke( + "k8s.KubeNamespaceList", + "of", + []interface{}{c}, + &returns, + ) + + return returns +} + +func KubeNamespaceList_GVK() *cdk8s.GroupVersionKind { + _init_.Initialize() + var returns *cdk8s.GroupVersionKind + _jsii_.StaticGet( + "k8s.KubeNamespaceList", + "GVK", + &returns, + ) + return returns +} + +func (k *jsiiProxy_KubeNamespaceList) AddDependency(dependencies ...constructs.IConstruct) { + args := []interface{}{} + for _, a := range dependencies { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addDependency", + args, + ) +} + +func (k *jsiiProxy_KubeNamespaceList) AddJsonPatch(ops ...cdk8s.JsonPatch) { + args := []interface{}{} + for _, a := range ops { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addJsonPatch", + args, + ) +} + +func (k *jsiiProxy_KubeNamespaceList) ToJson() interface{} { + var returns interface{} + + _jsii_.Invoke( + k, + "toJson", + nil, // no parameters + &returns, + ) + + return returns +} + +func (k *jsiiProxy_KubeNamespaceList) ToString() *string { + var returns *string + + _jsii_.Invoke( + k, + "toString", + nil, // no parameters + &returns, + ) + + return returns +} + +// NamespaceList is a list of Namespaces. +type KubeNamespaceListProps struct { + // Items is the list of Namespace objects in the list. + // + // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ + Items *[]*KubeNamespaceProps `field:"required" json:"items" yaml:"items"` + // Standard list metadata. + // + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + Metadata *ListMeta `field:"optional" json:"metadata" yaml:"metadata"` +} + +// Namespace provides a scope for Names. +// +// Use of multiple namespaces is optional. +type KubeNamespaceProps struct { + // Standard object's metadata. + // + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + Metadata *ObjectMeta `field:"optional" json:"metadata" yaml:"metadata"` + // Spec defines the behavior of the Namespace. + // + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + Spec *NamespaceSpec `field:"optional" json:"spec" yaml:"spec"` +} + +// NetworkPolicy describes what network traffic is allowed for a set of Pods. +type KubeNetworkPolicy interface { + cdk8s.ApiObject + // The group portion of the API version (e.g. `authorization.k8s.io`). + ApiGroup() *string + // The object's API version (e.g. `authorization.k8s.io/v1`). + ApiVersion() *string + // The chart in which this object is defined. + Chart() cdk8s.Chart + // The object kind. + Kind() *string + // Metadata associated with this API object. + Metadata() cdk8s.ApiObjectMetadataDefinition + // The name of the API object. + // + // If a name is specified in `metadata.name` this will be the name returned. + // Otherwise, a name will be generated by calling + // `AddHelm.of(this).generatedObjectName(this)`, which by default uses the + // construct path to generate a DNS-compatible name for the resource. + Name() *string + // The tree node. + Node() constructs.Node + // Create a dependency between this ApiObject and other constructs. + // + // These can be other ApiObjects, Charts, or custom. + AddDependency(dependencies ...constructs.IConstruct) + // Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. + // + // Example: + // kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true)); + // + AddJsonPatch(ops ...cdk8s.JsonPatch) + // Renders the object to Kubernetes JSON. + ToJson() interface{} + // Returns a string representation of this construct. + ToString() *string +} + +// The jsii proxy struct for KubeNetworkPolicy +type jsiiProxy_KubeNetworkPolicy struct { + internal.Type__cdk8sApiObject +} + +func (j *jsiiProxy_KubeNetworkPolicy) ApiGroup() *string { + var returns *string + _jsii_.Get( + j, + "apiGroup", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeNetworkPolicy) ApiVersion() *string { + var returns *string + _jsii_.Get( + j, + "apiVersion", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeNetworkPolicy) Chart() cdk8s.Chart { + var returns cdk8s.Chart + _jsii_.Get( + j, + "chart", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeNetworkPolicy) Kind() *string { + var returns *string + _jsii_.Get( + j, + "kind", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeNetworkPolicy) Metadata() cdk8s.ApiObjectMetadataDefinition { + var returns cdk8s.ApiObjectMetadataDefinition + _jsii_.Get( + j, + "metadata", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeNetworkPolicy) Name() *string { + var returns *string + _jsii_.Get( + j, + "name", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeNetworkPolicy) Node() constructs.Node { + var returns constructs.Node + _jsii_.Get( + j, + "node", + &returns, + ) + return returns +} + +// Defines a "io.k8s.api.networking.v1.NetworkPolicy" API object. +func NewKubeNetworkPolicy(scope constructs.Construct, id *string, props *KubeNetworkPolicyProps) KubeNetworkPolicy { + _init_.Initialize() + + j := jsiiProxy_KubeNetworkPolicy{} + + _jsii_.Create( + "k8s.KubeNetworkPolicy", + []interface{}{scope, id, props}, + &j, + ) + + return &j +} + +// Defines a "io.k8s.api.networking.v1.NetworkPolicy" API object. +func NewKubeNetworkPolicy_Override(k KubeNetworkPolicy, scope constructs.Construct, id *string, props *KubeNetworkPolicyProps) { + _init_.Initialize() + + _jsii_.Create( + "k8s.KubeNetworkPolicy", + []interface{}{scope, id, props}, + k, + ) +} + +// Checks if `x` is a construct. +// +// Use this method instead of `instanceof` to properly detect `Construct` +// instances, even when the construct library is symlinked. +// +// Explanation: in JavaScript, multiple copies of the `constructs` library on +// disk are seen as independent, completely different libraries. As a +// consequence, the class `Construct` in each copy of the `constructs` library +// is seen as a different class, and an instance of one class will not test as +// `instanceof` the other class. `npm install` will not create installations +// like this, but users may manually symlink construct libraries together or +// use a monorepo tool: in those cases, multiple copies of the `constructs` +// library can be accidentally installed, and `instanceof` will behave +// unpredictably. It is safest to avoid using `instanceof`, and using +// this type-testing method instead. +// +// Returns: true if `x` is an object created from a class which extends `Construct`. +func KubeNetworkPolicy_IsConstruct(x interface{}) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "k8s.KubeNetworkPolicy", + "isConstruct", + []interface{}{x}, + &returns, + ) + + return returns +} + +// Renders a Kubernetes manifest for "io.k8s.api.networking.v1.NetworkPolicy". +// +// This can be used to inline resource manifests inside other objects (e.g. as templates). +func KubeNetworkPolicy_Manifest(props *KubeNetworkPolicyProps) interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "k8s.KubeNetworkPolicy", + "manifest", + []interface{}{props}, + &returns, + ) + + return returns +} + +// Returns the `ApiObject` named `Resource` which is a child of the given construct. +// +// If `c` is an `ApiObject`, it is returned directly. Throws an +// exception if the construct does not have a child named `Default` _or_ if +// this child is not an `ApiObject`. +func KubeNetworkPolicy_Of(c constructs.IConstruct) cdk8s.ApiObject { + _init_.Initialize() + + var returns cdk8s.ApiObject + + _jsii_.StaticInvoke( + "k8s.KubeNetworkPolicy", + "of", + []interface{}{c}, + &returns, + ) + + return returns +} + +func KubeNetworkPolicy_GVK() *cdk8s.GroupVersionKind { + _init_.Initialize() + var returns *cdk8s.GroupVersionKind + _jsii_.StaticGet( + "k8s.KubeNetworkPolicy", + "GVK", + &returns, + ) + return returns +} + +func (k *jsiiProxy_KubeNetworkPolicy) AddDependency(dependencies ...constructs.IConstruct) { + args := []interface{}{} + for _, a := range dependencies { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addDependency", + args, + ) +} + +func (k *jsiiProxy_KubeNetworkPolicy) AddJsonPatch(ops ...cdk8s.JsonPatch) { + args := []interface{}{} + for _, a := range ops { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addJsonPatch", + args, + ) +} + +func (k *jsiiProxy_KubeNetworkPolicy) ToJson() interface{} { + var returns interface{} + + _jsii_.Invoke( + k, + "toJson", + nil, // no parameters + &returns, + ) + + return returns +} + +func (k *jsiiProxy_KubeNetworkPolicy) ToString() *string { + var returns *string + + _jsii_.Invoke( + k, + "toString", + nil, // no parameters + &returns, + ) + + return returns +} + +// NetworkPolicyList is a list of NetworkPolicy objects. +type KubeNetworkPolicyList interface { + cdk8s.ApiObject + // The group portion of the API version (e.g. `authorization.k8s.io`). + ApiGroup() *string + // The object's API version (e.g. `authorization.k8s.io/v1`). + ApiVersion() *string + // The chart in which this object is defined. + Chart() cdk8s.Chart + // The object kind. + Kind() *string + // Metadata associated with this API object. + Metadata() cdk8s.ApiObjectMetadataDefinition + // The name of the API object. + // + // If a name is specified in `metadata.name` this will be the name returned. + // Otherwise, a name will be generated by calling + // `AddHelm.of(this).generatedObjectName(this)`, which by default uses the + // construct path to generate a DNS-compatible name for the resource. + Name() *string + // The tree node. + Node() constructs.Node + // Create a dependency between this ApiObject and other constructs. + // + // These can be other ApiObjects, Charts, or custom. + AddDependency(dependencies ...constructs.IConstruct) + // Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. + // + // Example: + // kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true)); + // + AddJsonPatch(ops ...cdk8s.JsonPatch) + // Renders the object to Kubernetes JSON. + ToJson() interface{} + // Returns a string representation of this construct. + ToString() *string +} + +// The jsii proxy struct for KubeNetworkPolicyList +type jsiiProxy_KubeNetworkPolicyList struct { + internal.Type__cdk8sApiObject +} + +func (j *jsiiProxy_KubeNetworkPolicyList) ApiGroup() *string { + var returns *string + _jsii_.Get( + j, + "apiGroup", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeNetworkPolicyList) ApiVersion() *string { + var returns *string + _jsii_.Get( + j, + "apiVersion", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeNetworkPolicyList) Chart() cdk8s.Chart { + var returns cdk8s.Chart + _jsii_.Get( + j, + "chart", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeNetworkPolicyList) Kind() *string { + var returns *string + _jsii_.Get( + j, + "kind", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeNetworkPolicyList) Metadata() cdk8s.ApiObjectMetadataDefinition { + var returns cdk8s.ApiObjectMetadataDefinition + _jsii_.Get( + j, + "metadata", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeNetworkPolicyList) Name() *string { + var returns *string + _jsii_.Get( + j, + "name", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeNetworkPolicyList) Node() constructs.Node { + var returns constructs.Node + _jsii_.Get( + j, + "node", + &returns, + ) + return returns +} + +// Defines a "io.k8s.api.networking.v1.NetworkPolicyList" API object. +func NewKubeNetworkPolicyList(scope constructs.Construct, id *string, props *KubeNetworkPolicyListProps) KubeNetworkPolicyList { + _init_.Initialize() + + j := jsiiProxy_KubeNetworkPolicyList{} + + _jsii_.Create( + "k8s.KubeNetworkPolicyList", + []interface{}{scope, id, props}, + &j, + ) + + return &j +} + +// Defines a "io.k8s.api.networking.v1.NetworkPolicyList" API object. +func NewKubeNetworkPolicyList_Override(k KubeNetworkPolicyList, scope constructs.Construct, id *string, props *KubeNetworkPolicyListProps) { + _init_.Initialize() + + _jsii_.Create( + "k8s.KubeNetworkPolicyList", + []interface{}{scope, id, props}, + k, + ) +} + +// Checks if `x` is a construct. +// +// Use this method instead of `instanceof` to properly detect `Construct` +// instances, even when the construct library is symlinked. +// +// Explanation: in JavaScript, multiple copies of the `constructs` library on +// disk are seen as independent, completely different libraries. As a +// consequence, the class `Construct` in each copy of the `constructs` library +// is seen as a different class, and an instance of one class will not test as +// `instanceof` the other class. `npm install` will not create installations +// like this, but users may manually symlink construct libraries together or +// use a monorepo tool: in those cases, multiple copies of the `constructs` +// library can be accidentally installed, and `instanceof` will behave +// unpredictably. It is safest to avoid using `instanceof`, and using +// this type-testing method instead. +// +// Returns: true if `x` is an object created from a class which extends `Construct`. +func KubeNetworkPolicyList_IsConstruct(x interface{}) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "k8s.KubeNetworkPolicyList", + "isConstruct", + []interface{}{x}, + &returns, + ) + + return returns +} + +// Renders a Kubernetes manifest for "io.k8s.api.networking.v1.NetworkPolicyList". +// +// This can be used to inline resource manifests inside other objects (e.g. as templates). +func KubeNetworkPolicyList_Manifest(props *KubeNetworkPolicyListProps) interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "k8s.KubeNetworkPolicyList", + "manifest", + []interface{}{props}, + &returns, + ) + + return returns +} + +// Returns the `ApiObject` named `Resource` which is a child of the given construct. +// +// If `c` is an `ApiObject`, it is returned directly. Throws an +// exception if the construct does not have a child named `Default` _or_ if +// this child is not an `ApiObject`. +func KubeNetworkPolicyList_Of(c constructs.IConstruct) cdk8s.ApiObject { + _init_.Initialize() + + var returns cdk8s.ApiObject + + _jsii_.StaticInvoke( + "k8s.KubeNetworkPolicyList", + "of", + []interface{}{c}, + &returns, + ) + + return returns +} + +func KubeNetworkPolicyList_GVK() *cdk8s.GroupVersionKind { + _init_.Initialize() + var returns *cdk8s.GroupVersionKind + _jsii_.StaticGet( + "k8s.KubeNetworkPolicyList", + "GVK", + &returns, + ) + return returns +} + +func (k *jsiiProxy_KubeNetworkPolicyList) AddDependency(dependencies ...constructs.IConstruct) { + args := []interface{}{} + for _, a := range dependencies { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addDependency", + args, + ) +} + +func (k *jsiiProxy_KubeNetworkPolicyList) AddJsonPatch(ops ...cdk8s.JsonPatch) { + args := []interface{}{} + for _, a := range ops { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addJsonPatch", + args, + ) +} + +func (k *jsiiProxy_KubeNetworkPolicyList) ToJson() interface{} { + var returns interface{} + + _jsii_.Invoke( + k, + "toJson", + nil, // no parameters + &returns, + ) + + return returns +} + +func (k *jsiiProxy_KubeNetworkPolicyList) ToString() *string { + var returns *string + + _jsii_.Invoke( + k, + "toString", + nil, // no parameters + &returns, + ) + + return returns +} + +// NetworkPolicyList is a list of NetworkPolicy objects. +type KubeNetworkPolicyListProps struct { + // Items is a list of schema objects. + Items *[]*KubeNetworkPolicyProps `field:"required" json:"items" yaml:"items"` + // Standard list metadata. + // + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + Metadata *ListMeta `field:"optional" json:"metadata" yaml:"metadata"` +} + +// NetworkPolicy describes what network traffic is allowed for a set of Pods. +type KubeNetworkPolicyProps struct { + // Standard object's metadata. + // + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + Metadata *ObjectMeta `field:"optional" json:"metadata" yaml:"metadata"` + // Specification of the desired behavior for this NetworkPolicy. + Spec *NetworkPolicySpec `field:"optional" json:"spec" yaml:"spec"` +} + +// Node is a worker node in Kubernetes. +// +// Each node will have a unique identifier in the cache (i.e. in etcd). +type KubeNode interface { + cdk8s.ApiObject + // The group portion of the API version (e.g. `authorization.k8s.io`). + ApiGroup() *string + // The object's API version (e.g. `authorization.k8s.io/v1`). + ApiVersion() *string + // The chart in which this object is defined. + Chart() cdk8s.Chart + // The object kind. + Kind() *string + // Metadata associated with this API object. + Metadata() cdk8s.ApiObjectMetadataDefinition + // The name of the API object. + // + // If a name is specified in `metadata.name` this will be the name returned. + // Otherwise, a name will be generated by calling + // `AddHelm.of(this).generatedObjectName(this)`, which by default uses the + // construct path to generate a DNS-compatible name for the resource. + Name() *string + // The tree node. + Node() constructs.Node + // Create a dependency between this ApiObject and other constructs. + // + // These can be other ApiObjects, Charts, or custom. + AddDependency(dependencies ...constructs.IConstruct) + // Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. + // + // Example: + // kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true)); + // + AddJsonPatch(ops ...cdk8s.JsonPatch) + // Renders the object to Kubernetes JSON. + ToJson() interface{} + // Returns a string representation of this construct. + ToString() *string +} + +// The jsii proxy struct for KubeNode +type jsiiProxy_KubeNode struct { + internal.Type__cdk8sApiObject +} + +func (j *jsiiProxy_KubeNode) ApiGroup() *string { + var returns *string + _jsii_.Get( + j, + "apiGroup", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeNode) ApiVersion() *string { + var returns *string + _jsii_.Get( + j, + "apiVersion", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeNode) Chart() cdk8s.Chart { + var returns cdk8s.Chart + _jsii_.Get( + j, + "chart", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeNode) Kind() *string { + var returns *string + _jsii_.Get( + j, + "kind", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeNode) Metadata() cdk8s.ApiObjectMetadataDefinition { + var returns cdk8s.ApiObjectMetadataDefinition + _jsii_.Get( + j, + "metadata", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeNode) Name() *string { + var returns *string + _jsii_.Get( + j, + "name", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeNode) Node() constructs.Node { + var returns constructs.Node + _jsii_.Get( + j, + "node", + &returns, + ) + return returns +} + +// Defines a "io.k8s.api.core.v1.Node" API object. +func NewKubeNode(scope constructs.Construct, id *string, props *KubeNodeProps) KubeNode { + _init_.Initialize() + + j := jsiiProxy_KubeNode{} + + _jsii_.Create( + "k8s.KubeNode", + []interface{}{scope, id, props}, + &j, + ) + + return &j +} + +// Defines a "io.k8s.api.core.v1.Node" API object. +func NewKubeNode_Override(k KubeNode, scope constructs.Construct, id *string, props *KubeNodeProps) { + _init_.Initialize() + + _jsii_.Create( + "k8s.KubeNode", + []interface{}{scope, id, props}, + k, + ) +} + +// Checks if `x` is a construct. +// +// Use this method instead of `instanceof` to properly detect `Construct` +// instances, even when the construct library is symlinked. +// +// Explanation: in JavaScript, multiple copies of the `constructs` library on +// disk are seen as independent, completely different libraries. As a +// consequence, the class `Construct` in each copy of the `constructs` library +// is seen as a different class, and an instance of one class will not test as +// `instanceof` the other class. `npm install` will not create installations +// like this, but users may manually symlink construct libraries together or +// use a monorepo tool: in those cases, multiple copies of the `constructs` +// library can be accidentally installed, and `instanceof` will behave +// unpredictably. It is safest to avoid using `instanceof`, and using +// this type-testing method instead. +// +// Returns: true if `x` is an object created from a class which extends `Construct`. +func KubeNode_IsConstruct(x interface{}) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "k8s.KubeNode", + "isConstruct", + []interface{}{x}, + &returns, + ) + + return returns +} + +// Renders a Kubernetes manifest for "io.k8s.api.core.v1.Node". +// +// This can be used to inline resource manifests inside other objects (e.g. as templates). +func KubeNode_Manifest(props *KubeNodeProps) interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "k8s.KubeNode", + "manifest", + []interface{}{props}, + &returns, + ) + + return returns +} + +// Returns the `ApiObject` named `Resource` which is a child of the given construct. +// +// If `c` is an `ApiObject`, it is returned directly. Throws an +// exception if the construct does not have a child named `Default` _or_ if +// this child is not an `ApiObject`. +func KubeNode_Of(c constructs.IConstruct) cdk8s.ApiObject { + _init_.Initialize() + + var returns cdk8s.ApiObject + + _jsii_.StaticInvoke( + "k8s.KubeNode", + "of", + []interface{}{c}, + &returns, + ) + + return returns +} + +func KubeNode_GVK() *cdk8s.GroupVersionKind { + _init_.Initialize() + var returns *cdk8s.GroupVersionKind + _jsii_.StaticGet( + "k8s.KubeNode", + "GVK", + &returns, + ) + return returns +} + +func (k *jsiiProxy_KubeNode) AddDependency(dependencies ...constructs.IConstruct) { + args := []interface{}{} + for _, a := range dependencies { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addDependency", + args, + ) +} + +func (k *jsiiProxy_KubeNode) AddJsonPatch(ops ...cdk8s.JsonPatch) { + args := []interface{}{} + for _, a := range ops { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addJsonPatch", + args, + ) +} + +func (k *jsiiProxy_KubeNode) ToJson() interface{} { + var returns interface{} + + _jsii_.Invoke( + k, + "toJson", + nil, // no parameters + &returns, + ) + + return returns +} + +func (k *jsiiProxy_KubeNode) ToString() *string { + var returns *string + + _jsii_.Invoke( + k, + "toString", + nil, // no parameters + &returns, + ) + + return returns +} + +// NodeList is the whole list of all Nodes which have been registered with master. +type KubeNodeList interface { + cdk8s.ApiObject + // The group portion of the API version (e.g. `authorization.k8s.io`). + ApiGroup() *string + // The object's API version (e.g. `authorization.k8s.io/v1`). + ApiVersion() *string + // The chart in which this object is defined. + Chart() cdk8s.Chart + // The object kind. + Kind() *string + // Metadata associated with this API object. + Metadata() cdk8s.ApiObjectMetadataDefinition + // The name of the API object. + // + // If a name is specified in `metadata.name` this will be the name returned. + // Otherwise, a name will be generated by calling + // `AddHelm.of(this).generatedObjectName(this)`, which by default uses the + // construct path to generate a DNS-compatible name for the resource. + Name() *string + // The tree node. + Node() constructs.Node + // Create a dependency between this ApiObject and other constructs. + // + // These can be other ApiObjects, Charts, or custom. + AddDependency(dependencies ...constructs.IConstruct) + // Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. + // + // Example: + // kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true)); + // + AddJsonPatch(ops ...cdk8s.JsonPatch) + // Renders the object to Kubernetes JSON. + ToJson() interface{} + // Returns a string representation of this construct. + ToString() *string +} + +// The jsii proxy struct for KubeNodeList +type jsiiProxy_KubeNodeList struct { + internal.Type__cdk8sApiObject +} + +func (j *jsiiProxy_KubeNodeList) ApiGroup() *string { + var returns *string + _jsii_.Get( + j, + "apiGroup", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeNodeList) ApiVersion() *string { + var returns *string + _jsii_.Get( + j, + "apiVersion", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeNodeList) Chart() cdk8s.Chart { + var returns cdk8s.Chart + _jsii_.Get( + j, + "chart", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeNodeList) Kind() *string { + var returns *string + _jsii_.Get( + j, + "kind", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeNodeList) Metadata() cdk8s.ApiObjectMetadataDefinition { + var returns cdk8s.ApiObjectMetadataDefinition + _jsii_.Get( + j, + "metadata", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeNodeList) Name() *string { + var returns *string + _jsii_.Get( + j, + "name", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeNodeList) Node() constructs.Node { + var returns constructs.Node + _jsii_.Get( + j, + "node", + &returns, + ) + return returns +} + +// Defines a "io.k8s.api.core.v1.NodeList" API object. +func NewKubeNodeList(scope constructs.Construct, id *string, props *KubeNodeListProps) KubeNodeList { + _init_.Initialize() + + j := jsiiProxy_KubeNodeList{} + + _jsii_.Create( + "k8s.KubeNodeList", + []interface{}{scope, id, props}, + &j, + ) + + return &j +} + +// Defines a "io.k8s.api.core.v1.NodeList" API object. +func NewKubeNodeList_Override(k KubeNodeList, scope constructs.Construct, id *string, props *KubeNodeListProps) { + _init_.Initialize() + + _jsii_.Create( + "k8s.KubeNodeList", + []interface{}{scope, id, props}, + k, + ) +} + +// Checks if `x` is a construct. +// +// Use this method instead of `instanceof` to properly detect `Construct` +// instances, even when the construct library is symlinked. +// +// Explanation: in JavaScript, multiple copies of the `constructs` library on +// disk are seen as independent, completely different libraries. As a +// consequence, the class `Construct` in each copy of the `constructs` library +// is seen as a different class, and an instance of one class will not test as +// `instanceof` the other class. `npm install` will not create installations +// like this, but users may manually symlink construct libraries together or +// use a monorepo tool: in those cases, multiple copies of the `constructs` +// library can be accidentally installed, and `instanceof` will behave +// unpredictably. It is safest to avoid using `instanceof`, and using +// this type-testing method instead. +// +// Returns: true if `x` is an object created from a class which extends `Construct`. +func KubeNodeList_IsConstruct(x interface{}) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "k8s.KubeNodeList", + "isConstruct", + []interface{}{x}, + &returns, + ) + + return returns +} + +// Renders a Kubernetes manifest for "io.k8s.api.core.v1.NodeList". +// +// This can be used to inline resource manifests inside other objects (e.g. as templates). +func KubeNodeList_Manifest(props *KubeNodeListProps) interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "k8s.KubeNodeList", + "manifest", + []interface{}{props}, + &returns, + ) + + return returns +} + +// Returns the `ApiObject` named `Resource` which is a child of the given construct. +// +// If `c` is an `ApiObject`, it is returned directly. Throws an +// exception if the construct does not have a child named `Default` _or_ if +// this child is not an `ApiObject`. +func KubeNodeList_Of(c constructs.IConstruct) cdk8s.ApiObject { + _init_.Initialize() + + var returns cdk8s.ApiObject + + _jsii_.StaticInvoke( + "k8s.KubeNodeList", + "of", + []interface{}{c}, + &returns, + ) + + return returns +} + +func KubeNodeList_GVK() *cdk8s.GroupVersionKind { + _init_.Initialize() + var returns *cdk8s.GroupVersionKind + _jsii_.StaticGet( + "k8s.KubeNodeList", + "GVK", + &returns, + ) + return returns +} + +func (k *jsiiProxy_KubeNodeList) AddDependency(dependencies ...constructs.IConstruct) { + args := []interface{}{} + for _, a := range dependencies { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addDependency", + args, + ) +} + +func (k *jsiiProxy_KubeNodeList) AddJsonPatch(ops ...cdk8s.JsonPatch) { + args := []interface{}{} + for _, a := range ops { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addJsonPatch", + args, + ) +} + +func (k *jsiiProxy_KubeNodeList) ToJson() interface{} { + var returns interface{} + + _jsii_.Invoke( + k, + "toJson", + nil, // no parameters + &returns, + ) + + return returns +} + +func (k *jsiiProxy_KubeNodeList) ToString() *string { + var returns *string + + _jsii_.Invoke( + k, + "toString", + nil, // no parameters + &returns, + ) + + return returns +} + +// NodeList is the whole list of all Nodes which have been registered with master. +type KubeNodeListProps struct { + // List of nodes. + Items *[]*KubeNodeProps `field:"required" json:"items" yaml:"items"` + // Standard list metadata. + // + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + Metadata *ListMeta `field:"optional" json:"metadata" yaml:"metadata"` +} + +// Node is a worker node in Kubernetes. +// +// Each node will have a unique identifier in the cache (i.e. in etcd). +type KubeNodeProps struct { + // Standard object's metadata. + // + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + Metadata *ObjectMeta `field:"optional" json:"metadata" yaml:"metadata"` + // Spec defines the behavior of a node. + // + // https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + Spec *NodeSpec `field:"optional" json:"spec" yaml:"spec"` +} + +// PersistentVolume (PV) is a storage resource provisioned by an administrator. +// +// It is analogous to a node. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes +type KubePersistentVolume interface { + cdk8s.ApiObject + // The group portion of the API version (e.g. `authorization.k8s.io`). + ApiGroup() *string + // The object's API version (e.g. `authorization.k8s.io/v1`). + ApiVersion() *string + // The chart in which this object is defined. + Chart() cdk8s.Chart + // The object kind. + Kind() *string + // Metadata associated with this API object. + Metadata() cdk8s.ApiObjectMetadataDefinition + // The name of the API object. + // + // If a name is specified in `metadata.name` this will be the name returned. + // Otherwise, a name will be generated by calling + // `AddHelm.of(this).generatedObjectName(this)`, which by default uses the + // construct path to generate a DNS-compatible name for the resource. + Name() *string + // The tree node. + Node() constructs.Node + // Create a dependency between this ApiObject and other constructs. + // + // These can be other ApiObjects, Charts, or custom. + AddDependency(dependencies ...constructs.IConstruct) + // Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. + // + // Example: + // kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true)); + // + AddJsonPatch(ops ...cdk8s.JsonPatch) + // Renders the object to Kubernetes JSON. + ToJson() interface{} + // Returns a string representation of this construct. + ToString() *string +} + +// The jsii proxy struct for KubePersistentVolume +type jsiiProxy_KubePersistentVolume struct { + internal.Type__cdk8sApiObject +} + +func (j *jsiiProxy_KubePersistentVolume) ApiGroup() *string { + var returns *string + _jsii_.Get( + j, + "apiGroup", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubePersistentVolume) ApiVersion() *string { + var returns *string + _jsii_.Get( + j, + "apiVersion", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubePersistentVolume) Chart() cdk8s.Chart { + var returns cdk8s.Chart + _jsii_.Get( + j, + "chart", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubePersistentVolume) Kind() *string { + var returns *string + _jsii_.Get( + j, + "kind", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubePersistentVolume) Metadata() cdk8s.ApiObjectMetadataDefinition { + var returns cdk8s.ApiObjectMetadataDefinition + _jsii_.Get( + j, + "metadata", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubePersistentVolume) Name() *string { + var returns *string + _jsii_.Get( + j, + "name", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubePersistentVolume) Node() constructs.Node { + var returns constructs.Node + _jsii_.Get( + j, + "node", + &returns, + ) + return returns +} + +// Defines a "io.k8s.api.core.v1.PersistentVolume" API object. +func NewKubePersistentVolume(scope constructs.Construct, id *string, props *KubePersistentVolumeProps) KubePersistentVolume { + _init_.Initialize() + + j := jsiiProxy_KubePersistentVolume{} + + _jsii_.Create( + "k8s.KubePersistentVolume", + []interface{}{scope, id, props}, + &j, + ) + + return &j +} + +// Defines a "io.k8s.api.core.v1.PersistentVolume" API object. +func NewKubePersistentVolume_Override(k KubePersistentVolume, scope constructs.Construct, id *string, props *KubePersistentVolumeProps) { + _init_.Initialize() + + _jsii_.Create( + "k8s.KubePersistentVolume", + []interface{}{scope, id, props}, + k, + ) +} + +// Checks if `x` is a construct. +// +// Use this method instead of `instanceof` to properly detect `Construct` +// instances, even when the construct library is symlinked. +// +// Explanation: in JavaScript, multiple copies of the `constructs` library on +// disk are seen as independent, completely different libraries. As a +// consequence, the class `Construct` in each copy of the `constructs` library +// is seen as a different class, and an instance of one class will not test as +// `instanceof` the other class. `npm install` will not create installations +// like this, but users may manually symlink construct libraries together or +// use a monorepo tool: in those cases, multiple copies of the `constructs` +// library can be accidentally installed, and `instanceof` will behave +// unpredictably. It is safest to avoid using `instanceof`, and using +// this type-testing method instead. +// +// Returns: true if `x` is an object created from a class which extends `Construct`. +func KubePersistentVolume_IsConstruct(x interface{}) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "k8s.KubePersistentVolume", + "isConstruct", + []interface{}{x}, + &returns, + ) + + return returns +} + +// Renders a Kubernetes manifest for "io.k8s.api.core.v1.PersistentVolume". +// +// This can be used to inline resource manifests inside other objects (e.g. as templates). +func KubePersistentVolume_Manifest(props *KubePersistentVolumeProps) interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "k8s.KubePersistentVolume", + "manifest", + []interface{}{props}, + &returns, + ) + + return returns +} + +// Returns the `ApiObject` named `Resource` which is a child of the given construct. +// +// If `c` is an `ApiObject`, it is returned directly. Throws an +// exception if the construct does not have a child named `Default` _or_ if +// this child is not an `ApiObject`. +func KubePersistentVolume_Of(c constructs.IConstruct) cdk8s.ApiObject { + _init_.Initialize() + + var returns cdk8s.ApiObject + + _jsii_.StaticInvoke( + "k8s.KubePersistentVolume", + "of", + []interface{}{c}, + &returns, + ) + + return returns +} + +func KubePersistentVolume_GVK() *cdk8s.GroupVersionKind { + _init_.Initialize() + var returns *cdk8s.GroupVersionKind + _jsii_.StaticGet( + "k8s.KubePersistentVolume", + "GVK", + &returns, + ) + return returns +} + +func (k *jsiiProxy_KubePersistentVolume) AddDependency(dependencies ...constructs.IConstruct) { + args := []interface{}{} + for _, a := range dependencies { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addDependency", + args, + ) +} + +func (k *jsiiProxy_KubePersistentVolume) AddJsonPatch(ops ...cdk8s.JsonPatch) { + args := []interface{}{} + for _, a := range ops { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addJsonPatch", + args, + ) +} + +func (k *jsiiProxy_KubePersistentVolume) ToJson() interface{} { + var returns interface{} + + _jsii_.Invoke( + k, + "toJson", + nil, // no parameters + &returns, + ) + + return returns +} + +func (k *jsiiProxy_KubePersistentVolume) ToString() *string { + var returns *string + + _jsii_.Invoke( + k, + "toString", + nil, // no parameters + &returns, + ) + + return returns +} + +// PersistentVolumeClaim is a user's request for and claim to a persistent volume. +type KubePersistentVolumeClaim interface { + cdk8s.ApiObject + // The group portion of the API version (e.g. `authorization.k8s.io`). + ApiGroup() *string + // The object's API version (e.g. `authorization.k8s.io/v1`). + ApiVersion() *string + // The chart in which this object is defined. + Chart() cdk8s.Chart + // The object kind. + Kind() *string + // Metadata associated with this API object. + Metadata() cdk8s.ApiObjectMetadataDefinition + // The name of the API object. + // + // If a name is specified in `metadata.name` this will be the name returned. + // Otherwise, a name will be generated by calling + // `AddHelm.of(this).generatedObjectName(this)`, which by default uses the + // construct path to generate a DNS-compatible name for the resource. + Name() *string + // The tree node. + Node() constructs.Node + // Create a dependency between this ApiObject and other constructs. + // + // These can be other ApiObjects, Charts, or custom. + AddDependency(dependencies ...constructs.IConstruct) + // Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. + // + // Example: + // kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true)); + // + AddJsonPatch(ops ...cdk8s.JsonPatch) + // Renders the object to Kubernetes JSON. + ToJson() interface{} + // Returns a string representation of this construct. + ToString() *string +} + +// The jsii proxy struct for KubePersistentVolumeClaim +type jsiiProxy_KubePersistentVolumeClaim struct { + internal.Type__cdk8sApiObject +} + +func (j *jsiiProxy_KubePersistentVolumeClaim) ApiGroup() *string { + var returns *string + _jsii_.Get( + j, + "apiGroup", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubePersistentVolumeClaim) ApiVersion() *string { + var returns *string + _jsii_.Get( + j, + "apiVersion", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubePersistentVolumeClaim) Chart() cdk8s.Chart { + var returns cdk8s.Chart + _jsii_.Get( + j, + "chart", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubePersistentVolumeClaim) Kind() *string { + var returns *string + _jsii_.Get( + j, + "kind", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubePersistentVolumeClaim) Metadata() cdk8s.ApiObjectMetadataDefinition { + var returns cdk8s.ApiObjectMetadataDefinition + _jsii_.Get( + j, + "metadata", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubePersistentVolumeClaim) Name() *string { + var returns *string + _jsii_.Get( + j, + "name", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubePersistentVolumeClaim) Node() constructs.Node { + var returns constructs.Node + _jsii_.Get( + j, + "node", + &returns, + ) + return returns +} + +// Defines a "io.k8s.api.core.v1.PersistentVolumeClaim" API object. +func NewKubePersistentVolumeClaim(scope constructs.Construct, id *string, props *KubePersistentVolumeClaimProps) KubePersistentVolumeClaim { + _init_.Initialize() + + j := jsiiProxy_KubePersistentVolumeClaim{} + + _jsii_.Create( + "k8s.KubePersistentVolumeClaim", + []interface{}{scope, id, props}, + &j, + ) + + return &j +} + +// Defines a "io.k8s.api.core.v1.PersistentVolumeClaim" API object. +func NewKubePersistentVolumeClaim_Override(k KubePersistentVolumeClaim, scope constructs.Construct, id *string, props *KubePersistentVolumeClaimProps) { + _init_.Initialize() + + _jsii_.Create( + "k8s.KubePersistentVolumeClaim", + []interface{}{scope, id, props}, + k, + ) +} + +// Checks if `x` is a construct. +// +// Use this method instead of `instanceof` to properly detect `Construct` +// instances, even when the construct library is symlinked. +// +// Explanation: in JavaScript, multiple copies of the `constructs` library on +// disk are seen as independent, completely different libraries. As a +// consequence, the class `Construct` in each copy of the `constructs` library +// is seen as a different class, and an instance of one class will not test as +// `instanceof` the other class. `npm install` will not create installations +// like this, but users may manually symlink construct libraries together or +// use a monorepo tool: in those cases, multiple copies of the `constructs` +// library can be accidentally installed, and `instanceof` will behave +// unpredictably. It is safest to avoid using `instanceof`, and using +// this type-testing method instead. +// +// Returns: true if `x` is an object created from a class which extends `Construct`. +func KubePersistentVolumeClaim_IsConstruct(x interface{}) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "k8s.KubePersistentVolumeClaim", + "isConstruct", + []interface{}{x}, + &returns, + ) + + return returns +} + +// Renders a Kubernetes manifest for "io.k8s.api.core.v1.PersistentVolumeClaim". +// +// This can be used to inline resource manifests inside other objects (e.g. as templates). +func KubePersistentVolumeClaim_Manifest(props *KubePersistentVolumeClaimProps) interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "k8s.KubePersistentVolumeClaim", + "manifest", + []interface{}{props}, + &returns, + ) + + return returns +} + +// Returns the `ApiObject` named `Resource` which is a child of the given construct. +// +// If `c` is an `ApiObject`, it is returned directly. Throws an +// exception if the construct does not have a child named `Default` _or_ if +// this child is not an `ApiObject`. +func KubePersistentVolumeClaim_Of(c constructs.IConstruct) cdk8s.ApiObject { + _init_.Initialize() + + var returns cdk8s.ApiObject + + _jsii_.StaticInvoke( + "k8s.KubePersistentVolumeClaim", + "of", + []interface{}{c}, + &returns, + ) + + return returns +} + +func KubePersistentVolumeClaim_GVK() *cdk8s.GroupVersionKind { + _init_.Initialize() + var returns *cdk8s.GroupVersionKind + _jsii_.StaticGet( + "k8s.KubePersistentVolumeClaim", + "GVK", + &returns, + ) + return returns +} + +func (k *jsiiProxy_KubePersistentVolumeClaim) AddDependency(dependencies ...constructs.IConstruct) { + args := []interface{}{} + for _, a := range dependencies { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addDependency", + args, + ) +} + +func (k *jsiiProxy_KubePersistentVolumeClaim) AddJsonPatch(ops ...cdk8s.JsonPatch) { + args := []interface{}{} + for _, a := range ops { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addJsonPatch", + args, + ) +} + +func (k *jsiiProxy_KubePersistentVolumeClaim) ToJson() interface{} { + var returns interface{} + + _jsii_.Invoke( + k, + "toJson", + nil, // no parameters + &returns, + ) + + return returns +} + +func (k *jsiiProxy_KubePersistentVolumeClaim) ToString() *string { + var returns *string + + _jsii_.Invoke( + k, + "toString", + nil, // no parameters + &returns, + ) + + return returns +} + +// PersistentVolumeClaimList is a list of PersistentVolumeClaim items. +type KubePersistentVolumeClaimList interface { + cdk8s.ApiObject + // The group portion of the API version (e.g. `authorization.k8s.io`). + ApiGroup() *string + // The object's API version (e.g. `authorization.k8s.io/v1`). + ApiVersion() *string + // The chart in which this object is defined. + Chart() cdk8s.Chart + // The object kind. + Kind() *string + // Metadata associated with this API object. + Metadata() cdk8s.ApiObjectMetadataDefinition + // The name of the API object. + // + // If a name is specified in `metadata.name` this will be the name returned. + // Otherwise, a name will be generated by calling + // `AddHelm.of(this).generatedObjectName(this)`, which by default uses the + // construct path to generate a DNS-compatible name for the resource. + Name() *string + // The tree node. + Node() constructs.Node + // Create a dependency between this ApiObject and other constructs. + // + // These can be other ApiObjects, Charts, or custom. + AddDependency(dependencies ...constructs.IConstruct) + // Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. + // + // Example: + // kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true)); + // + AddJsonPatch(ops ...cdk8s.JsonPatch) + // Renders the object to Kubernetes JSON. + ToJson() interface{} + // Returns a string representation of this construct. + ToString() *string +} + +// The jsii proxy struct for KubePersistentVolumeClaimList +type jsiiProxy_KubePersistentVolumeClaimList struct { + internal.Type__cdk8sApiObject +} + +func (j *jsiiProxy_KubePersistentVolumeClaimList) ApiGroup() *string { + var returns *string + _jsii_.Get( + j, + "apiGroup", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubePersistentVolumeClaimList) ApiVersion() *string { + var returns *string + _jsii_.Get( + j, + "apiVersion", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubePersistentVolumeClaimList) Chart() cdk8s.Chart { + var returns cdk8s.Chart + _jsii_.Get( + j, + "chart", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubePersistentVolumeClaimList) Kind() *string { + var returns *string + _jsii_.Get( + j, + "kind", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubePersistentVolumeClaimList) Metadata() cdk8s.ApiObjectMetadataDefinition { + var returns cdk8s.ApiObjectMetadataDefinition + _jsii_.Get( + j, + "metadata", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubePersistentVolumeClaimList) Name() *string { + var returns *string + _jsii_.Get( + j, + "name", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubePersistentVolumeClaimList) Node() constructs.Node { + var returns constructs.Node + _jsii_.Get( + j, + "node", + &returns, + ) + return returns +} + +// Defines a "io.k8s.api.core.v1.PersistentVolumeClaimList" API object. +func NewKubePersistentVolumeClaimList(scope constructs.Construct, id *string, props *KubePersistentVolumeClaimListProps) KubePersistentVolumeClaimList { + _init_.Initialize() + + j := jsiiProxy_KubePersistentVolumeClaimList{} + + _jsii_.Create( + "k8s.KubePersistentVolumeClaimList", + []interface{}{scope, id, props}, + &j, + ) + + return &j +} + +// Defines a "io.k8s.api.core.v1.PersistentVolumeClaimList" API object. +func NewKubePersistentVolumeClaimList_Override(k KubePersistentVolumeClaimList, scope constructs.Construct, id *string, props *KubePersistentVolumeClaimListProps) { + _init_.Initialize() + + _jsii_.Create( + "k8s.KubePersistentVolumeClaimList", + []interface{}{scope, id, props}, + k, + ) +} + +// Checks if `x` is a construct. +// +// Use this method instead of `instanceof` to properly detect `Construct` +// instances, even when the construct library is symlinked. +// +// Explanation: in JavaScript, multiple copies of the `constructs` library on +// disk are seen as independent, completely different libraries. As a +// consequence, the class `Construct` in each copy of the `constructs` library +// is seen as a different class, and an instance of one class will not test as +// `instanceof` the other class. `npm install` will not create installations +// like this, but users may manually symlink construct libraries together or +// use a monorepo tool: in those cases, multiple copies of the `constructs` +// library can be accidentally installed, and `instanceof` will behave +// unpredictably. It is safest to avoid using `instanceof`, and using +// this type-testing method instead. +// +// Returns: true if `x` is an object created from a class which extends `Construct`. +func KubePersistentVolumeClaimList_IsConstruct(x interface{}) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "k8s.KubePersistentVolumeClaimList", + "isConstruct", + []interface{}{x}, + &returns, + ) + + return returns +} + +// Renders a Kubernetes manifest for "io.k8s.api.core.v1.PersistentVolumeClaimList". +// +// This can be used to inline resource manifests inside other objects (e.g. as templates). +func KubePersistentVolumeClaimList_Manifest(props *KubePersistentVolumeClaimListProps) interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "k8s.KubePersistentVolumeClaimList", + "manifest", + []interface{}{props}, + &returns, + ) + + return returns +} + +// Returns the `ApiObject` named `Resource` which is a child of the given construct. +// +// If `c` is an `ApiObject`, it is returned directly. Throws an +// exception if the construct does not have a child named `Default` _or_ if +// this child is not an `ApiObject`. +func KubePersistentVolumeClaimList_Of(c constructs.IConstruct) cdk8s.ApiObject { + _init_.Initialize() + + var returns cdk8s.ApiObject + + _jsii_.StaticInvoke( + "k8s.KubePersistentVolumeClaimList", + "of", + []interface{}{c}, + &returns, + ) + + return returns +} + +func KubePersistentVolumeClaimList_GVK() *cdk8s.GroupVersionKind { + _init_.Initialize() + var returns *cdk8s.GroupVersionKind + _jsii_.StaticGet( + "k8s.KubePersistentVolumeClaimList", + "GVK", + &returns, + ) + return returns +} + +func (k *jsiiProxy_KubePersistentVolumeClaimList) AddDependency(dependencies ...constructs.IConstruct) { + args := []interface{}{} + for _, a := range dependencies { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addDependency", + args, + ) +} + +func (k *jsiiProxy_KubePersistentVolumeClaimList) AddJsonPatch(ops ...cdk8s.JsonPatch) { + args := []interface{}{} + for _, a := range ops { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addJsonPatch", + args, + ) +} + +func (k *jsiiProxy_KubePersistentVolumeClaimList) ToJson() interface{} { + var returns interface{} + + _jsii_.Invoke( + k, + "toJson", + nil, // no parameters + &returns, + ) + + return returns +} + +func (k *jsiiProxy_KubePersistentVolumeClaimList) ToString() *string { + var returns *string + + _jsii_.Invoke( + k, + "toString", + nil, // no parameters + &returns, + ) + + return returns +} + +// PersistentVolumeClaimList is a list of PersistentVolumeClaim items. +type KubePersistentVolumeClaimListProps struct { + // A list of persistent volume claims. + // + // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims + Items *[]*KubePersistentVolumeClaimProps `field:"required" json:"items" yaml:"items"` + // Standard list metadata. + // + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + Metadata *ListMeta `field:"optional" json:"metadata" yaml:"metadata"` +} + +// PersistentVolumeClaim is a user's request for and claim to a persistent volume. +type KubePersistentVolumeClaimProps struct { + // Standard object's metadata. + // + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + Metadata *ObjectMeta `field:"optional" json:"metadata" yaml:"metadata"` + // Spec defines the desired characteristics of a volume requested by a pod author. + // + // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims + Spec *PersistentVolumeClaimSpec `field:"optional" json:"spec" yaml:"spec"` +} + +// PersistentVolumeList is a list of PersistentVolume items. +type KubePersistentVolumeList interface { + cdk8s.ApiObject + // The group portion of the API version (e.g. `authorization.k8s.io`). + ApiGroup() *string + // The object's API version (e.g. `authorization.k8s.io/v1`). + ApiVersion() *string + // The chart in which this object is defined. + Chart() cdk8s.Chart + // The object kind. + Kind() *string + // Metadata associated with this API object. + Metadata() cdk8s.ApiObjectMetadataDefinition + // The name of the API object. + // + // If a name is specified in `metadata.name` this will be the name returned. + // Otherwise, a name will be generated by calling + // `AddHelm.of(this).generatedObjectName(this)`, which by default uses the + // construct path to generate a DNS-compatible name for the resource. + Name() *string + // The tree node. + Node() constructs.Node + // Create a dependency between this ApiObject and other constructs. + // + // These can be other ApiObjects, Charts, or custom. + AddDependency(dependencies ...constructs.IConstruct) + // Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. + // + // Example: + // kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true)); + // + AddJsonPatch(ops ...cdk8s.JsonPatch) + // Renders the object to Kubernetes JSON. + ToJson() interface{} + // Returns a string representation of this construct. + ToString() *string +} + +// The jsii proxy struct for KubePersistentVolumeList +type jsiiProxy_KubePersistentVolumeList struct { + internal.Type__cdk8sApiObject +} + +func (j *jsiiProxy_KubePersistentVolumeList) ApiGroup() *string { + var returns *string + _jsii_.Get( + j, + "apiGroup", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubePersistentVolumeList) ApiVersion() *string { + var returns *string + _jsii_.Get( + j, + "apiVersion", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubePersistentVolumeList) Chart() cdk8s.Chart { + var returns cdk8s.Chart + _jsii_.Get( + j, + "chart", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubePersistentVolumeList) Kind() *string { + var returns *string + _jsii_.Get( + j, + "kind", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubePersistentVolumeList) Metadata() cdk8s.ApiObjectMetadataDefinition { + var returns cdk8s.ApiObjectMetadataDefinition + _jsii_.Get( + j, + "metadata", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubePersistentVolumeList) Name() *string { + var returns *string + _jsii_.Get( + j, + "name", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubePersistentVolumeList) Node() constructs.Node { + var returns constructs.Node + _jsii_.Get( + j, + "node", + &returns, + ) + return returns +} + +// Defines a "io.k8s.api.core.v1.PersistentVolumeList" API object. +func NewKubePersistentVolumeList(scope constructs.Construct, id *string, props *KubePersistentVolumeListProps) KubePersistentVolumeList { + _init_.Initialize() + + j := jsiiProxy_KubePersistentVolumeList{} + + _jsii_.Create( + "k8s.KubePersistentVolumeList", + []interface{}{scope, id, props}, + &j, + ) + + return &j +} + +// Defines a "io.k8s.api.core.v1.PersistentVolumeList" API object. +func NewKubePersistentVolumeList_Override(k KubePersistentVolumeList, scope constructs.Construct, id *string, props *KubePersistentVolumeListProps) { + _init_.Initialize() + + _jsii_.Create( + "k8s.KubePersistentVolumeList", + []interface{}{scope, id, props}, + k, + ) +} + +// Checks if `x` is a construct. +// +// Use this method instead of `instanceof` to properly detect `Construct` +// instances, even when the construct library is symlinked. +// +// Explanation: in JavaScript, multiple copies of the `constructs` library on +// disk are seen as independent, completely different libraries. As a +// consequence, the class `Construct` in each copy of the `constructs` library +// is seen as a different class, and an instance of one class will not test as +// `instanceof` the other class. `npm install` will not create installations +// like this, but users may manually symlink construct libraries together or +// use a monorepo tool: in those cases, multiple copies of the `constructs` +// library can be accidentally installed, and `instanceof` will behave +// unpredictably. It is safest to avoid using `instanceof`, and using +// this type-testing method instead. +// +// Returns: true if `x` is an object created from a class which extends `Construct`. +func KubePersistentVolumeList_IsConstruct(x interface{}) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "k8s.KubePersistentVolumeList", + "isConstruct", + []interface{}{x}, + &returns, + ) + + return returns +} + +// Renders a Kubernetes manifest for "io.k8s.api.core.v1.PersistentVolumeList". +// +// This can be used to inline resource manifests inside other objects (e.g. as templates). +func KubePersistentVolumeList_Manifest(props *KubePersistentVolumeListProps) interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "k8s.KubePersistentVolumeList", + "manifest", + []interface{}{props}, + &returns, + ) + + return returns +} + +// Returns the `ApiObject` named `Resource` which is a child of the given construct. +// +// If `c` is an `ApiObject`, it is returned directly. Throws an +// exception if the construct does not have a child named `Default` _or_ if +// this child is not an `ApiObject`. +func KubePersistentVolumeList_Of(c constructs.IConstruct) cdk8s.ApiObject { + _init_.Initialize() + + var returns cdk8s.ApiObject + + _jsii_.StaticInvoke( + "k8s.KubePersistentVolumeList", + "of", + []interface{}{c}, + &returns, + ) + + return returns +} + +func KubePersistentVolumeList_GVK() *cdk8s.GroupVersionKind { + _init_.Initialize() + var returns *cdk8s.GroupVersionKind + _jsii_.StaticGet( + "k8s.KubePersistentVolumeList", + "GVK", + &returns, + ) + return returns +} + +func (k *jsiiProxy_KubePersistentVolumeList) AddDependency(dependencies ...constructs.IConstruct) { + args := []interface{}{} + for _, a := range dependencies { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addDependency", + args, + ) +} + +func (k *jsiiProxy_KubePersistentVolumeList) AddJsonPatch(ops ...cdk8s.JsonPatch) { + args := []interface{}{} + for _, a := range ops { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addJsonPatch", + args, + ) +} + +func (k *jsiiProxy_KubePersistentVolumeList) ToJson() interface{} { + var returns interface{} + + _jsii_.Invoke( + k, + "toJson", + nil, // no parameters + &returns, + ) + + return returns +} + +func (k *jsiiProxy_KubePersistentVolumeList) ToString() *string { + var returns *string + + _jsii_.Invoke( + k, + "toString", + nil, // no parameters + &returns, + ) + + return returns +} + +// PersistentVolumeList is a list of PersistentVolume items. +type KubePersistentVolumeListProps struct { + // List of persistent volumes. + // + // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes + Items *[]*KubePersistentVolumeProps `field:"required" json:"items" yaml:"items"` + // Standard list metadata. + // + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + Metadata *ListMeta `field:"optional" json:"metadata" yaml:"metadata"` +} + +// PersistentVolume (PV) is a storage resource provisioned by an administrator. +// +// It is analogous to a node. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes +type KubePersistentVolumeProps struct { + // Standard object's metadata. + // + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + Metadata *ObjectMeta `field:"optional" json:"metadata" yaml:"metadata"` + // Spec defines a specification of a persistent volume owned by the cluster. + // + // Provisioned by an administrator. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistent-volumes + Spec *PersistentVolumeSpec `field:"optional" json:"spec" yaml:"spec"` +} + +// Pod is a collection of containers that can run on a host. +// +// This resource is created by clients and scheduled onto hosts. +type KubePod interface { + cdk8s.ApiObject + // The group portion of the API version (e.g. `authorization.k8s.io`). + ApiGroup() *string + // The object's API version (e.g. `authorization.k8s.io/v1`). + ApiVersion() *string + // The chart in which this object is defined. + Chart() cdk8s.Chart + // The object kind. + Kind() *string + // Metadata associated with this API object. + Metadata() cdk8s.ApiObjectMetadataDefinition + // The name of the API object. + // + // If a name is specified in `metadata.name` this will be the name returned. + // Otherwise, a name will be generated by calling + // `AddHelm.of(this).generatedObjectName(this)`, which by default uses the + // construct path to generate a DNS-compatible name for the resource. + Name() *string + // The tree node. + Node() constructs.Node + // Create a dependency between this ApiObject and other constructs. + // + // These can be other ApiObjects, Charts, or custom. + AddDependency(dependencies ...constructs.IConstruct) + // Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. + // + // Example: + // kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true)); + // + AddJsonPatch(ops ...cdk8s.JsonPatch) + // Renders the object to Kubernetes JSON. + ToJson() interface{} + // Returns a string representation of this construct. + ToString() *string +} + +// The jsii proxy struct for KubePod +type jsiiProxy_KubePod struct { + internal.Type__cdk8sApiObject +} + +func (j *jsiiProxy_KubePod) ApiGroup() *string { + var returns *string + _jsii_.Get( + j, + "apiGroup", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubePod) ApiVersion() *string { + var returns *string + _jsii_.Get( + j, + "apiVersion", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubePod) Chart() cdk8s.Chart { + var returns cdk8s.Chart + _jsii_.Get( + j, + "chart", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubePod) Kind() *string { + var returns *string + _jsii_.Get( + j, + "kind", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubePod) Metadata() cdk8s.ApiObjectMetadataDefinition { + var returns cdk8s.ApiObjectMetadataDefinition + _jsii_.Get( + j, + "metadata", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubePod) Name() *string { + var returns *string + _jsii_.Get( + j, + "name", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubePod) Node() constructs.Node { + var returns constructs.Node + _jsii_.Get( + j, + "node", + &returns, + ) + return returns +} + +// Defines a "io.k8s.api.core.v1.Pod" API object. +func NewKubePod(scope constructs.Construct, id *string, props *KubePodProps) KubePod { + _init_.Initialize() + + j := jsiiProxy_KubePod{} + + _jsii_.Create( + "k8s.KubePod", + []interface{}{scope, id, props}, + &j, + ) + + return &j +} + +// Defines a "io.k8s.api.core.v1.Pod" API object. +func NewKubePod_Override(k KubePod, scope constructs.Construct, id *string, props *KubePodProps) { + _init_.Initialize() + + _jsii_.Create( + "k8s.KubePod", + []interface{}{scope, id, props}, + k, + ) +} + +// Checks if `x` is a construct. +// +// Use this method instead of `instanceof` to properly detect `Construct` +// instances, even when the construct library is symlinked. +// +// Explanation: in JavaScript, multiple copies of the `constructs` library on +// disk are seen as independent, completely different libraries. As a +// consequence, the class `Construct` in each copy of the `constructs` library +// is seen as a different class, and an instance of one class will not test as +// `instanceof` the other class. `npm install` will not create installations +// like this, but users may manually symlink construct libraries together or +// use a monorepo tool: in those cases, multiple copies of the `constructs` +// library can be accidentally installed, and `instanceof` will behave +// unpredictably. It is safest to avoid using `instanceof`, and using +// this type-testing method instead. +// +// Returns: true if `x` is an object created from a class which extends `Construct`. +func KubePod_IsConstruct(x interface{}) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "k8s.KubePod", + "isConstruct", + []interface{}{x}, + &returns, + ) + + return returns +} + +// Renders a Kubernetes manifest for "io.k8s.api.core.v1.Pod". +// +// This can be used to inline resource manifests inside other objects (e.g. as templates). +func KubePod_Manifest(props *KubePodProps) interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "k8s.KubePod", + "manifest", + []interface{}{props}, + &returns, + ) + + return returns +} + +// Returns the `ApiObject` named `Resource` which is a child of the given construct. +// +// If `c` is an `ApiObject`, it is returned directly. Throws an +// exception if the construct does not have a child named `Default` _or_ if +// this child is not an `ApiObject`. +func KubePod_Of(c constructs.IConstruct) cdk8s.ApiObject { + _init_.Initialize() + + var returns cdk8s.ApiObject + + _jsii_.StaticInvoke( + "k8s.KubePod", + "of", + []interface{}{c}, + &returns, + ) + + return returns +} + +func KubePod_GVK() *cdk8s.GroupVersionKind { + _init_.Initialize() + var returns *cdk8s.GroupVersionKind + _jsii_.StaticGet( + "k8s.KubePod", + "GVK", + &returns, + ) + return returns +} + +func (k *jsiiProxy_KubePod) AddDependency(dependencies ...constructs.IConstruct) { + args := []interface{}{} + for _, a := range dependencies { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addDependency", + args, + ) +} + +func (k *jsiiProxy_KubePod) AddJsonPatch(ops ...cdk8s.JsonPatch) { + args := []interface{}{} + for _, a := range ops { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addJsonPatch", + args, + ) +} + +func (k *jsiiProxy_KubePod) ToJson() interface{} { + var returns interface{} + + _jsii_.Invoke( + k, + "toJson", + nil, // no parameters + &returns, + ) + + return returns +} + +func (k *jsiiProxy_KubePod) ToString() *string { + var returns *string + + _jsii_.Invoke( + k, + "toString", + nil, // no parameters + &returns, + ) + + return returns +} + +// PodDisruptionBudget is an object to define the max disruption that can be caused to a collection of pods. +type KubePodDisruptionBudget interface { + cdk8s.ApiObject + // The group portion of the API version (e.g. `authorization.k8s.io`). + ApiGroup() *string + // The object's API version (e.g. `authorization.k8s.io/v1`). + ApiVersion() *string + // The chart in which this object is defined. + Chart() cdk8s.Chart + // The object kind. + Kind() *string + // Metadata associated with this API object. + Metadata() cdk8s.ApiObjectMetadataDefinition + // The name of the API object. + // + // If a name is specified in `metadata.name` this will be the name returned. + // Otherwise, a name will be generated by calling + // `AddHelm.of(this).generatedObjectName(this)`, which by default uses the + // construct path to generate a DNS-compatible name for the resource. + Name() *string + // The tree node. + Node() constructs.Node + // Create a dependency between this ApiObject and other constructs. + // + // These can be other ApiObjects, Charts, or custom. + AddDependency(dependencies ...constructs.IConstruct) + // Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. + // + // Example: + // kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true)); + // + AddJsonPatch(ops ...cdk8s.JsonPatch) + // Renders the object to Kubernetes JSON. + ToJson() interface{} + // Returns a string representation of this construct. + ToString() *string +} + +// The jsii proxy struct for KubePodDisruptionBudget +type jsiiProxy_KubePodDisruptionBudget struct { + internal.Type__cdk8sApiObject +} + +func (j *jsiiProxy_KubePodDisruptionBudget) ApiGroup() *string { + var returns *string + _jsii_.Get( + j, + "apiGroup", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubePodDisruptionBudget) ApiVersion() *string { + var returns *string + _jsii_.Get( + j, + "apiVersion", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubePodDisruptionBudget) Chart() cdk8s.Chart { + var returns cdk8s.Chart + _jsii_.Get( + j, + "chart", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubePodDisruptionBudget) Kind() *string { + var returns *string + _jsii_.Get( + j, + "kind", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubePodDisruptionBudget) Metadata() cdk8s.ApiObjectMetadataDefinition { + var returns cdk8s.ApiObjectMetadataDefinition + _jsii_.Get( + j, + "metadata", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubePodDisruptionBudget) Name() *string { + var returns *string + _jsii_.Get( + j, + "name", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubePodDisruptionBudget) Node() constructs.Node { + var returns constructs.Node + _jsii_.Get( + j, + "node", + &returns, + ) + return returns +} + +// Defines a "io.k8s.api.policy.v1.PodDisruptionBudget" API object. +func NewKubePodDisruptionBudget(scope constructs.Construct, id *string, props *KubePodDisruptionBudgetProps) KubePodDisruptionBudget { + _init_.Initialize() + + j := jsiiProxy_KubePodDisruptionBudget{} + + _jsii_.Create( + "k8s.KubePodDisruptionBudget", + []interface{}{scope, id, props}, + &j, + ) + + return &j +} + +// Defines a "io.k8s.api.policy.v1.PodDisruptionBudget" API object. +func NewKubePodDisruptionBudget_Override(k KubePodDisruptionBudget, scope constructs.Construct, id *string, props *KubePodDisruptionBudgetProps) { + _init_.Initialize() + + _jsii_.Create( + "k8s.KubePodDisruptionBudget", + []interface{}{scope, id, props}, + k, + ) +} + +// Checks if `x` is a construct. +// +// Use this method instead of `instanceof` to properly detect `Construct` +// instances, even when the construct library is symlinked. +// +// Explanation: in JavaScript, multiple copies of the `constructs` library on +// disk are seen as independent, completely different libraries. As a +// consequence, the class `Construct` in each copy of the `constructs` library +// is seen as a different class, and an instance of one class will not test as +// `instanceof` the other class. `npm install` will not create installations +// like this, but users may manually symlink construct libraries together or +// use a monorepo tool: in those cases, multiple copies of the `constructs` +// library can be accidentally installed, and `instanceof` will behave +// unpredictably. It is safest to avoid using `instanceof`, and using +// this type-testing method instead. +// +// Returns: true if `x` is an object created from a class which extends `Construct`. +func KubePodDisruptionBudget_IsConstruct(x interface{}) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "k8s.KubePodDisruptionBudget", + "isConstruct", + []interface{}{x}, + &returns, + ) + + return returns +} + +// Renders a Kubernetes manifest for "io.k8s.api.policy.v1.PodDisruptionBudget". +// +// This can be used to inline resource manifests inside other objects (e.g. as templates). +func KubePodDisruptionBudget_Manifest(props *KubePodDisruptionBudgetProps) interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "k8s.KubePodDisruptionBudget", + "manifest", + []interface{}{props}, + &returns, + ) + + return returns +} + +// Returns the `ApiObject` named `Resource` which is a child of the given construct. +// +// If `c` is an `ApiObject`, it is returned directly. Throws an +// exception if the construct does not have a child named `Default` _or_ if +// this child is not an `ApiObject`. +func KubePodDisruptionBudget_Of(c constructs.IConstruct) cdk8s.ApiObject { + _init_.Initialize() + + var returns cdk8s.ApiObject + + _jsii_.StaticInvoke( + "k8s.KubePodDisruptionBudget", + "of", + []interface{}{c}, + &returns, + ) + + return returns +} + +func KubePodDisruptionBudget_GVK() *cdk8s.GroupVersionKind { + _init_.Initialize() + var returns *cdk8s.GroupVersionKind + _jsii_.StaticGet( + "k8s.KubePodDisruptionBudget", + "GVK", + &returns, + ) + return returns +} + +func (k *jsiiProxy_KubePodDisruptionBudget) AddDependency(dependencies ...constructs.IConstruct) { + args := []interface{}{} + for _, a := range dependencies { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addDependency", + args, + ) +} + +func (k *jsiiProxy_KubePodDisruptionBudget) AddJsonPatch(ops ...cdk8s.JsonPatch) { + args := []interface{}{} + for _, a := range ops { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addJsonPatch", + args, + ) +} + +func (k *jsiiProxy_KubePodDisruptionBudget) ToJson() interface{} { + var returns interface{} + + _jsii_.Invoke( + k, + "toJson", + nil, // no parameters + &returns, + ) + + return returns +} + +func (k *jsiiProxy_KubePodDisruptionBudget) ToString() *string { + var returns *string + + _jsii_.Invoke( + k, + "toString", + nil, // no parameters + &returns, + ) + + return returns +} + +// PodDisruptionBudgetList is a collection of PodDisruptionBudgets. +type KubePodDisruptionBudgetList interface { + cdk8s.ApiObject + // The group portion of the API version (e.g. `authorization.k8s.io`). + ApiGroup() *string + // The object's API version (e.g. `authorization.k8s.io/v1`). + ApiVersion() *string + // The chart in which this object is defined. + Chart() cdk8s.Chart + // The object kind. + Kind() *string + // Metadata associated with this API object. + Metadata() cdk8s.ApiObjectMetadataDefinition + // The name of the API object. + // + // If a name is specified in `metadata.name` this will be the name returned. + // Otherwise, a name will be generated by calling + // `AddHelm.of(this).generatedObjectName(this)`, which by default uses the + // construct path to generate a DNS-compatible name for the resource. + Name() *string + // The tree node. + Node() constructs.Node + // Create a dependency between this ApiObject and other constructs. + // + // These can be other ApiObjects, Charts, or custom. + AddDependency(dependencies ...constructs.IConstruct) + // Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. + // + // Example: + // kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true)); + // + AddJsonPatch(ops ...cdk8s.JsonPatch) + // Renders the object to Kubernetes JSON. + ToJson() interface{} + // Returns a string representation of this construct. + ToString() *string +} + +// The jsii proxy struct for KubePodDisruptionBudgetList +type jsiiProxy_KubePodDisruptionBudgetList struct { + internal.Type__cdk8sApiObject +} + +func (j *jsiiProxy_KubePodDisruptionBudgetList) ApiGroup() *string { + var returns *string + _jsii_.Get( + j, + "apiGroup", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubePodDisruptionBudgetList) ApiVersion() *string { + var returns *string + _jsii_.Get( + j, + "apiVersion", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubePodDisruptionBudgetList) Chart() cdk8s.Chart { + var returns cdk8s.Chart + _jsii_.Get( + j, + "chart", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubePodDisruptionBudgetList) Kind() *string { + var returns *string + _jsii_.Get( + j, + "kind", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubePodDisruptionBudgetList) Metadata() cdk8s.ApiObjectMetadataDefinition { + var returns cdk8s.ApiObjectMetadataDefinition + _jsii_.Get( + j, + "metadata", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubePodDisruptionBudgetList) Name() *string { + var returns *string + _jsii_.Get( + j, + "name", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubePodDisruptionBudgetList) Node() constructs.Node { + var returns constructs.Node + _jsii_.Get( + j, + "node", + &returns, + ) + return returns +} + +// Defines a "io.k8s.api.policy.v1.PodDisruptionBudgetList" API object. +func NewKubePodDisruptionBudgetList(scope constructs.Construct, id *string, props *KubePodDisruptionBudgetListProps) KubePodDisruptionBudgetList { + _init_.Initialize() + + j := jsiiProxy_KubePodDisruptionBudgetList{} + + _jsii_.Create( + "k8s.KubePodDisruptionBudgetList", + []interface{}{scope, id, props}, + &j, + ) + + return &j +} + +// Defines a "io.k8s.api.policy.v1.PodDisruptionBudgetList" API object. +func NewKubePodDisruptionBudgetList_Override(k KubePodDisruptionBudgetList, scope constructs.Construct, id *string, props *KubePodDisruptionBudgetListProps) { + _init_.Initialize() + + _jsii_.Create( + "k8s.KubePodDisruptionBudgetList", + []interface{}{scope, id, props}, + k, + ) +} + +// Checks if `x` is a construct. +// +// Use this method instead of `instanceof` to properly detect `Construct` +// instances, even when the construct library is symlinked. +// +// Explanation: in JavaScript, multiple copies of the `constructs` library on +// disk are seen as independent, completely different libraries. As a +// consequence, the class `Construct` in each copy of the `constructs` library +// is seen as a different class, and an instance of one class will not test as +// `instanceof` the other class. `npm install` will not create installations +// like this, but users may manually symlink construct libraries together or +// use a monorepo tool: in those cases, multiple copies of the `constructs` +// library can be accidentally installed, and `instanceof` will behave +// unpredictably. It is safest to avoid using `instanceof`, and using +// this type-testing method instead. +// +// Returns: true if `x` is an object created from a class which extends `Construct`. +func KubePodDisruptionBudgetList_IsConstruct(x interface{}) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "k8s.KubePodDisruptionBudgetList", + "isConstruct", + []interface{}{x}, + &returns, + ) + + return returns +} + +// Renders a Kubernetes manifest for "io.k8s.api.policy.v1.PodDisruptionBudgetList". +// +// This can be used to inline resource manifests inside other objects (e.g. as templates). +func KubePodDisruptionBudgetList_Manifest(props *KubePodDisruptionBudgetListProps) interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "k8s.KubePodDisruptionBudgetList", + "manifest", + []interface{}{props}, + &returns, + ) + + return returns +} + +// Returns the `ApiObject` named `Resource` which is a child of the given construct. +// +// If `c` is an `ApiObject`, it is returned directly. Throws an +// exception if the construct does not have a child named `Default` _or_ if +// this child is not an `ApiObject`. +func KubePodDisruptionBudgetList_Of(c constructs.IConstruct) cdk8s.ApiObject { + _init_.Initialize() + + var returns cdk8s.ApiObject + + _jsii_.StaticInvoke( + "k8s.KubePodDisruptionBudgetList", + "of", + []interface{}{c}, + &returns, + ) + + return returns +} + +func KubePodDisruptionBudgetList_GVK() *cdk8s.GroupVersionKind { + _init_.Initialize() + var returns *cdk8s.GroupVersionKind + _jsii_.StaticGet( + "k8s.KubePodDisruptionBudgetList", + "GVK", + &returns, + ) + return returns +} + +func (k *jsiiProxy_KubePodDisruptionBudgetList) AddDependency(dependencies ...constructs.IConstruct) { + args := []interface{}{} + for _, a := range dependencies { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addDependency", + args, + ) +} + +func (k *jsiiProxy_KubePodDisruptionBudgetList) AddJsonPatch(ops ...cdk8s.JsonPatch) { + args := []interface{}{} + for _, a := range ops { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addJsonPatch", + args, + ) +} + +func (k *jsiiProxy_KubePodDisruptionBudgetList) ToJson() interface{} { + var returns interface{} + + _jsii_.Invoke( + k, + "toJson", + nil, // no parameters + &returns, + ) + + return returns +} + +func (k *jsiiProxy_KubePodDisruptionBudgetList) ToString() *string { + var returns *string + + _jsii_.Invoke( + k, + "toString", + nil, // no parameters + &returns, + ) + + return returns +} + +// PodDisruptionBudgetList is a collection of PodDisruptionBudgets. +type KubePodDisruptionBudgetListProps struct { + // Items is a list of PodDisruptionBudgets. + Items *[]*KubePodDisruptionBudgetProps `field:"required" json:"items" yaml:"items"` + // Standard object's metadata. + // + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + Metadata *ListMeta `field:"optional" json:"metadata" yaml:"metadata"` +} + +// PodDisruptionBudgetList is a collection of PodDisruptionBudgets. +type KubePodDisruptionBudgetListV1Beta1 interface { + cdk8s.ApiObject + // The group portion of the API version (e.g. `authorization.k8s.io`). + ApiGroup() *string + // The object's API version (e.g. `authorization.k8s.io/v1`). + ApiVersion() *string + // The chart in which this object is defined. + Chart() cdk8s.Chart + // The object kind. + Kind() *string + // Metadata associated with this API object. + Metadata() cdk8s.ApiObjectMetadataDefinition + // The name of the API object. + // + // If a name is specified in `metadata.name` this will be the name returned. + // Otherwise, a name will be generated by calling + // `AddHelm.of(this).generatedObjectName(this)`, which by default uses the + // construct path to generate a DNS-compatible name for the resource. + Name() *string + // The tree node. + Node() constructs.Node + // Create a dependency between this ApiObject and other constructs. + // + // These can be other ApiObjects, Charts, or custom. + AddDependency(dependencies ...constructs.IConstruct) + // Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. + // + // Example: + // kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true)); + // + AddJsonPatch(ops ...cdk8s.JsonPatch) + // Renders the object to Kubernetes JSON. + ToJson() interface{} + // Returns a string representation of this construct. + ToString() *string +} + +// The jsii proxy struct for KubePodDisruptionBudgetListV1Beta1 +type jsiiProxy_KubePodDisruptionBudgetListV1Beta1 struct { + internal.Type__cdk8sApiObject +} + +func (j *jsiiProxy_KubePodDisruptionBudgetListV1Beta1) ApiGroup() *string { + var returns *string + _jsii_.Get( + j, + "apiGroup", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubePodDisruptionBudgetListV1Beta1) ApiVersion() *string { + var returns *string + _jsii_.Get( + j, + "apiVersion", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubePodDisruptionBudgetListV1Beta1) Chart() cdk8s.Chart { + var returns cdk8s.Chart + _jsii_.Get( + j, + "chart", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubePodDisruptionBudgetListV1Beta1) Kind() *string { + var returns *string + _jsii_.Get( + j, + "kind", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubePodDisruptionBudgetListV1Beta1) Metadata() cdk8s.ApiObjectMetadataDefinition { + var returns cdk8s.ApiObjectMetadataDefinition + _jsii_.Get( + j, + "metadata", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubePodDisruptionBudgetListV1Beta1) Name() *string { + var returns *string + _jsii_.Get( + j, + "name", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubePodDisruptionBudgetListV1Beta1) Node() constructs.Node { + var returns constructs.Node + _jsii_.Get( + j, + "node", + &returns, + ) + return returns +} + +// Defines a "io.k8s.api.policy.v1beta1.PodDisruptionBudgetList" API object. +func NewKubePodDisruptionBudgetListV1Beta1(scope constructs.Construct, id *string, props *KubePodDisruptionBudgetListV1Beta1Props) KubePodDisruptionBudgetListV1Beta1 { + _init_.Initialize() + + j := jsiiProxy_KubePodDisruptionBudgetListV1Beta1{} + + _jsii_.Create( + "k8s.KubePodDisruptionBudgetListV1Beta1", + []interface{}{scope, id, props}, + &j, + ) + + return &j +} + +// Defines a "io.k8s.api.policy.v1beta1.PodDisruptionBudgetList" API object. +func NewKubePodDisruptionBudgetListV1Beta1_Override(k KubePodDisruptionBudgetListV1Beta1, scope constructs.Construct, id *string, props *KubePodDisruptionBudgetListV1Beta1Props) { + _init_.Initialize() + + _jsii_.Create( + "k8s.KubePodDisruptionBudgetListV1Beta1", + []interface{}{scope, id, props}, + k, + ) +} + +// Checks if `x` is a construct. +// +// Use this method instead of `instanceof` to properly detect `Construct` +// instances, even when the construct library is symlinked. +// +// Explanation: in JavaScript, multiple copies of the `constructs` library on +// disk are seen as independent, completely different libraries. As a +// consequence, the class `Construct` in each copy of the `constructs` library +// is seen as a different class, and an instance of one class will not test as +// `instanceof` the other class. `npm install` will not create installations +// like this, but users may manually symlink construct libraries together or +// use a monorepo tool: in those cases, multiple copies of the `constructs` +// library can be accidentally installed, and `instanceof` will behave +// unpredictably. It is safest to avoid using `instanceof`, and using +// this type-testing method instead. +// +// Returns: true if `x` is an object created from a class which extends `Construct`. +func KubePodDisruptionBudgetListV1Beta1_IsConstruct(x interface{}) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "k8s.KubePodDisruptionBudgetListV1Beta1", + "isConstruct", + []interface{}{x}, + &returns, + ) + + return returns +} + +// Renders a Kubernetes manifest for "io.k8s.api.policy.v1beta1.PodDisruptionBudgetList". +// +// This can be used to inline resource manifests inside other objects (e.g. as templates). +func KubePodDisruptionBudgetListV1Beta1_Manifest(props *KubePodDisruptionBudgetListV1Beta1Props) interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "k8s.KubePodDisruptionBudgetListV1Beta1", + "manifest", + []interface{}{props}, + &returns, + ) + + return returns +} + +// Returns the `ApiObject` named `Resource` which is a child of the given construct. +// +// If `c` is an `ApiObject`, it is returned directly. Throws an +// exception if the construct does not have a child named `Default` _or_ if +// this child is not an `ApiObject`. +func KubePodDisruptionBudgetListV1Beta1_Of(c constructs.IConstruct) cdk8s.ApiObject { + _init_.Initialize() + + var returns cdk8s.ApiObject + + _jsii_.StaticInvoke( + "k8s.KubePodDisruptionBudgetListV1Beta1", + "of", + []interface{}{c}, + &returns, + ) + + return returns +} + +func KubePodDisruptionBudgetListV1Beta1_GVK() *cdk8s.GroupVersionKind { + _init_.Initialize() + var returns *cdk8s.GroupVersionKind + _jsii_.StaticGet( + "k8s.KubePodDisruptionBudgetListV1Beta1", + "GVK", + &returns, + ) + return returns +} + +func (k *jsiiProxy_KubePodDisruptionBudgetListV1Beta1) AddDependency(dependencies ...constructs.IConstruct) { + args := []interface{}{} + for _, a := range dependencies { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addDependency", + args, + ) +} + +func (k *jsiiProxy_KubePodDisruptionBudgetListV1Beta1) AddJsonPatch(ops ...cdk8s.JsonPatch) { + args := []interface{}{} + for _, a := range ops { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addJsonPatch", + args, + ) +} + +func (k *jsiiProxy_KubePodDisruptionBudgetListV1Beta1) ToJson() interface{} { + var returns interface{} + + _jsii_.Invoke( + k, + "toJson", + nil, // no parameters + &returns, + ) + + return returns +} + +func (k *jsiiProxy_KubePodDisruptionBudgetListV1Beta1) ToString() *string { + var returns *string + + _jsii_.Invoke( + k, + "toString", + nil, // no parameters + &returns, + ) + + return returns +} + +// PodDisruptionBudgetList is a collection of PodDisruptionBudgets. +type KubePodDisruptionBudgetListV1Beta1Props struct { + // items list individual PodDisruptionBudget objects. + Items *[]*KubePodDisruptionBudgetV1Beta1Props `field:"required" json:"items" yaml:"items"` + // Standard object's metadata. + // + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + Metadata *ListMeta `field:"optional" json:"metadata" yaml:"metadata"` +} + +// PodDisruptionBudget is an object to define the max disruption that can be caused to a collection of pods. +type KubePodDisruptionBudgetProps struct { + // Standard object's metadata. + // + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + Metadata *ObjectMeta `field:"optional" json:"metadata" yaml:"metadata"` + // Specification of the desired behavior of the PodDisruptionBudget. + Spec *PodDisruptionBudgetSpec `field:"optional" json:"spec" yaml:"spec"` +} + +// PodDisruptionBudget is an object to define the max disruption that can be caused to a collection of pods. +type KubePodDisruptionBudgetV1Beta1 interface { + cdk8s.ApiObject + // The group portion of the API version (e.g. `authorization.k8s.io`). + ApiGroup() *string + // The object's API version (e.g. `authorization.k8s.io/v1`). + ApiVersion() *string + // The chart in which this object is defined. + Chart() cdk8s.Chart + // The object kind. + Kind() *string + // Metadata associated with this API object. + Metadata() cdk8s.ApiObjectMetadataDefinition + // The name of the API object. + // + // If a name is specified in `metadata.name` this will be the name returned. + // Otherwise, a name will be generated by calling + // `AddHelm.of(this).generatedObjectName(this)`, which by default uses the + // construct path to generate a DNS-compatible name for the resource. + Name() *string + // The tree node. + Node() constructs.Node + // Create a dependency between this ApiObject and other constructs. + // + // These can be other ApiObjects, Charts, or custom. + AddDependency(dependencies ...constructs.IConstruct) + // Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. + // + // Example: + // kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true)); + // + AddJsonPatch(ops ...cdk8s.JsonPatch) + // Renders the object to Kubernetes JSON. + ToJson() interface{} + // Returns a string representation of this construct. + ToString() *string +} + +// The jsii proxy struct for KubePodDisruptionBudgetV1Beta1 +type jsiiProxy_KubePodDisruptionBudgetV1Beta1 struct { + internal.Type__cdk8sApiObject +} + +func (j *jsiiProxy_KubePodDisruptionBudgetV1Beta1) ApiGroup() *string { + var returns *string + _jsii_.Get( + j, + "apiGroup", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubePodDisruptionBudgetV1Beta1) ApiVersion() *string { + var returns *string + _jsii_.Get( + j, + "apiVersion", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubePodDisruptionBudgetV1Beta1) Chart() cdk8s.Chart { + var returns cdk8s.Chart + _jsii_.Get( + j, + "chart", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubePodDisruptionBudgetV1Beta1) Kind() *string { + var returns *string + _jsii_.Get( + j, + "kind", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubePodDisruptionBudgetV1Beta1) Metadata() cdk8s.ApiObjectMetadataDefinition { + var returns cdk8s.ApiObjectMetadataDefinition + _jsii_.Get( + j, + "metadata", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubePodDisruptionBudgetV1Beta1) Name() *string { + var returns *string + _jsii_.Get( + j, + "name", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubePodDisruptionBudgetV1Beta1) Node() constructs.Node { + var returns constructs.Node + _jsii_.Get( + j, + "node", + &returns, + ) + return returns +} + +// Defines a "io.k8s.api.policy.v1beta1.PodDisruptionBudget" API object. +func NewKubePodDisruptionBudgetV1Beta1(scope constructs.Construct, id *string, props *KubePodDisruptionBudgetV1Beta1Props) KubePodDisruptionBudgetV1Beta1 { + _init_.Initialize() + + j := jsiiProxy_KubePodDisruptionBudgetV1Beta1{} + + _jsii_.Create( + "k8s.KubePodDisruptionBudgetV1Beta1", + []interface{}{scope, id, props}, + &j, + ) + + return &j +} + +// Defines a "io.k8s.api.policy.v1beta1.PodDisruptionBudget" API object. +func NewKubePodDisruptionBudgetV1Beta1_Override(k KubePodDisruptionBudgetV1Beta1, scope constructs.Construct, id *string, props *KubePodDisruptionBudgetV1Beta1Props) { + _init_.Initialize() + + _jsii_.Create( + "k8s.KubePodDisruptionBudgetV1Beta1", + []interface{}{scope, id, props}, + k, + ) +} + +// Checks if `x` is a construct. +// +// Use this method instead of `instanceof` to properly detect `Construct` +// instances, even when the construct library is symlinked. +// +// Explanation: in JavaScript, multiple copies of the `constructs` library on +// disk are seen as independent, completely different libraries. As a +// consequence, the class `Construct` in each copy of the `constructs` library +// is seen as a different class, and an instance of one class will not test as +// `instanceof` the other class. `npm install` will not create installations +// like this, but users may manually symlink construct libraries together or +// use a monorepo tool: in those cases, multiple copies of the `constructs` +// library can be accidentally installed, and `instanceof` will behave +// unpredictably. It is safest to avoid using `instanceof`, and using +// this type-testing method instead. +// +// Returns: true if `x` is an object created from a class which extends `Construct`. +func KubePodDisruptionBudgetV1Beta1_IsConstruct(x interface{}) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "k8s.KubePodDisruptionBudgetV1Beta1", + "isConstruct", + []interface{}{x}, + &returns, + ) + + return returns +} + +// Renders a Kubernetes manifest for "io.k8s.api.policy.v1beta1.PodDisruptionBudget". +// +// This can be used to inline resource manifests inside other objects (e.g. as templates). +func KubePodDisruptionBudgetV1Beta1_Manifest(props *KubePodDisruptionBudgetV1Beta1Props) interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "k8s.KubePodDisruptionBudgetV1Beta1", + "manifest", + []interface{}{props}, + &returns, + ) + + return returns +} + +// Returns the `ApiObject` named `Resource` which is a child of the given construct. +// +// If `c` is an `ApiObject`, it is returned directly. Throws an +// exception if the construct does not have a child named `Default` _or_ if +// this child is not an `ApiObject`. +func KubePodDisruptionBudgetV1Beta1_Of(c constructs.IConstruct) cdk8s.ApiObject { + _init_.Initialize() + + var returns cdk8s.ApiObject + + _jsii_.StaticInvoke( + "k8s.KubePodDisruptionBudgetV1Beta1", + "of", + []interface{}{c}, + &returns, + ) + + return returns +} + +func KubePodDisruptionBudgetV1Beta1_GVK() *cdk8s.GroupVersionKind { + _init_.Initialize() + var returns *cdk8s.GroupVersionKind + _jsii_.StaticGet( + "k8s.KubePodDisruptionBudgetV1Beta1", + "GVK", + &returns, + ) + return returns +} + +func (k *jsiiProxy_KubePodDisruptionBudgetV1Beta1) AddDependency(dependencies ...constructs.IConstruct) { + args := []interface{}{} + for _, a := range dependencies { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addDependency", + args, + ) +} + +func (k *jsiiProxy_KubePodDisruptionBudgetV1Beta1) AddJsonPatch(ops ...cdk8s.JsonPatch) { + args := []interface{}{} + for _, a := range ops { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addJsonPatch", + args, + ) +} + +func (k *jsiiProxy_KubePodDisruptionBudgetV1Beta1) ToJson() interface{} { + var returns interface{} + + _jsii_.Invoke( + k, + "toJson", + nil, // no parameters + &returns, + ) + + return returns +} + +func (k *jsiiProxy_KubePodDisruptionBudgetV1Beta1) ToString() *string { + var returns *string + + _jsii_.Invoke( + k, + "toString", + nil, // no parameters + &returns, + ) + + return returns +} + +// PodDisruptionBudget is an object to define the max disruption that can be caused to a collection of pods. +type KubePodDisruptionBudgetV1Beta1Props struct { + // Standard object's metadata. + // + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + Metadata *ObjectMeta `field:"optional" json:"metadata" yaml:"metadata"` + // Specification of the desired behavior of the PodDisruptionBudget. + Spec *PodDisruptionBudgetSpecV1Beta1 `field:"optional" json:"spec" yaml:"spec"` +} + +// PodList is a list of Pods. +type KubePodList interface { + cdk8s.ApiObject + // The group portion of the API version (e.g. `authorization.k8s.io`). + ApiGroup() *string + // The object's API version (e.g. `authorization.k8s.io/v1`). + ApiVersion() *string + // The chart in which this object is defined. + Chart() cdk8s.Chart + // The object kind. + Kind() *string + // Metadata associated with this API object. + Metadata() cdk8s.ApiObjectMetadataDefinition + // The name of the API object. + // + // If a name is specified in `metadata.name` this will be the name returned. + // Otherwise, a name will be generated by calling + // `AddHelm.of(this).generatedObjectName(this)`, which by default uses the + // construct path to generate a DNS-compatible name for the resource. + Name() *string + // The tree node. + Node() constructs.Node + // Create a dependency between this ApiObject and other constructs. + // + // These can be other ApiObjects, Charts, or custom. + AddDependency(dependencies ...constructs.IConstruct) + // Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. + // + // Example: + // kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true)); + // + AddJsonPatch(ops ...cdk8s.JsonPatch) + // Renders the object to Kubernetes JSON. + ToJson() interface{} + // Returns a string representation of this construct. + ToString() *string +} + +// The jsii proxy struct for KubePodList +type jsiiProxy_KubePodList struct { + internal.Type__cdk8sApiObject +} + +func (j *jsiiProxy_KubePodList) ApiGroup() *string { + var returns *string + _jsii_.Get( + j, + "apiGroup", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubePodList) ApiVersion() *string { + var returns *string + _jsii_.Get( + j, + "apiVersion", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubePodList) Chart() cdk8s.Chart { + var returns cdk8s.Chart + _jsii_.Get( + j, + "chart", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubePodList) Kind() *string { + var returns *string + _jsii_.Get( + j, + "kind", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubePodList) Metadata() cdk8s.ApiObjectMetadataDefinition { + var returns cdk8s.ApiObjectMetadataDefinition + _jsii_.Get( + j, + "metadata", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubePodList) Name() *string { + var returns *string + _jsii_.Get( + j, + "name", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubePodList) Node() constructs.Node { + var returns constructs.Node + _jsii_.Get( + j, + "node", + &returns, + ) + return returns +} + +// Defines a "io.k8s.api.core.v1.PodList" API object. +func NewKubePodList(scope constructs.Construct, id *string, props *KubePodListProps) KubePodList { + _init_.Initialize() + + j := jsiiProxy_KubePodList{} + + _jsii_.Create( + "k8s.KubePodList", + []interface{}{scope, id, props}, + &j, + ) + + return &j +} + +// Defines a "io.k8s.api.core.v1.PodList" API object. +func NewKubePodList_Override(k KubePodList, scope constructs.Construct, id *string, props *KubePodListProps) { + _init_.Initialize() + + _jsii_.Create( + "k8s.KubePodList", + []interface{}{scope, id, props}, + k, + ) +} + +// Checks if `x` is a construct. +// +// Use this method instead of `instanceof` to properly detect `Construct` +// instances, even when the construct library is symlinked. +// +// Explanation: in JavaScript, multiple copies of the `constructs` library on +// disk are seen as independent, completely different libraries. As a +// consequence, the class `Construct` in each copy of the `constructs` library +// is seen as a different class, and an instance of one class will not test as +// `instanceof` the other class. `npm install` will not create installations +// like this, but users may manually symlink construct libraries together or +// use a monorepo tool: in those cases, multiple copies of the `constructs` +// library can be accidentally installed, and `instanceof` will behave +// unpredictably. It is safest to avoid using `instanceof`, and using +// this type-testing method instead. +// +// Returns: true if `x` is an object created from a class which extends `Construct`. +func KubePodList_IsConstruct(x interface{}) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "k8s.KubePodList", + "isConstruct", + []interface{}{x}, + &returns, + ) + + return returns +} + +// Renders a Kubernetes manifest for "io.k8s.api.core.v1.PodList". +// +// This can be used to inline resource manifests inside other objects (e.g. as templates). +func KubePodList_Manifest(props *KubePodListProps) interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "k8s.KubePodList", + "manifest", + []interface{}{props}, + &returns, + ) + + return returns +} + +// Returns the `ApiObject` named `Resource` which is a child of the given construct. +// +// If `c` is an `ApiObject`, it is returned directly. Throws an +// exception if the construct does not have a child named `Default` _or_ if +// this child is not an `ApiObject`. +func KubePodList_Of(c constructs.IConstruct) cdk8s.ApiObject { + _init_.Initialize() + + var returns cdk8s.ApiObject + + _jsii_.StaticInvoke( + "k8s.KubePodList", + "of", + []interface{}{c}, + &returns, + ) + + return returns +} + +func KubePodList_GVK() *cdk8s.GroupVersionKind { + _init_.Initialize() + var returns *cdk8s.GroupVersionKind + _jsii_.StaticGet( + "k8s.KubePodList", + "GVK", + &returns, + ) + return returns +} + +func (k *jsiiProxy_KubePodList) AddDependency(dependencies ...constructs.IConstruct) { + args := []interface{}{} + for _, a := range dependencies { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addDependency", + args, + ) +} + +func (k *jsiiProxy_KubePodList) AddJsonPatch(ops ...cdk8s.JsonPatch) { + args := []interface{}{} + for _, a := range ops { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addJsonPatch", + args, + ) +} + +func (k *jsiiProxy_KubePodList) ToJson() interface{} { + var returns interface{} + + _jsii_.Invoke( + k, + "toJson", + nil, // no parameters + &returns, + ) + + return returns +} + +func (k *jsiiProxy_KubePodList) ToString() *string { + var returns *string + + _jsii_.Invoke( + k, + "toString", + nil, // no parameters + &returns, + ) + + return returns +} + +// PodList is a list of Pods. +type KubePodListProps struct { + // List of pods. + // + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md + Items *[]*KubePodProps `field:"required" json:"items" yaml:"items"` + // Standard list metadata. + // + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + Metadata *ListMeta `field:"optional" json:"metadata" yaml:"metadata"` +} + +// Pod is a collection of containers that can run on a host. +// +// This resource is created by clients and scheduled onto hosts. +type KubePodProps struct { + // Standard object's metadata. + // + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + Metadata *ObjectMeta `field:"optional" json:"metadata" yaml:"metadata"` + // Specification of the desired behavior of the pod. + // + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + Spec *PodSpec `field:"optional" json:"spec" yaml:"spec"` +} + +// PodSecurityPolicyList is a list of PodSecurityPolicy objects. +type KubePodSecurityPolicyListV1Beta1 interface { + cdk8s.ApiObject + // The group portion of the API version (e.g. `authorization.k8s.io`). + ApiGroup() *string + // The object's API version (e.g. `authorization.k8s.io/v1`). + ApiVersion() *string + // The chart in which this object is defined. + Chart() cdk8s.Chart + // The object kind. + Kind() *string + // Metadata associated with this API object. + Metadata() cdk8s.ApiObjectMetadataDefinition + // The name of the API object. + // + // If a name is specified in `metadata.name` this will be the name returned. + // Otherwise, a name will be generated by calling + // `AddHelm.of(this).generatedObjectName(this)`, which by default uses the + // construct path to generate a DNS-compatible name for the resource. + Name() *string + // The tree node. + Node() constructs.Node + // Create a dependency between this ApiObject and other constructs. + // + // These can be other ApiObjects, Charts, or custom. + AddDependency(dependencies ...constructs.IConstruct) + // Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. + // + // Example: + // kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true)); + // + AddJsonPatch(ops ...cdk8s.JsonPatch) + // Renders the object to Kubernetes JSON. + ToJson() interface{} + // Returns a string representation of this construct. + ToString() *string +} + +// The jsii proxy struct for KubePodSecurityPolicyListV1Beta1 +type jsiiProxy_KubePodSecurityPolicyListV1Beta1 struct { + internal.Type__cdk8sApiObject +} + +func (j *jsiiProxy_KubePodSecurityPolicyListV1Beta1) ApiGroup() *string { + var returns *string + _jsii_.Get( + j, + "apiGroup", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubePodSecurityPolicyListV1Beta1) ApiVersion() *string { + var returns *string + _jsii_.Get( + j, + "apiVersion", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubePodSecurityPolicyListV1Beta1) Chart() cdk8s.Chart { + var returns cdk8s.Chart + _jsii_.Get( + j, + "chart", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubePodSecurityPolicyListV1Beta1) Kind() *string { + var returns *string + _jsii_.Get( + j, + "kind", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubePodSecurityPolicyListV1Beta1) Metadata() cdk8s.ApiObjectMetadataDefinition { + var returns cdk8s.ApiObjectMetadataDefinition + _jsii_.Get( + j, + "metadata", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubePodSecurityPolicyListV1Beta1) Name() *string { + var returns *string + _jsii_.Get( + j, + "name", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubePodSecurityPolicyListV1Beta1) Node() constructs.Node { + var returns constructs.Node + _jsii_.Get( + j, + "node", + &returns, + ) + return returns +} + +// Defines a "io.k8s.api.policy.v1beta1.PodSecurityPolicyList" API object. +func NewKubePodSecurityPolicyListV1Beta1(scope constructs.Construct, id *string, props *KubePodSecurityPolicyListV1Beta1Props) KubePodSecurityPolicyListV1Beta1 { + _init_.Initialize() + + j := jsiiProxy_KubePodSecurityPolicyListV1Beta1{} + + _jsii_.Create( + "k8s.KubePodSecurityPolicyListV1Beta1", + []interface{}{scope, id, props}, + &j, + ) + + return &j +} + +// Defines a "io.k8s.api.policy.v1beta1.PodSecurityPolicyList" API object. +func NewKubePodSecurityPolicyListV1Beta1_Override(k KubePodSecurityPolicyListV1Beta1, scope constructs.Construct, id *string, props *KubePodSecurityPolicyListV1Beta1Props) { + _init_.Initialize() + + _jsii_.Create( + "k8s.KubePodSecurityPolicyListV1Beta1", + []interface{}{scope, id, props}, + k, + ) +} + +// Checks if `x` is a construct. +// +// Use this method instead of `instanceof` to properly detect `Construct` +// instances, even when the construct library is symlinked. +// +// Explanation: in JavaScript, multiple copies of the `constructs` library on +// disk are seen as independent, completely different libraries. As a +// consequence, the class `Construct` in each copy of the `constructs` library +// is seen as a different class, and an instance of one class will not test as +// `instanceof` the other class. `npm install` will not create installations +// like this, but users may manually symlink construct libraries together or +// use a monorepo tool: in those cases, multiple copies of the `constructs` +// library can be accidentally installed, and `instanceof` will behave +// unpredictably. It is safest to avoid using `instanceof`, and using +// this type-testing method instead. +// +// Returns: true if `x` is an object created from a class which extends `Construct`. +func KubePodSecurityPolicyListV1Beta1_IsConstruct(x interface{}) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "k8s.KubePodSecurityPolicyListV1Beta1", + "isConstruct", + []interface{}{x}, + &returns, + ) + + return returns +} + +// Renders a Kubernetes manifest for "io.k8s.api.policy.v1beta1.PodSecurityPolicyList". +// +// This can be used to inline resource manifests inside other objects (e.g. as templates). +func KubePodSecurityPolicyListV1Beta1_Manifest(props *KubePodSecurityPolicyListV1Beta1Props) interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "k8s.KubePodSecurityPolicyListV1Beta1", + "manifest", + []interface{}{props}, + &returns, + ) + + return returns +} + +// Returns the `ApiObject` named `Resource` which is a child of the given construct. +// +// If `c` is an `ApiObject`, it is returned directly. Throws an +// exception if the construct does not have a child named `Default` _or_ if +// this child is not an `ApiObject`. +func KubePodSecurityPolicyListV1Beta1_Of(c constructs.IConstruct) cdk8s.ApiObject { + _init_.Initialize() + + var returns cdk8s.ApiObject + + _jsii_.StaticInvoke( + "k8s.KubePodSecurityPolicyListV1Beta1", + "of", + []interface{}{c}, + &returns, + ) + + return returns +} + +func KubePodSecurityPolicyListV1Beta1_GVK() *cdk8s.GroupVersionKind { + _init_.Initialize() + var returns *cdk8s.GroupVersionKind + _jsii_.StaticGet( + "k8s.KubePodSecurityPolicyListV1Beta1", + "GVK", + &returns, + ) + return returns +} + +func (k *jsiiProxy_KubePodSecurityPolicyListV1Beta1) AddDependency(dependencies ...constructs.IConstruct) { + args := []interface{}{} + for _, a := range dependencies { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addDependency", + args, + ) +} + +func (k *jsiiProxy_KubePodSecurityPolicyListV1Beta1) AddJsonPatch(ops ...cdk8s.JsonPatch) { + args := []interface{}{} + for _, a := range ops { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addJsonPatch", + args, + ) +} + +func (k *jsiiProxy_KubePodSecurityPolicyListV1Beta1) ToJson() interface{} { + var returns interface{} + + _jsii_.Invoke( + k, + "toJson", + nil, // no parameters + &returns, + ) + + return returns +} + +func (k *jsiiProxy_KubePodSecurityPolicyListV1Beta1) ToString() *string { + var returns *string + + _jsii_.Invoke( + k, + "toString", + nil, // no parameters + &returns, + ) + + return returns +} + +// PodSecurityPolicyList is a list of PodSecurityPolicy objects. +type KubePodSecurityPolicyListV1Beta1Props struct { + // items is a list of schema objects. + Items *[]*KubePodSecurityPolicyV1Beta1Props `field:"required" json:"items" yaml:"items"` + // Standard list metadata. + // + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + Metadata *ListMeta `field:"optional" json:"metadata" yaml:"metadata"` +} + +// PodSecurityPolicy governs the ability to make requests that affect the Security Context that will be applied to a pod and container. +// +// Deprecated in 1.21. +type KubePodSecurityPolicyV1Beta1 interface { + cdk8s.ApiObject + // The group portion of the API version (e.g. `authorization.k8s.io`). + ApiGroup() *string + // The object's API version (e.g. `authorization.k8s.io/v1`). + ApiVersion() *string + // The chart in which this object is defined. + Chart() cdk8s.Chart + // The object kind. + Kind() *string + // Metadata associated with this API object. + Metadata() cdk8s.ApiObjectMetadataDefinition + // The name of the API object. + // + // If a name is specified in `metadata.name` this will be the name returned. + // Otherwise, a name will be generated by calling + // `AddHelm.of(this).generatedObjectName(this)`, which by default uses the + // construct path to generate a DNS-compatible name for the resource. + Name() *string + // The tree node. + Node() constructs.Node + // Create a dependency between this ApiObject and other constructs. + // + // These can be other ApiObjects, Charts, or custom. + AddDependency(dependencies ...constructs.IConstruct) + // Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. + // + // Example: + // kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true)); + // + AddJsonPatch(ops ...cdk8s.JsonPatch) + // Renders the object to Kubernetes JSON. + ToJson() interface{} + // Returns a string representation of this construct. + ToString() *string +} + +// The jsii proxy struct for KubePodSecurityPolicyV1Beta1 +type jsiiProxy_KubePodSecurityPolicyV1Beta1 struct { + internal.Type__cdk8sApiObject +} + +func (j *jsiiProxy_KubePodSecurityPolicyV1Beta1) ApiGroup() *string { + var returns *string + _jsii_.Get( + j, + "apiGroup", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubePodSecurityPolicyV1Beta1) ApiVersion() *string { + var returns *string + _jsii_.Get( + j, + "apiVersion", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubePodSecurityPolicyV1Beta1) Chart() cdk8s.Chart { + var returns cdk8s.Chart + _jsii_.Get( + j, + "chart", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubePodSecurityPolicyV1Beta1) Kind() *string { + var returns *string + _jsii_.Get( + j, + "kind", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubePodSecurityPolicyV1Beta1) Metadata() cdk8s.ApiObjectMetadataDefinition { + var returns cdk8s.ApiObjectMetadataDefinition + _jsii_.Get( + j, + "metadata", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubePodSecurityPolicyV1Beta1) Name() *string { + var returns *string + _jsii_.Get( + j, + "name", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubePodSecurityPolicyV1Beta1) Node() constructs.Node { + var returns constructs.Node + _jsii_.Get( + j, + "node", + &returns, + ) + return returns +} + +// Defines a "io.k8s.api.policy.v1beta1.PodSecurityPolicy" API object. +func NewKubePodSecurityPolicyV1Beta1(scope constructs.Construct, id *string, props *KubePodSecurityPolicyV1Beta1Props) KubePodSecurityPolicyV1Beta1 { + _init_.Initialize() + + j := jsiiProxy_KubePodSecurityPolicyV1Beta1{} + + _jsii_.Create( + "k8s.KubePodSecurityPolicyV1Beta1", + []interface{}{scope, id, props}, + &j, + ) + + return &j +} + +// Defines a "io.k8s.api.policy.v1beta1.PodSecurityPolicy" API object. +func NewKubePodSecurityPolicyV1Beta1_Override(k KubePodSecurityPolicyV1Beta1, scope constructs.Construct, id *string, props *KubePodSecurityPolicyV1Beta1Props) { + _init_.Initialize() + + _jsii_.Create( + "k8s.KubePodSecurityPolicyV1Beta1", + []interface{}{scope, id, props}, + k, + ) +} + +// Checks if `x` is a construct. +// +// Use this method instead of `instanceof` to properly detect `Construct` +// instances, even when the construct library is symlinked. +// +// Explanation: in JavaScript, multiple copies of the `constructs` library on +// disk are seen as independent, completely different libraries. As a +// consequence, the class `Construct` in each copy of the `constructs` library +// is seen as a different class, and an instance of one class will not test as +// `instanceof` the other class. `npm install` will not create installations +// like this, but users may manually symlink construct libraries together or +// use a monorepo tool: in those cases, multiple copies of the `constructs` +// library can be accidentally installed, and `instanceof` will behave +// unpredictably. It is safest to avoid using `instanceof`, and using +// this type-testing method instead. +// +// Returns: true if `x` is an object created from a class which extends `Construct`. +func KubePodSecurityPolicyV1Beta1_IsConstruct(x interface{}) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "k8s.KubePodSecurityPolicyV1Beta1", + "isConstruct", + []interface{}{x}, + &returns, + ) + + return returns +} + +// Renders a Kubernetes manifest for "io.k8s.api.policy.v1beta1.PodSecurityPolicy". +// +// This can be used to inline resource manifests inside other objects (e.g. as templates). +func KubePodSecurityPolicyV1Beta1_Manifest(props *KubePodSecurityPolicyV1Beta1Props) interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "k8s.KubePodSecurityPolicyV1Beta1", + "manifest", + []interface{}{props}, + &returns, + ) + + return returns +} + +// Returns the `ApiObject` named `Resource` which is a child of the given construct. +// +// If `c` is an `ApiObject`, it is returned directly. Throws an +// exception if the construct does not have a child named `Default` _or_ if +// this child is not an `ApiObject`. +func KubePodSecurityPolicyV1Beta1_Of(c constructs.IConstruct) cdk8s.ApiObject { + _init_.Initialize() + + var returns cdk8s.ApiObject + + _jsii_.StaticInvoke( + "k8s.KubePodSecurityPolicyV1Beta1", + "of", + []interface{}{c}, + &returns, + ) + + return returns +} + +func KubePodSecurityPolicyV1Beta1_GVK() *cdk8s.GroupVersionKind { + _init_.Initialize() + var returns *cdk8s.GroupVersionKind + _jsii_.StaticGet( + "k8s.KubePodSecurityPolicyV1Beta1", + "GVK", + &returns, + ) + return returns +} + +func (k *jsiiProxy_KubePodSecurityPolicyV1Beta1) AddDependency(dependencies ...constructs.IConstruct) { + args := []interface{}{} + for _, a := range dependencies { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addDependency", + args, + ) +} + +func (k *jsiiProxy_KubePodSecurityPolicyV1Beta1) AddJsonPatch(ops ...cdk8s.JsonPatch) { + args := []interface{}{} + for _, a := range ops { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addJsonPatch", + args, + ) +} + +func (k *jsiiProxy_KubePodSecurityPolicyV1Beta1) ToJson() interface{} { + var returns interface{} + + _jsii_.Invoke( + k, + "toJson", + nil, // no parameters + &returns, + ) + + return returns +} + +func (k *jsiiProxy_KubePodSecurityPolicyV1Beta1) ToString() *string { + var returns *string + + _jsii_.Invoke( + k, + "toString", + nil, // no parameters + &returns, + ) + + return returns +} + +// PodSecurityPolicy governs the ability to make requests that affect the Security Context that will be applied to a pod and container. +// +// Deprecated in 1.21. +type KubePodSecurityPolicyV1Beta1Props struct { + // Standard object's metadata. + // + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + Metadata *ObjectMeta `field:"optional" json:"metadata" yaml:"metadata"` + // spec defines the policy enforced. + Spec *PodSecurityPolicySpecV1Beta1 `field:"optional" json:"spec" yaml:"spec"` +} + +// PodTemplate describes a template for creating copies of a predefined pod. +type KubePodTemplate interface { + cdk8s.ApiObject + // The group portion of the API version (e.g. `authorization.k8s.io`). + ApiGroup() *string + // The object's API version (e.g. `authorization.k8s.io/v1`). + ApiVersion() *string + // The chart in which this object is defined. + Chart() cdk8s.Chart + // The object kind. + Kind() *string + // Metadata associated with this API object. + Metadata() cdk8s.ApiObjectMetadataDefinition + // The name of the API object. + // + // If a name is specified in `metadata.name` this will be the name returned. + // Otherwise, a name will be generated by calling + // `AddHelm.of(this).generatedObjectName(this)`, which by default uses the + // construct path to generate a DNS-compatible name for the resource. + Name() *string + // The tree node. + Node() constructs.Node + // Create a dependency between this ApiObject and other constructs. + // + // These can be other ApiObjects, Charts, or custom. + AddDependency(dependencies ...constructs.IConstruct) + // Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. + // + // Example: + // kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true)); + // + AddJsonPatch(ops ...cdk8s.JsonPatch) + // Renders the object to Kubernetes JSON. + ToJson() interface{} + // Returns a string representation of this construct. + ToString() *string +} + +// The jsii proxy struct for KubePodTemplate +type jsiiProxy_KubePodTemplate struct { + internal.Type__cdk8sApiObject +} + +func (j *jsiiProxy_KubePodTemplate) ApiGroup() *string { + var returns *string + _jsii_.Get( + j, + "apiGroup", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubePodTemplate) ApiVersion() *string { + var returns *string + _jsii_.Get( + j, + "apiVersion", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubePodTemplate) Chart() cdk8s.Chart { + var returns cdk8s.Chart + _jsii_.Get( + j, + "chart", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubePodTemplate) Kind() *string { + var returns *string + _jsii_.Get( + j, + "kind", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubePodTemplate) Metadata() cdk8s.ApiObjectMetadataDefinition { + var returns cdk8s.ApiObjectMetadataDefinition + _jsii_.Get( + j, + "metadata", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubePodTemplate) Name() *string { + var returns *string + _jsii_.Get( + j, + "name", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubePodTemplate) Node() constructs.Node { + var returns constructs.Node + _jsii_.Get( + j, + "node", + &returns, + ) + return returns +} + +// Defines a "io.k8s.api.core.v1.PodTemplate" API object. +func NewKubePodTemplate(scope constructs.Construct, id *string, props *KubePodTemplateProps) KubePodTemplate { + _init_.Initialize() + + j := jsiiProxy_KubePodTemplate{} + + _jsii_.Create( + "k8s.KubePodTemplate", + []interface{}{scope, id, props}, + &j, + ) + + return &j +} + +// Defines a "io.k8s.api.core.v1.PodTemplate" API object. +func NewKubePodTemplate_Override(k KubePodTemplate, scope constructs.Construct, id *string, props *KubePodTemplateProps) { + _init_.Initialize() + + _jsii_.Create( + "k8s.KubePodTemplate", + []interface{}{scope, id, props}, + k, + ) +} + +// Checks if `x` is a construct. +// +// Use this method instead of `instanceof` to properly detect `Construct` +// instances, even when the construct library is symlinked. +// +// Explanation: in JavaScript, multiple copies of the `constructs` library on +// disk are seen as independent, completely different libraries. As a +// consequence, the class `Construct` in each copy of the `constructs` library +// is seen as a different class, and an instance of one class will not test as +// `instanceof` the other class. `npm install` will not create installations +// like this, but users may manually symlink construct libraries together or +// use a monorepo tool: in those cases, multiple copies of the `constructs` +// library can be accidentally installed, and `instanceof` will behave +// unpredictably. It is safest to avoid using `instanceof`, and using +// this type-testing method instead. +// +// Returns: true if `x` is an object created from a class which extends `Construct`. +func KubePodTemplate_IsConstruct(x interface{}) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "k8s.KubePodTemplate", + "isConstruct", + []interface{}{x}, + &returns, + ) + + return returns +} + +// Renders a Kubernetes manifest for "io.k8s.api.core.v1.PodTemplate". +// +// This can be used to inline resource manifests inside other objects (e.g. as templates). +func KubePodTemplate_Manifest(props *KubePodTemplateProps) interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "k8s.KubePodTemplate", + "manifest", + []interface{}{props}, + &returns, + ) + + return returns +} + +// Returns the `ApiObject` named `Resource` which is a child of the given construct. +// +// If `c` is an `ApiObject`, it is returned directly. Throws an +// exception if the construct does not have a child named `Default` _or_ if +// this child is not an `ApiObject`. +func KubePodTemplate_Of(c constructs.IConstruct) cdk8s.ApiObject { + _init_.Initialize() + + var returns cdk8s.ApiObject + + _jsii_.StaticInvoke( + "k8s.KubePodTemplate", + "of", + []interface{}{c}, + &returns, + ) + + return returns +} + +func KubePodTemplate_GVK() *cdk8s.GroupVersionKind { + _init_.Initialize() + var returns *cdk8s.GroupVersionKind + _jsii_.StaticGet( + "k8s.KubePodTemplate", + "GVK", + &returns, + ) + return returns +} + +func (k *jsiiProxy_KubePodTemplate) AddDependency(dependencies ...constructs.IConstruct) { + args := []interface{}{} + for _, a := range dependencies { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addDependency", + args, + ) +} + +func (k *jsiiProxy_KubePodTemplate) AddJsonPatch(ops ...cdk8s.JsonPatch) { + args := []interface{}{} + for _, a := range ops { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addJsonPatch", + args, + ) +} + +func (k *jsiiProxy_KubePodTemplate) ToJson() interface{} { + var returns interface{} + + _jsii_.Invoke( + k, + "toJson", + nil, // no parameters + &returns, + ) + + return returns +} + +func (k *jsiiProxy_KubePodTemplate) ToString() *string { + var returns *string + + _jsii_.Invoke( + k, + "toString", + nil, // no parameters + &returns, + ) + + return returns +} + +// PodTemplateList is a list of PodTemplates. +type KubePodTemplateList interface { + cdk8s.ApiObject + // The group portion of the API version (e.g. `authorization.k8s.io`). + ApiGroup() *string + // The object's API version (e.g. `authorization.k8s.io/v1`). + ApiVersion() *string + // The chart in which this object is defined. + Chart() cdk8s.Chart + // The object kind. + Kind() *string + // Metadata associated with this API object. + Metadata() cdk8s.ApiObjectMetadataDefinition + // The name of the API object. + // + // If a name is specified in `metadata.name` this will be the name returned. + // Otherwise, a name will be generated by calling + // `AddHelm.of(this).generatedObjectName(this)`, which by default uses the + // construct path to generate a DNS-compatible name for the resource. + Name() *string + // The tree node. + Node() constructs.Node + // Create a dependency between this ApiObject and other constructs. + // + // These can be other ApiObjects, Charts, or custom. + AddDependency(dependencies ...constructs.IConstruct) + // Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. + // + // Example: + // kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true)); + // + AddJsonPatch(ops ...cdk8s.JsonPatch) + // Renders the object to Kubernetes JSON. + ToJson() interface{} + // Returns a string representation of this construct. + ToString() *string +} + +// The jsii proxy struct for KubePodTemplateList +type jsiiProxy_KubePodTemplateList struct { + internal.Type__cdk8sApiObject +} + +func (j *jsiiProxy_KubePodTemplateList) ApiGroup() *string { + var returns *string + _jsii_.Get( + j, + "apiGroup", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubePodTemplateList) ApiVersion() *string { + var returns *string + _jsii_.Get( + j, + "apiVersion", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubePodTemplateList) Chart() cdk8s.Chart { + var returns cdk8s.Chart + _jsii_.Get( + j, + "chart", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubePodTemplateList) Kind() *string { + var returns *string + _jsii_.Get( + j, + "kind", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubePodTemplateList) Metadata() cdk8s.ApiObjectMetadataDefinition { + var returns cdk8s.ApiObjectMetadataDefinition + _jsii_.Get( + j, + "metadata", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubePodTemplateList) Name() *string { + var returns *string + _jsii_.Get( + j, + "name", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubePodTemplateList) Node() constructs.Node { + var returns constructs.Node + _jsii_.Get( + j, + "node", + &returns, + ) + return returns +} + +// Defines a "io.k8s.api.core.v1.PodTemplateList" API object. +func NewKubePodTemplateList(scope constructs.Construct, id *string, props *KubePodTemplateListProps) KubePodTemplateList { + _init_.Initialize() + + j := jsiiProxy_KubePodTemplateList{} + + _jsii_.Create( + "k8s.KubePodTemplateList", + []interface{}{scope, id, props}, + &j, + ) + + return &j +} + +// Defines a "io.k8s.api.core.v1.PodTemplateList" API object. +func NewKubePodTemplateList_Override(k KubePodTemplateList, scope constructs.Construct, id *string, props *KubePodTemplateListProps) { + _init_.Initialize() + + _jsii_.Create( + "k8s.KubePodTemplateList", + []interface{}{scope, id, props}, + k, + ) +} + +// Checks if `x` is a construct. +// +// Use this method instead of `instanceof` to properly detect `Construct` +// instances, even when the construct library is symlinked. +// +// Explanation: in JavaScript, multiple copies of the `constructs` library on +// disk are seen as independent, completely different libraries. As a +// consequence, the class `Construct` in each copy of the `constructs` library +// is seen as a different class, and an instance of one class will not test as +// `instanceof` the other class. `npm install` will not create installations +// like this, but users may manually symlink construct libraries together or +// use a monorepo tool: in those cases, multiple copies of the `constructs` +// library can be accidentally installed, and `instanceof` will behave +// unpredictably. It is safest to avoid using `instanceof`, and using +// this type-testing method instead. +// +// Returns: true if `x` is an object created from a class which extends `Construct`. +func KubePodTemplateList_IsConstruct(x interface{}) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "k8s.KubePodTemplateList", + "isConstruct", + []interface{}{x}, + &returns, + ) + + return returns +} + +// Renders a Kubernetes manifest for "io.k8s.api.core.v1.PodTemplateList". +// +// This can be used to inline resource manifests inside other objects (e.g. as templates). +func KubePodTemplateList_Manifest(props *KubePodTemplateListProps) interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "k8s.KubePodTemplateList", + "manifest", + []interface{}{props}, + &returns, + ) + + return returns +} + +// Returns the `ApiObject` named `Resource` which is a child of the given construct. +// +// If `c` is an `ApiObject`, it is returned directly. Throws an +// exception if the construct does not have a child named `Default` _or_ if +// this child is not an `ApiObject`. +func KubePodTemplateList_Of(c constructs.IConstruct) cdk8s.ApiObject { + _init_.Initialize() + + var returns cdk8s.ApiObject + + _jsii_.StaticInvoke( + "k8s.KubePodTemplateList", + "of", + []interface{}{c}, + &returns, + ) + + return returns +} + +func KubePodTemplateList_GVK() *cdk8s.GroupVersionKind { + _init_.Initialize() + var returns *cdk8s.GroupVersionKind + _jsii_.StaticGet( + "k8s.KubePodTemplateList", + "GVK", + &returns, + ) + return returns +} + +func (k *jsiiProxy_KubePodTemplateList) AddDependency(dependencies ...constructs.IConstruct) { + args := []interface{}{} + for _, a := range dependencies { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addDependency", + args, + ) +} + +func (k *jsiiProxy_KubePodTemplateList) AddJsonPatch(ops ...cdk8s.JsonPatch) { + args := []interface{}{} + for _, a := range ops { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addJsonPatch", + args, + ) +} + +func (k *jsiiProxy_KubePodTemplateList) ToJson() interface{} { + var returns interface{} + + _jsii_.Invoke( + k, + "toJson", + nil, // no parameters + &returns, + ) + + return returns +} + +func (k *jsiiProxy_KubePodTemplateList) ToString() *string { + var returns *string + + _jsii_.Invoke( + k, + "toString", + nil, // no parameters + &returns, + ) + + return returns +} + +// PodTemplateList is a list of PodTemplates. +type KubePodTemplateListProps struct { + // List of pod templates. + Items *[]*KubePodTemplateProps `field:"required" json:"items" yaml:"items"` + // Standard list metadata. + // + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + Metadata *ListMeta `field:"optional" json:"metadata" yaml:"metadata"` +} + +// PodTemplate describes a template for creating copies of a predefined pod. +type KubePodTemplateProps struct { + // Standard object's metadata. + // + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + Metadata *ObjectMeta `field:"optional" json:"metadata" yaml:"metadata"` + // Template defines the pods that will be created from this pod template. + // + // https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + Template *PodTemplateSpec `field:"optional" json:"template" yaml:"template"` +} + +// PriorityClass defines mapping from a priority class name to the priority integer value. +// +// The value can be any valid integer. +type KubePriorityClass interface { + cdk8s.ApiObject + // The group portion of the API version (e.g. `authorization.k8s.io`). + ApiGroup() *string + // The object's API version (e.g. `authorization.k8s.io/v1`). + ApiVersion() *string + // The chart in which this object is defined. + Chart() cdk8s.Chart + // The object kind. + Kind() *string + // Metadata associated with this API object. + Metadata() cdk8s.ApiObjectMetadataDefinition + // The name of the API object. + // + // If a name is specified in `metadata.name` this will be the name returned. + // Otherwise, a name will be generated by calling + // `AddHelm.of(this).generatedObjectName(this)`, which by default uses the + // construct path to generate a DNS-compatible name for the resource. + Name() *string + // The tree node. + Node() constructs.Node + // Create a dependency between this ApiObject and other constructs. + // + // These can be other ApiObjects, Charts, or custom. + AddDependency(dependencies ...constructs.IConstruct) + // Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. + // + // Example: + // kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true)); + // + AddJsonPatch(ops ...cdk8s.JsonPatch) + // Renders the object to Kubernetes JSON. + ToJson() interface{} + // Returns a string representation of this construct. + ToString() *string +} + +// The jsii proxy struct for KubePriorityClass +type jsiiProxy_KubePriorityClass struct { + internal.Type__cdk8sApiObject +} + +func (j *jsiiProxy_KubePriorityClass) ApiGroup() *string { + var returns *string + _jsii_.Get( + j, + "apiGroup", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubePriorityClass) ApiVersion() *string { + var returns *string + _jsii_.Get( + j, + "apiVersion", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubePriorityClass) Chart() cdk8s.Chart { + var returns cdk8s.Chart + _jsii_.Get( + j, + "chart", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubePriorityClass) Kind() *string { + var returns *string + _jsii_.Get( + j, + "kind", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubePriorityClass) Metadata() cdk8s.ApiObjectMetadataDefinition { + var returns cdk8s.ApiObjectMetadataDefinition + _jsii_.Get( + j, + "metadata", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubePriorityClass) Name() *string { + var returns *string + _jsii_.Get( + j, + "name", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubePriorityClass) Node() constructs.Node { + var returns constructs.Node + _jsii_.Get( + j, + "node", + &returns, + ) + return returns +} + +// Defines a "io.k8s.api.scheduling.v1.PriorityClass" API object. +func NewKubePriorityClass(scope constructs.Construct, id *string, props *KubePriorityClassProps) KubePriorityClass { + _init_.Initialize() + + j := jsiiProxy_KubePriorityClass{} + + _jsii_.Create( + "k8s.KubePriorityClass", + []interface{}{scope, id, props}, + &j, + ) + + return &j +} + +// Defines a "io.k8s.api.scheduling.v1.PriorityClass" API object. +func NewKubePriorityClass_Override(k KubePriorityClass, scope constructs.Construct, id *string, props *KubePriorityClassProps) { + _init_.Initialize() + + _jsii_.Create( + "k8s.KubePriorityClass", + []interface{}{scope, id, props}, + k, + ) +} + +// Checks if `x` is a construct. +// +// Use this method instead of `instanceof` to properly detect `Construct` +// instances, even when the construct library is symlinked. +// +// Explanation: in JavaScript, multiple copies of the `constructs` library on +// disk are seen as independent, completely different libraries. As a +// consequence, the class `Construct` in each copy of the `constructs` library +// is seen as a different class, and an instance of one class will not test as +// `instanceof` the other class. `npm install` will not create installations +// like this, but users may manually symlink construct libraries together or +// use a monorepo tool: in those cases, multiple copies of the `constructs` +// library can be accidentally installed, and `instanceof` will behave +// unpredictably. It is safest to avoid using `instanceof`, and using +// this type-testing method instead. +// +// Returns: true if `x` is an object created from a class which extends `Construct`. +func KubePriorityClass_IsConstruct(x interface{}) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "k8s.KubePriorityClass", + "isConstruct", + []interface{}{x}, + &returns, + ) + + return returns +} + +// Renders a Kubernetes manifest for "io.k8s.api.scheduling.v1.PriorityClass". +// +// This can be used to inline resource manifests inside other objects (e.g. as templates). +func KubePriorityClass_Manifest(props *KubePriorityClassProps) interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "k8s.KubePriorityClass", + "manifest", + []interface{}{props}, + &returns, + ) + + return returns +} + +// Returns the `ApiObject` named `Resource` which is a child of the given construct. +// +// If `c` is an `ApiObject`, it is returned directly. Throws an +// exception if the construct does not have a child named `Default` _or_ if +// this child is not an `ApiObject`. +func KubePriorityClass_Of(c constructs.IConstruct) cdk8s.ApiObject { + _init_.Initialize() + + var returns cdk8s.ApiObject + + _jsii_.StaticInvoke( + "k8s.KubePriorityClass", + "of", + []interface{}{c}, + &returns, + ) + + return returns +} + +func KubePriorityClass_GVK() *cdk8s.GroupVersionKind { + _init_.Initialize() + var returns *cdk8s.GroupVersionKind + _jsii_.StaticGet( + "k8s.KubePriorityClass", + "GVK", + &returns, + ) + return returns +} + +func (k *jsiiProxy_KubePriorityClass) AddDependency(dependencies ...constructs.IConstruct) { + args := []interface{}{} + for _, a := range dependencies { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addDependency", + args, + ) +} + +func (k *jsiiProxy_KubePriorityClass) AddJsonPatch(ops ...cdk8s.JsonPatch) { + args := []interface{}{} + for _, a := range ops { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addJsonPatch", + args, + ) +} + +func (k *jsiiProxy_KubePriorityClass) ToJson() interface{} { + var returns interface{} + + _jsii_.Invoke( + k, + "toJson", + nil, // no parameters + &returns, + ) + + return returns +} + +func (k *jsiiProxy_KubePriorityClass) ToString() *string { + var returns *string + + _jsii_.Invoke( + k, + "toString", + nil, // no parameters + &returns, + ) + + return returns +} + +// PriorityClassList is a collection of priority classes. +type KubePriorityClassList interface { + cdk8s.ApiObject + // The group portion of the API version (e.g. `authorization.k8s.io`). + ApiGroup() *string + // The object's API version (e.g. `authorization.k8s.io/v1`). + ApiVersion() *string + // The chart in which this object is defined. + Chart() cdk8s.Chart + // The object kind. + Kind() *string + // Metadata associated with this API object. + Metadata() cdk8s.ApiObjectMetadataDefinition + // The name of the API object. + // + // If a name is specified in `metadata.name` this will be the name returned. + // Otherwise, a name will be generated by calling + // `AddHelm.of(this).generatedObjectName(this)`, which by default uses the + // construct path to generate a DNS-compatible name for the resource. + Name() *string + // The tree node. + Node() constructs.Node + // Create a dependency between this ApiObject and other constructs. + // + // These can be other ApiObjects, Charts, or custom. + AddDependency(dependencies ...constructs.IConstruct) + // Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. + // + // Example: + // kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true)); + // + AddJsonPatch(ops ...cdk8s.JsonPatch) + // Renders the object to Kubernetes JSON. + ToJson() interface{} + // Returns a string representation of this construct. + ToString() *string +} + +// The jsii proxy struct for KubePriorityClassList +type jsiiProxy_KubePriorityClassList struct { + internal.Type__cdk8sApiObject +} + +func (j *jsiiProxy_KubePriorityClassList) ApiGroup() *string { + var returns *string + _jsii_.Get( + j, + "apiGroup", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubePriorityClassList) ApiVersion() *string { + var returns *string + _jsii_.Get( + j, + "apiVersion", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubePriorityClassList) Chart() cdk8s.Chart { + var returns cdk8s.Chart + _jsii_.Get( + j, + "chart", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubePriorityClassList) Kind() *string { + var returns *string + _jsii_.Get( + j, + "kind", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubePriorityClassList) Metadata() cdk8s.ApiObjectMetadataDefinition { + var returns cdk8s.ApiObjectMetadataDefinition + _jsii_.Get( + j, + "metadata", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubePriorityClassList) Name() *string { + var returns *string + _jsii_.Get( + j, + "name", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubePriorityClassList) Node() constructs.Node { + var returns constructs.Node + _jsii_.Get( + j, + "node", + &returns, + ) + return returns +} + +// Defines a "io.k8s.api.scheduling.v1.PriorityClassList" API object. +func NewKubePriorityClassList(scope constructs.Construct, id *string, props *KubePriorityClassListProps) KubePriorityClassList { + _init_.Initialize() + + j := jsiiProxy_KubePriorityClassList{} + + _jsii_.Create( + "k8s.KubePriorityClassList", + []interface{}{scope, id, props}, + &j, + ) + + return &j +} + +// Defines a "io.k8s.api.scheduling.v1.PriorityClassList" API object. +func NewKubePriorityClassList_Override(k KubePriorityClassList, scope constructs.Construct, id *string, props *KubePriorityClassListProps) { + _init_.Initialize() + + _jsii_.Create( + "k8s.KubePriorityClassList", + []interface{}{scope, id, props}, + k, + ) +} + +// Checks if `x` is a construct. +// +// Use this method instead of `instanceof` to properly detect `Construct` +// instances, even when the construct library is symlinked. +// +// Explanation: in JavaScript, multiple copies of the `constructs` library on +// disk are seen as independent, completely different libraries. As a +// consequence, the class `Construct` in each copy of the `constructs` library +// is seen as a different class, and an instance of one class will not test as +// `instanceof` the other class. `npm install` will not create installations +// like this, but users may manually symlink construct libraries together or +// use a monorepo tool: in those cases, multiple copies of the `constructs` +// library can be accidentally installed, and `instanceof` will behave +// unpredictably. It is safest to avoid using `instanceof`, and using +// this type-testing method instead. +// +// Returns: true if `x` is an object created from a class which extends `Construct`. +func KubePriorityClassList_IsConstruct(x interface{}) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "k8s.KubePriorityClassList", + "isConstruct", + []interface{}{x}, + &returns, + ) + + return returns +} + +// Renders a Kubernetes manifest for "io.k8s.api.scheduling.v1.PriorityClassList". +// +// This can be used to inline resource manifests inside other objects (e.g. as templates). +func KubePriorityClassList_Manifest(props *KubePriorityClassListProps) interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "k8s.KubePriorityClassList", + "manifest", + []interface{}{props}, + &returns, + ) + + return returns +} + +// Returns the `ApiObject` named `Resource` which is a child of the given construct. +// +// If `c` is an `ApiObject`, it is returned directly. Throws an +// exception if the construct does not have a child named `Default` _or_ if +// this child is not an `ApiObject`. +func KubePriorityClassList_Of(c constructs.IConstruct) cdk8s.ApiObject { + _init_.Initialize() + + var returns cdk8s.ApiObject + + _jsii_.StaticInvoke( + "k8s.KubePriorityClassList", + "of", + []interface{}{c}, + &returns, + ) + + return returns +} + +func KubePriorityClassList_GVK() *cdk8s.GroupVersionKind { + _init_.Initialize() + var returns *cdk8s.GroupVersionKind + _jsii_.StaticGet( + "k8s.KubePriorityClassList", + "GVK", + &returns, + ) + return returns +} + +func (k *jsiiProxy_KubePriorityClassList) AddDependency(dependencies ...constructs.IConstruct) { + args := []interface{}{} + for _, a := range dependencies { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addDependency", + args, + ) +} + +func (k *jsiiProxy_KubePriorityClassList) AddJsonPatch(ops ...cdk8s.JsonPatch) { + args := []interface{}{} + for _, a := range ops { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addJsonPatch", + args, + ) +} + +func (k *jsiiProxy_KubePriorityClassList) ToJson() interface{} { + var returns interface{} + + _jsii_.Invoke( + k, + "toJson", + nil, // no parameters + &returns, + ) + + return returns +} + +func (k *jsiiProxy_KubePriorityClassList) ToString() *string { + var returns *string + + _jsii_.Invoke( + k, + "toString", + nil, // no parameters + &returns, + ) + + return returns +} + +// PriorityClassList is a collection of priority classes. +type KubePriorityClassListProps struct { + // items is the list of PriorityClasses. + Items *[]*KubePriorityClassProps `field:"required" json:"items" yaml:"items"` + // Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata. + Metadata *ListMeta `field:"optional" json:"metadata" yaml:"metadata"` +} + +// PriorityClassList is a collection of priority classes. +type KubePriorityClassListV1Alpha1 interface { + cdk8s.ApiObject + // The group portion of the API version (e.g. `authorization.k8s.io`). + ApiGroup() *string + // The object's API version (e.g. `authorization.k8s.io/v1`). + ApiVersion() *string + // The chart in which this object is defined. + Chart() cdk8s.Chart + // The object kind. + Kind() *string + // Metadata associated with this API object. + Metadata() cdk8s.ApiObjectMetadataDefinition + // The name of the API object. + // + // If a name is specified in `metadata.name` this will be the name returned. + // Otherwise, a name will be generated by calling + // `AddHelm.of(this).generatedObjectName(this)`, which by default uses the + // construct path to generate a DNS-compatible name for the resource. + Name() *string + // The tree node. + Node() constructs.Node + // Create a dependency between this ApiObject and other constructs. + // + // These can be other ApiObjects, Charts, or custom. + AddDependency(dependencies ...constructs.IConstruct) + // Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. + // + // Example: + // kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true)); + // + AddJsonPatch(ops ...cdk8s.JsonPatch) + // Renders the object to Kubernetes JSON. + ToJson() interface{} + // Returns a string representation of this construct. + ToString() *string +} + +// The jsii proxy struct for KubePriorityClassListV1Alpha1 +type jsiiProxy_KubePriorityClassListV1Alpha1 struct { + internal.Type__cdk8sApiObject +} + +func (j *jsiiProxy_KubePriorityClassListV1Alpha1) ApiGroup() *string { + var returns *string + _jsii_.Get( + j, + "apiGroup", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubePriorityClassListV1Alpha1) ApiVersion() *string { + var returns *string + _jsii_.Get( + j, + "apiVersion", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubePriorityClassListV1Alpha1) Chart() cdk8s.Chart { + var returns cdk8s.Chart + _jsii_.Get( + j, + "chart", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubePriorityClassListV1Alpha1) Kind() *string { + var returns *string + _jsii_.Get( + j, + "kind", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubePriorityClassListV1Alpha1) Metadata() cdk8s.ApiObjectMetadataDefinition { + var returns cdk8s.ApiObjectMetadataDefinition + _jsii_.Get( + j, + "metadata", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubePriorityClassListV1Alpha1) Name() *string { + var returns *string + _jsii_.Get( + j, + "name", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubePriorityClassListV1Alpha1) Node() constructs.Node { + var returns constructs.Node + _jsii_.Get( + j, + "node", + &returns, + ) + return returns +} + +// Defines a "io.k8s.api.scheduling.v1alpha1.PriorityClassList" API object. +func NewKubePriorityClassListV1Alpha1(scope constructs.Construct, id *string, props *KubePriorityClassListV1Alpha1Props) KubePriorityClassListV1Alpha1 { + _init_.Initialize() + + j := jsiiProxy_KubePriorityClassListV1Alpha1{} + + _jsii_.Create( + "k8s.KubePriorityClassListV1Alpha1", + []interface{}{scope, id, props}, + &j, + ) + + return &j +} + +// Defines a "io.k8s.api.scheduling.v1alpha1.PriorityClassList" API object. +func NewKubePriorityClassListV1Alpha1_Override(k KubePriorityClassListV1Alpha1, scope constructs.Construct, id *string, props *KubePriorityClassListV1Alpha1Props) { + _init_.Initialize() + + _jsii_.Create( + "k8s.KubePriorityClassListV1Alpha1", + []interface{}{scope, id, props}, + k, + ) +} + +// Checks if `x` is a construct. +// +// Use this method instead of `instanceof` to properly detect `Construct` +// instances, even when the construct library is symlinked. +// +// Explanation: in JavaScript, multiple copies of the `constructs` library on +// disk are seen as independent, completely different libraries. As a +// consequence, the class `Construct` in each copy of the `constructs` library +// is seen as a different class, and an instance of one class will not test as +// `instanceof` the other class. `npm install` will not create installations +// like this, but users may manually symlink construct libraries together or +// use a monorepo tool: in those cases, multiple copies of the `constructs` +// library can be accidentally installed, and `instanceof` will behave +// unpredictably. It is safest to avoid using `instanceof`, and using +// this type-testing method instead. +// +// Returns: true if `x` is an object created from a class which extends `Construct`. +func KubePriorityClassListV1Alpha1_IsConstruct(x interface{}) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "k8s.KubePriorityClassListV1Alpha1", + "isConstruct", + []interface{}{x}, + &returns, + ) + + return returns +} + +// Renders a Kubernetes manifest for "io.k8s.api.scheduling.v1alpha1.PriorityClassList". +// +// This can be used to inline resource manifests inside other objects (e.g. as templates). +func KubePriorityClassListV1Alpha1_Manifest(props *KubePriorityClassListV1Alpha1Props) interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "k8s.KubePriorityClassListV1Alpha1", + "manifest", + []interface{}{props}, + &returns, + ) + + return returns +} + +// Returns the `ApiObject` named `Resource` which is a child of the given construct. +// +// If `c` is an `ApiObject`, it is returned directly. Throws an +// exception if the construct does not have a child named `Default` _or_ if +// this child is not an `ApiObject`. +func KubePriorityClassListV1Alpha1_Of(c constructs.IConstruct) cdk8s.ApiObject { + _init_.Initialize() + + var returns cdk8s.ApiObject + + _jsii_.StaticInvoke( + "k8s.KubePriorityClassListV1Alpha1", + "of", + []interface{}{c}, + &returns, + ) + + return returns +} + +func KubePriorityClassListV1Alpha1_GVK() *cdk8s.GroupVersionKind { + _init_.Initialize() + var returns *cdk8s.GroupVersionKind + _jsii_.StaticGet( + "k8s.KubePriorityClassListV1Alpha1", + "GVK", + &returns, + ) + return returns +} + +func (k *jsiiProxy_KubePriorityClassListV1Alpha1) AddDependency(dependencies ...constructs.IConstruct) { + args := []interface{}{} + for _, a := range dependencies { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addDependency", + args, + ) +} + +func (k *jsiiProxy_KubePriorityClassListV1Alpha1) AddJsonPatch(ops ...cdk8s.JsonPatch) { + args := []interface{}{} + for _, a := range ops { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addJsonPatch", + args, + ) +} + +func (k *jsiiProxy_KubePriorityClassListV1Alpha1) ToJson() interface{} { + var returns interface{} + + _jsii_.Invoke( + k, + "toJson", + nil, // no parameters + &returns, + ) + + return returns +} + +func (k *jsiiProxy_KubePriorityClassListV1Alpha1) ToString() *string { + var returns *string + + _jsii_.Invoke( + k, + "toString", + nil, // no parameters + &returns, + ) + + return returns +} + +// PriorityClassList is a collection of priority classes. +type KubePriorityClassListV1Alpha1Props struct { + // items is the list of PriorityClasses. + Items *[]*KubePriorityClassV1Alpha1Props `field:"required" json:"items" yaml:"items"` + // Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata. + Metadata *ListMeta `field:"optional" json:"metadata" yaml:"metadata"` +} + +// PriorityClass defines mapping from a priority class name to the priority integer value. +// +// The value can be any valid integer. +type KubePriorityClassProps struct { + // The value of this priority class. + // + // This is the actual priority that pods receive when they have the name of this class in their pod spec. + Value *float64 `field:"required" json:"value" yaml:"value"` + // description is an arbitrary string that usually provides guidelines on when this priority class should be used. + Description *string `field:"optional" json:"description" yaml:"description"` + // globalDefault specifies whether this PriorityClass should be considered as the default priority for pods that do not have any priority class. + // + // Only one PriorityClass can be marked as `globalDefault`. However, if more than one PriorityClasses exists with their `globalDefault` field set to true, the smallest value of such global default PriorityClasses will be used as the default priority. + GlobalDefault *bool `field:"optional" json:"globalDefault" yaml:"globalDefault"` + // Standard object's metadata. + // + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + Metadata *ObjectMeta `field:"optional" json:"metadata" yaml:"metadata"` + // PreemptionPolicy is the Policy for preempting pods with lower priority. + // + // One of Never, PreemptLowerPriority. Defaults to PreemptLowerPriority if unset. This field is beta-level, gated by the NonPreemptingPriority feature-gate. + PreemptionPolicy *string `field:"optional" json:"preemptionPolicy" yaml:"preemptionPolicy"` +} + +// DEPRECATED - This group version of PriorityClass is deprecated by scheduling.k8s.io/v1/PriorityClass. PriorityClass defines mapping from a priority class name to the priority integer value. The value can be any valid integer. +type KubePriorityClassV1Alpha1 interface { + cdk8s.ApiObject + // The group portion of the API version (e.g. `authorization.k8s.io`). + ApiGroup() *string + // The object's API version (e.g. `authorization.k8s.io/v1`). + ApiVersion() *string + // The chart in which this object is defined. + Chart() cdk8s.Chart + // The object kind. + Kind() *string + // Metadata associated with this API object. + Metadata() cdk8s.ApiObjectMetadataDefinition + // The name of the API object. + // + // If a name is specified in `metadata.name` this will be the name returned. + // Otherwise, a name will be generated by calling + // `AddHelm.of(this).generatedObjectName(this)`, which by default uses the + // construct path to generate a DNS-compatible name for the resource. + Name() *string + // The tree node. + Node() constructs.Node + // Create a dependency between this ApiObject and other constructs. + // + // These can be other ApiObjects, Charts, or custom. + AddDependency(dependencies ...constructs.IConstruct) + // Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. + // + // Example: + // kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true)); + // + AddJsonPatch(ops ...cdk8s.JsonPatch) + // Renders the object to Kubernetes JSON. + ToJson() interface{} + // Returns a string representation of this construct. + ToString() *string +} + +// The jsii proxy struct for KubePriorityClassV1Alpha1 +type jsiiProxy_KubePriorityClassV1Alpha1 struct { + internal.Type__cdk8sApiObject +} + +func (j *jsiiProxy_KubePriorityClassV1Alpha1) ApiGroup() *string { + var returns *string + _jsii_.Get( + j, + "apiGroup", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubePriorityClassV1Alpha1) ApiVersion() *string { + var returns *string + _jsii_.Get( + j, + "apiVersion", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubePriorityClassV1Alpha1) Chart() cdk8s.Chart { + var returns cdk8s.Chart + _jsii_.Get( + j, + "chart", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubePriorityClassV1Alpha1) Kind() *string { + var returns *string + _jsii_.Get( + j, + "kind", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubePriorityClassV1Alpha1) Metadata() cdk8s.ApiObjectMetadataDefinition { + var returns cdk8s.ApiObjectMetadataDefinition + _jsii_.Get( + j, + "metadata", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubePriorityClassV1Alpha1) Name() *string { + var returns *string + _jsii_.Get( + j, + "name", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubePriorityClassV1Alpha1) Node() constructs.Node { + var returns constructs.Node + _jsii_.Get( + j, + "node", + &returns, + ) + return returns +} + +// Defines a "io.k8s.api.scheduling.v1alpha1.PriorityClass" API object. +func NewKubePriorityClassV1Alpha1(scope constructs.Construct, id *string, props *KubePriorityClassV1Alpha1Props) KubePriorityClassV1Alpha1 { + _init_.Initialize() + + j := jsiiProxy_KubePriorityClassV1Alpha1{} + + _jsii_.Create( + "k8s.KubePriorityClassV1Alpha1", + []interface{}{scope, id, props}, + &j, + ) + + return &j +} + +// Defines a "io.k8s.api.scheduling.v1alpha1.PriorityClass" API object. +func NewKubePriorityClassV1Alpha1_Override(k KubePriorityClassV1Alpha1, scope constructs.Construct, id *string, props *KubePriorityClassV1Alpha1Props) { + _init_.Initialize() + + _jsii_.Create( + "k8s.KubePriorityClassV1Alpha1", + []interface{}{scope, id, props}, + k, + ) +} + +// Checks if `x` is a construct. +// +// Use this method instead of `instanceof` to properly detect `Construct` +// instances, even when the construct library is symlinked. +// +// Explanation: in JavaScript, multiple copies of the `constructs` library on +// disk are seen as independent, completely different libraries. As a +// consequence, the class `Construct` in each copy of the `constructs` library +// is seen as a different class, and an instance of one class will not test as +// `instanceof` the other class. `npm install` will not create installations +// like this, but users may manually symlink construct libraries together or +// use a monorepo tool: in those cases, multiple copies of the `constructs` +// library can be accidentally installed, and `instanceof` will behave +// unpredictably. It is safest to avoid using `instanceof`, and using +// this type-testing method instead. +// +// Returns: true if `x` is an object created from a class which extends `Construct`. +func KubePriorityClassV1Alpha1_IsConstruct(x interface{}) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "k8s.KubePriorityClassV1Alpha1", + "isConstruct", + []interface{}{x}, + &returns, + ) + + return returns +} + +// Renders a Kubernetes manifest for "io.k8s.api.scheduling.v1alpha1.PriorityClass". +// +// This can be used to inline resource manifests inside other objects (e.g. as templates). +func KubePriorityClassV1Alpha1_Manifest(props *KubePriorityClassV1Alpha1Props) interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "k8s.KubePriorityClassV1Alpha1", + "manifest", + []interface{}{props}, + &returns, + ) + + return returns +} + +// Returns the `ApiObject` named `Resource` which is a child of the given construct. +// +// If `c` is an `ApiObject`, it is returned directly. Throws an +// exception if the construct does not have a child named `Default` _or_ if +// this child is not an `ApiObject`. +func KubePriorityClassV1Alpha1_Of(c constructs.IConstruct) cdk8s.ApiObject { + _init_.Initialize() + + var returns cdk8s.ApiObject + + _jsii_.StaticInvoke( + "k8s.KubePriorityClassV1Alpha1", + "of", + []interface{}{c}, + &returns, + ) + + return returns +} + +func KubePriorityClassV1Alpha1_GVK() *cdk8s.GroupVersionKind { + _init_.Initialize() + var returns *cdk8s.GroupVersionKind + _jsii_.StaticGet( + "k8s.KubePriorityClassV1Alpha1", + "GVK", + &returns, + ) + return returns +} + +func (k *jsiiProxy_KubePriorityClassV1Alpha1) AddDependency(dependencies ...constructs.IConstruct) { + args := []interface{}{} + for _, a := range dependencies { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addDependency", + args, + ) +} + +func (k *jsiiProxy_KubePriorityClassV1Alpha1) AddJsonPatch(ops ...cdk8s.JsonPatch) { + args := []interface{}{} + for _, a := range ops { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addJsonPatch", + args, + ) +} + +func (k *jsiiProxy_KubePriorityClassV1Alpha1) ToJson() interface{} { + var returns interface{} + + _jsii_.Invoke( + k, + "toJson", + nil, // no parameters + &returns, + ) + + return returns +} + +func (k *jsiiProxy_KubePriorityClassV1Alpha1) ToString() *string { + var returns *string + + _jsii_.Invoke( + k, + "toString", + nil, // no parameters + &returns, + ) + + return returns +} + +// DEPRECATED - This group version of PriorityClass is deprecated by scheduling.k8s.io/v1/PriorityClass. PriorityClass defines mapping from a priority class name to the priority integer value. The value can be any valid integer. +type KubePriorityClassV1Alpha1Props struct { + // The value of this priority class. + // + // This is the actual priority that pods receive when they have the name of this class in their pod spec. + Value *float64 `field:"required" json:"value" yaml:"value"` + // description is an arbitrary string that usually provides guidelines on when this priority class should be used. + Description *string `field:"optional" json:"description" yaml:"description"` + // globalDefault specifies whether this PriorityClass should be considered as the default priority for pods that do not have any priority class. + // + // Only one PriorityClass can be marked as `globalDefault`. However, if more than one PriorityClasses exists with their `globalDefault` field set to true, the smallest value of such global default PriorityClasses will be used as the default priority. + GlobalDefault *bool `field:"optional" json:"globalDefault" yaml:"globalDefault"` + // Standard object's metadata. + // + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + Metadata *ObjectMeta `field:"optional" json:"metadata" yaml:"metadata"` + // PreemptionPolicy is the Policy for preempting pods with lower priority. + // + // One of Never, PreemptLowerPriority. Defaults to PreemptLowerPriority if unset. This field is beta-level, gated by the NonPreemptingPriority feature-gate. + PreemptionPolicy *string `field:"optional" json:"preemptionPolicy" yaml:"preemptionPolicy"` +} + +// PriorityLevelConfigurationList is a list of PriorityLevelConfiguration objects. +type KubePriorityLevelConfigurationListV1Beta1 interface { + cdk8s.ApiObject + // The group portion of the API version (e.g. `authorization.k8s.io`). + ApiGroup() *string + // The object's API version (e.g. `authorization.k8s.io/v1`). + ApiVersion() *string + // The chart in which this object is defined. + Chart() cdk8s.Chart + // The object kind. + Kind() *string + // Metadata associated with this API object. + Metadata() cdk8s.ApiObjectMetadataDefinition + // The name of the API object. + // + // If a name is specified in `metadata.name` this will be the name returned. + // Otherwise, a name will be generated by calling + // `AddHelm.of(this).generatedObjectName(this)`, which by default uses the + // construct path to generate a DNS-compatible name for the resource. + Name() *string + // The tree node. + Node() constructs.Node + // Create a dependency between this ApiObject and other constructs. + // + // These can be other ApiObjects, Charts, or custom. + AddDependency(dependencies ...constructs.IConstruct) + // Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. + // + // Example: + // kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true)); + // + AddJsonPatch(ops ...cdk8s.JsonPatch) + // Renders the object to Kubernetes JSON. + ToJson() interface{} + // Returns a string representation of this construct. + ToString() *string +} + +// The jsii proxy struct for KubePriorityLevelConfigurationListV1Beta1 +type jsiiProxy_KubePriorityLevelConfigurationListV1Beta1 struct { + internal.Type__cdk8sApiObject +} + +func (j *jsiiProxy_KubePriorityLevelConfigurationListV1Beta1) ApiGroup() *string { + var returns *string + _jsii_.Get( + j, + "apiGroup", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubePriorityLevelConfigurationListV1Beta1) ApiVersion() *string { + var returns *string + _jsii_.Get( + j, + "apiVersion", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubePriorityLevelConfigurationListV1Beta1) Chart() cdk8s.Chart { + var returns cdk8s.Chart + _jsii_.Get( + j, + "chart", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubePriorityLevelConfigurationListV1Beta1) Kind() *string { + var returns *string + _jsii_.Get( + j, + "kind", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubePriorityLevelConfigurationListV1Beta1) Metadata() cdk8s.ApiObjectMetadataDefinition { + var returns cdk8s.ApiObjectMetadataDefinition + _jsii_.Get( + j, + "metadata", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubePriorityLevelConfigurationListV1Beta1) Name() *string { + var returns *string + _jsii_.Get( + j, + "name", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubePriorityLevelConfigurationListV1Beta1) Node() constructs.Node { + var returns constructs.Node + _jsii_.Get( + j, + "node", + &returns, + ) + return returns +} + +// Defines a "io.k8s.api.flowcontrol.v1beta1.PriorityLevelConfigurationList" API object. +func NewKubePriorityLevelConfigurationListV1Beta1(scope constructs.Construct, id *string, props *KubePriorityLevelConfigurationListV1Beta1Props) KubePriorityLevelConfigurationListV1Beta1 { + _init_.Initialize() + + j := jsiiProxy_KubePriorityLevelConfigurationListV1Beta1{} + + _jsii_.Create( + "k8s.KubePriorityLevelConfigurationListV1Beta1", + []interface{}{scope, id, props}, + &j, + ) + + return &j +} + +// Defines a "io.k8s.api.flowcontrol.v1beta1.PriorityLevelConfigurationList" API object. +func NewKubePriorityLevelConfigurationListV1Beta1_Override(k KubePriorityLevelConfigurationListV1Beta1, scope constructs.Construct, id *string, props *KubePriorityLevelConfigurationListV1Beta1Props) { + _init_.Initialize() + + _jsii_.Create( + "k8s.KubePriorityLevelConfigurationListV1Beta1", + []interface{}{scope, id, props}, + k, + ) +} + +// Checks if `x` is a construct. +// +// Use this method instead of `instanceof` to properly detect `Construct` +// instances, even when the construct library is symlinked. +// +// Explanation: in JavaScript, multiple copies of the `constructs` library on +// disk are seen as independent, completely different libraries. As a +// consequence, the class `Construct` in each copy of the `constructs` library +// is seen as a different class, and an instance of one class will not test as +// `instanceof` the other class. `npm install` will not create installations +// like this, but users may manually symlink construct libraries together or +// use a monorepo tool: in those cases, multiple copies of the `constructs` +// library can be accidentally installed, and `instanceof` will behave +// unpredictably. It is safest to avoid using `instanceof`, and using +// this type-testing method instead. +// +// Returns: true if `x` is an object created from a class which extends `Construct`. +func KubePriorityLevelConfigurationListV1Beta1_IsConstruct(x interface{}) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "k8s.KubePriorityLevelConfigurationListV1Beta1", + "isConstruct", + []interface{}{x}, + &returns, + ) + + return returns +} + +// Renders a Kubernetes manifest for "io.k8s.api.flowcontrol.v1beta1.PriorityLevelConfigurationList". +// +// This can be used to inline resource manifests inside other objects (e.g. as templates). +func KubePriorityLevelConfigurationListV1Beta1_Manifest(props *KubePriorityLevelConfigurationListV1Beta1Props) interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "k8s.KubePriorityLevelConfigurationListV1Beta1", + "manifest", + []interface{}{props}, + &returns, + ) + + return returns +} + +// Returns the `ApiObject` named `Resource` which is a child of the given construct. +// +// If `c` is an `ApiObject`, it is returned directly. Throws an +// exception if the construct does not have a child named `Default` _or_ if +// this child is not an `ApiObject`. +func KubePriorityLevelConfigurationListV1Beta1_Of(c constructs.IConstruct) cdk8s.ApiObject { + _init_.Initialize() + + var returns cdk8s.ApiObject + + _jsii_.StaticInvoke( + "k8s.KubePriorityLevelConfigurationListV1Beta1", + "of", + []interface{}{c}, + &returns, + ) + + return returns +} + +func KubePriorityLevelConfigurationListV1Beta1_GVK() *cdk8s.GroupVersionKind { + _init_.Initialize() + var returns *cdk8s.GroupVersionKind + _jsii_.StaticGet( + "k8s.KubePriorityLevelConfigurationListV1Beta1", + "GVK", + &returns, + ) + return returns +} + +func (k *jsiiProxy_KubePriorityLevelConfigurationListV1Beta1) AddDependency(dependencies ...constructs.IConstruct) { + args := []interface{}{} + for _, a := range dependencies { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addDependency", + args, + ) +} + +func (k *jsiiProxy_KubePriorityLevelConfigurationListV1Beta1) AddJsonPatch(ops ...cdk8s.JsonPatch) { + args := []interface{}{} + for _, a := range ops { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addJsonPatch", + args, + ) +} + +func (k *jsiiProxy_KubePriorityLevelConfigurationListV1Beta1) ToJson() interface{} { + var returns interface{} + + _jsii_.Invoke( + k, + "toJson", + nil, // no parameters + &returns, + ) + + return returns +} + +func (k *jsiiProxy_KubePriorityLevelConfigurationListV1Beta1) ToString() *string { + var returns *string + + _jsii_.Invoke( + k, + "toString", + nil, // no parameters + &returns, + ) + + return returns +} + +// PriorityLevelConfigurationList is a list of PriorityLevelConfiguration objects. +type KubePriorityLevelConfigurationListV1Beta1Props struct { + // `items` is a list of request-priorities. + Items *[]*KubePriorityLevelConfigurationV1Beta1Props `field:"required" json:"items" yaml:"items"` + // `metadata` is the standard object's metadata. + // + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + Metadata *ListMeta `field:"optional" json:"metadata" yaml:"metadata"` +} + +// PriorityLevelConfiguration represents the configuration of a priority level. +type KubePriorityLevelConfigurationV1Beta1 interface { + cdk8s.ApiObject + // The group portion of the API version (e.g. `authorization.k8s.io`). + ApiGroup() *string + // The object's API version (e.g. `authorization.k8s.io/v1`). + ApiVersion() *string + // The chart in which this object is defined. + Chart() cdk8s.Chart + // The object kind. + Kind() *string + // Metadata associated with this API object. + Metadata() cdk8s.ApiObjectMetadataDefinition + // The name of the API object. + // + // If a name is specified in `metadata.name` this will be the name returned. + // Otherwise, a name will be generated by calling + // `AddHelm.of(this).generatedObjectName(this)`, which by default uses the + // construct path to generate a DNS-compatible name for the resource. + Name() *string + // The tree node. + Node() constructs.Node + // Create a dependency between this ApiObject and other constructs. + // + // These can be other ApiObjects, Charts, or custom. + AddDependency(dependencies ...constructs.IConstruct) + // Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. + // + // Example: + // kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true)); + // + AddJsonPatch(ops ...cdk8s.JsonPatch) + // Renders the object to Kubernetes JSON. + ToJson() interface{} + // Returns a string representation of this construct. + ToString() *string +} + +// The jsii proxy struct for KubePriorityLevelConfigurationV1Beta1 +type jsiiProxy_KubePriorityLevelConfigurationV1Beta1 struct { + internal.Type__cdk8sApiObject +} + +func (j *jsiiProxy_KubePriorityLevelConfigurationV1Beta1) ApiGroup() *string { + var returns *string + _jsii_.Get( + j, + "apiGroup", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubePriorityLevelConfigurationV1Beta1) ApiVersion() *string { + var returns *string + _jsii_.Get( + j, + "apiVersion", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubePriorityLevelConfigurationV1Beta1) Chart() cdk8s.Chart { + var returns cdk8s.Chart + _jsii_.Get( + j, + "chart", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubePriorityLevelConfigurationV1Beta1) Kind() *string { + var returns *string + _jsii_.Get( + j, + "kind", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubePriorityLevelConfigurationV1Beta1) Metadata() cdk8s.ApiObjectMetadataDefinition { + var returns cdk8s.ApiObjectMetadataDefinition + _jsii_.Get( + j, + "metadata", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubePriorityLevelConfigurationV1Beta1) Name() *string { + var returns *string + _jsii_.Get( + j, + "name", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubePriorityLevelConfigurationV1Beta1) Node() constructs.Node { + var returns constructs.Node + _jsii_.Get( + j, + "node", + &returns, + ) + return returns +} + +// Defines a "io.k8s.api.flowcontrol.v1beta1.PriorityLevelConfiguration" API object. +func NewKubePriorityLevelConfigurationV1Beta1(scope constructs.Construct, id *string, props *KubePriorityLevelConfigurationV1Beta1Props) KubePriorityLevelConfigurationV1Beta1 { + _init_.Initialize() + + j := jsiiProxy_KubePriorityLevelConfigurationV1Beta1{} + + _jsii_.Create( + "k8s.KubePriorityLevelConfigurationV1Beta1", + []interface{}{scope, id, props}, + &j, + ) + + return &j +} + +// Defines a "io.k8s.api.flowcontrol.v1beta1.PriorityLevelConfiguration" API object. +func NewKubePriorityLevelConfigurationV1Beta1_Override(k KubePriorityLevelConfigurationV1Beta1, scope constructs.Construct, id *string, props *KubePriorityLevelConfigurationV1Beta1Props) { + _init_.Initialize() + + _jsii_.Create( + "k8s.KubePriorityLevelConfigurationV1Beta1", + []interface{}{scope, id, props}, + k, + ) +} + +// Checks if `x` is a construct. +// +// Use this method instead of `instanceof` to properly detect `Construct` +// instances, even when the construct library is symlinked. +// +// Explanation: in JavaScript, multiple copies of the `constructs` library on +// disk are seen as independent, completely different libraries. As a +// consequence, the class `Construct` in each copy of the `constructs` library +// is seen as a different class, and an instance of one class will not test as +// `instanceof` the other class. `npm install` will not create installations +// like this, but users may manually symlink construct libraries together or +// use a monorepo tool: in those cases, multiple copies of the `constructs` +// library can be accidentally installed, and `instanceof` will behave +// unpredictably. It is safest to avoid using `instanceof`, and using +// this type-testing method instead. +// +// Returns: true if `x` is an object created from a class which extends `Construct`. +func KubePriorityLevelConfigurationV1Beta1_IsConstruct(x interface{}) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "k8s.KubePriorityLevelConfigurationV1Beta1", + "isConstruct", + []interface{}{x}, + &returns, + ) + + return returns +} + +// Renders a Kubernetes manifest for "io.k8s.api.flowcontrol.v1beta1.PriorityLevelConfiguration". +// +// This can be used to inline resource manifests inside other objects (e.g. as templates). +func KubePriorityLevelConfigurationV1Beta1_Manifest(props *KubePriorityLevelConfigurationV1Beta1Props) interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "k8s.KubePriorityLevelConfigurationV1Beta1", + "manifest", + []interface{}{props}, + &returns, + ) + + return returns +} + +// Returns the `ApiObject` named `Resource` which is a child of the given construct. +// +// If `c` is an `ApiObject`, it is returned directly. Throws an +// exception if the construct does not have a child named `Default` _or_ if +// this child is not an `ApiObject`. +func KubePriorityLevelConfigurationV1Beta1_Of(c constructs.IConstruct) cdk8s.ApiObject { + _init_.Initialize() + + var returns cdk8s.ApiObject + + _jsii_.StaticInvoke( + "k8s.KubePriorityLevelConfigurationV1Beta1", + "of", + []interface{}{c}, + &returns, + ) + + return returns +} + +func KubePriorityLevelConfigurationV1Beta1_GVK() *cdk8s.GroupVersionKind { + _init_.Initialize() + var returns *cdk8s.GroupVersionKind + _jsii_.StaticGet( + "k8s.KubePriorityLevelConfigurationV1Beta1", + "GVK", + &returns, + ) + return returns +} + +func (k *jsiiProxy_KubePriorityLevelConfigurationV1Beta1) AddDependency(dependencies ...constructs.IConstruct) { + args := []interface{}{} + for _, a := range dependencies { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addDependency", + args, + ) +} + +func (k *jsiiProxy_KubePriorityLevelConfigurationV1Beta1) AddJsonPatch(ops ...cdk8s.JsonPatch) { + args := []interface{}{} + for _, a := range ops { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addJsonPatch", + args, + ) +} + +func (k *jsiiProxy_KubePriorityLevelConfigurationV1Beta1) ToJson() interface{} { + var returns interface{} + + _jsii_.Invoke( + k, + "toJson", + nil, // no parameters + &returns, + ) + + return returns +} + +func (k *jsiiProxy_KubePriorityLevelConfigurationV1Beta1) ToString() *string { + var returns *string + + _jsii_.Invoke( + k, + "toString", + nil, // no parameters + &returns, + ) + + return returns +} + +// PriorityLevelConfiguration represents the configuration of a priority level. +type KubePriorityLevelConfigurationV1Beta1Props struct { + // `metadata` is the standard object's metadata. + // + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + Metadata *ObjectMeta `field:"optional" json:"metadata" yaml:"metadata"` + // `spec` is the specification of the desired behavior of a "request-priority". + // + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + Spec *PriorityLevelConfigurationSpecV1Beta1 `field:"optional" json:"spec" yaml:"spec"` +} + +// ReplicaSet ensures that a specified number of pod replicas are running at any given time. +type KubeReplicaSet interface { + cdk8s.ApiObject + // The group portion of the API version (e.g. `authorization.k8s.io`). + ApiGroup() *string + // The object's API version (e.g. `authorization.k8s.io/v1`). + ApiVersion() *string + // The chart in which this object is defined. + Chart() cdk8s.Chart + // The object kind. + Kind() *string + // Metadata associated with this API object. + Metadata() cdk8s.ApiObjectMetadataDefinition + // The name of the API object. + // + // If a name is specified in `metadata.name` this will be the name returned. + // Otherwise, a name will be generated by calling + // `AddHelm.of(this).generatedObjectName(this)`, which by default uses the + // construct path to generate a DNS-compatible name for the resource. + Name() *string + // The tree node. + Node() constructs.Node + // Create a dependency between this ApiObject and other constructs. + // + // These can be other ApiObjects, Charts, or custom. + AddDependency(dependencies ...constructs.IConstruct) + // Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. + // + // Example: + // kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true)); + // + AddJsonPatch(ops ...cdk8s.JsonPatch) + // Renders the object to Kubernetes JSON. + ToJson() interface{} + // Returns a string representation of this construct. + ToString() *string +} + +// The jsii proxy struct for KubeReplicaSet +type jsiiProxy_KubeReplicaSet struct { + internal.Type__cdk8sApiObject +} + +func (j *jsiiProxy_KubeReplicaSet) ApiGroup() *string { + var returns *string + _jsii_.Get( + j, + "apiGroup", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeReplicaSet) ApiVersion() *string { + var returns *string + _jsii_.Get( + j, + "apiVersion", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeReplicaSet) Chart() cdk8s.Chart { + var returns cdk8s.Chart + _jsii_.Get( + j, + "chart", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeReplicaSet) Kind() *string { + var returns *string + _jsii_.Get( + j, + "kind", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeReplicaSet) Metadata() cdk8s.ApiObjectMetadataDefinition { + var returns cdk8s.ApiObjectMetadataDefinition + _jsii_.Get( + j, + "metadata", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeReplicaSet) Name() *string { + var returns *string + _jsii_.Get( + j, + "name", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeReplicaSet) Node() constructs.Node { + var returns constructs.Node + _jsii_.Get( + j, + "node", + &returns, + ) + return returns +} + +// Defines a "io.k8s.api.apps.v1.ReplicaSet" API object. +func NewKubeReplicaSet(scope constructs.Construct, id *string, props *KubeReplicaSetProps) KubeReplicaSet { + _init_.Initialize() + + j := jsiiProxy_KubeReplicaSet{} + + _jsii_.Create( + "k8s.KubeReplicaSet", + []interface{}{scope, id, props}, + &j, + ) + + return &j +} + +// Defines a "io.k8s.api.apps.v1.ReplicaSet" API object. +func NewKubeReplicaSet_Override(k KubeReplicaSet, scope constructs.Construct, id *string, props *KubeReplicaSetProps) { + _init_.Initialize() + + _jsii_.Create( + "k8s.KubeReplicaSet", + []interface{}{scope, id, props}, + k, + ) +} + +// Checks if `x` is a construct. +// +// Use this method instead of `instanceof` to properly detect `Construct` +// instances, even when the construct library is symlinked. +// +// Explanation: in JavaScript, multiple copies of the `constructs` library on +// disk are seen as independent, completely different libraries. As a +// consequence, the class `Construct` in each copy of the `constructs` library +// is seen as a different class, and an instance of one class will not test as +// `instanceof` the other class. `npm install` will not create installations +// like this, but users may manually symlink construct libraries together or +// use a monorepo tool: in those cases, multiple copies of the `constructs` +// library can be accidentally installed, and `instanceof` will behave +// unpredictably. It is safest to avoid using `instanceof`, and using +// this type-testing method instead. +// +// Returns: true if `x` is an object created from a class which extends `Construct`. +func KubeReplicaSet_IsConstruct(x interface{}) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "k8s.KubeReplicaSet", + "isConstruct", + []interface{}{x}, + &returns, + ) + + return returns +} + +// Renders a Kubernetes manifest for "io.k8s.api.apps.v1.ReplicaSet". +// +// This can be used to inline resource manifests inside other objects (e.g. as templates). +func KubeReplicaSet_Manifest(props *KubeReplicaSetProps) interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "k8s.KubeReplicaSet", + "manifest", + []interface{}{props}, + &returns, + ) + + return returns +} + +// Returns the `ApiObject` named `Resource` which is a child of the given construct. +// +// If `c` is an `ApiObject`, it is returned directly. Throws an +// exception if the construct does not have a child named `Default` _or_ if +// this child is not an `ApiObject`. +func KubeReplicaSet_Of(c constructs.IConstruct) cdk8s.ApiObject { + _init_.Initialize() + + var returns cdk8s.ApiObject + + _jsii_.StaticInvoke( + "k8s.KubeReplicaSet", + "of", + []interface{}{c}, + &returns, + ) + + return returns +} + +func KubeReplicaSet_GVK() *cdk8s.GroupVersionKind { + _init_.Initialize() + var returns *cdk8s.GroupVersionKind + _jsii_.StaticGet( + "k8s.KubeReplicaSet", + "GVK", + &returns, + ) + return returns +} + +func (k *jsiiProxy_KubeReplicaSet) AddDependency(dependencies ...constructs.IConstruct) { + args := []interface{}{} + for _, a := range dependencies { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addDependency", + args, + ) +} + +func (k *jsiiProxy_KubeReplicaSet) AddJsonPatch(ops ...cdk8s.JsonPatch) { + args := []interface{}{} + for _, a := range ops { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addJsonPatch", + args, + ) +} + +func (k *jsiiProxy_KubeReplicaSet) ToJson() interface{} { + var returns interface{} + + _jsii_.Invoke( + k, + "toJson", + nil, // no parameters + &returns, + ) + + return returns +} + +func (k *jsiiProxy_KubeReplicaSet) ToString() *string { + var returns *string + + _jsii_.Invoke( + k, + "toString", + nil, // no parameters + &returns, + ) + + return returns +} + +// ReplicaSetList is a collection of ReplicaSets. +type KubeReplicaSetList interface { + cdk8s.ApiObject + // The group portion of the API version (e.g. `authorization.k8s.io`). + ApiGroup() *string + // The object's API version (e.g. `authorization.k8s.io/v1`). + ApiVersion() *string + // The chart in which this object is defined. + Chart() cdk8s.Chart + // The object kind. + Kind() *string + // Metadata associated with this API object. + Metadata() cdk8s.ApiObjectMetadataDefinition + // The name of the API object. + // + // If a name is specified in `metadata.name` this will be the name returned. + // Otherwise, a name will be generated by calling + // `AddHelm.of(this).generatedObjectName(this)`, which by default uses the + // construct path to generate a DNS-compatible name for the resource. + Name() *string + // The tree node. + Node() constructs.Node + // Create a dependency between this ApiObject and other constructs. + // + // These can be other ApiObjects, Charts, or custom. + AddDependency(dependencies ...constructs.IConstruct) + // Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. + // + // Example: + // kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true)); + // + AddJsonPatch(ops ...cdk8s.JsonPatch) + // Renders the object to Kubernetes JSON. + ToJson() interface{} + // Returns a string representation of this construct. + ToString() *string +} + +// The jsii proxy struct for KubeReplicaSetList +type jsiiProxy_KubeReplicaSetList struct { + internal.Type__cdk8sApiObject +} + +func (j *jsiiProxy_KubeReplicaSetList) ApiGroup() *string { + var returns *string + _jsii_.Get( + j, + "apiGroup", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeReplicaSetList) ApiVersion() *string { + var returns *string + _jsii_.Get( + j, + "apiVersion", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeReplicaSetList) Chart() cdk8s.Chart { + var returns cdk8s.Chart + _jsii_.Get( + j, + "chart", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeReplicaSetList) Kind() *string { + var returns *string + _jsii_.Get( + j, + "kind", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeReplicaSetList) Metadata() cdk8s.ApiObjectMetadataDefinition { + var returns cdk8s.ApiObjectMetadataDefinition + _jsii_.Get( + j, + "metadata", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeReplicaSetList) Name() *string { + var returns *string + _jsii_.Get( + j, + "name", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeReplicaSetList) Node() constructs.Node { + var returns constructs.Node + _jsii_.Get( + j, + "node", + &returns, + ) + return returns +} + +// Defines a "io.k8s.api.apps.v1.ReplicaSetList" API object. +func NewKubeReplicaSetList(scope constructs.Construct, id *string, props *KubeReplicaSetListProps) KubeReplicaSetList { + _init_.Initialize() + + j := jsiiProxy_KubeReplicaSetList{} + + _jsii_.Create( + "k8s.KubeReplicaSetList", + []interface{}{scope, id, props}, + &j, + ) + + return &j +} + +// Defines a "io.k8s.api.apps.v1.ReplicaSetList" API object. +func NewKubeReplicaSetList_Override(k KubeReplicaSetList, scope constructs.Construct, id *string, props *KubeReplicaSetListProps) { + _init_.Initialize() + + _jsii_.Create( + "k8s.KubeReplicaSetList", + []interface{}{scope, id, props}, + k, + ) +} + +// Checks if `x` is a construct. +// +// Use this method instead of `instanceof` to properly detect `Construct` +// instances, even when the construct library is symlinked. +// +// Explanation: in JavaScript, multiple copies of the `constructs` library on +// disk are seen as independent, completely different libraries. As a +// consequence, the class `Construct` in each copy of the `constructs` library +// is seen as a different class, and an instance of one class will not test as +// `instanceof` the other class. `npm install` will not create installations +// like this, but users may manually symlink construct libraries together or +// use a monorepo tool: in those cases, multiple copies of the `constructs` +// library can be accidentally installed, and `instanceof` will behave +// unpredictably. It is safest to avoid using `instanceof`, and using +// this type-testing method instead. +// +// Returns: true if `x` is an object created from a class which extends `Construct`. +func KubeReplicaSetList_IsConstruct(x interface{}) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "k8s.KubeReplicaSetList", + "isConstruct", + []interface{}{x}, + &returns, + ) + + return returns +} + +// Renders a Kubernetes manifest for "io.k8s.api.apps.v1.ReplicaSetList". +// +// This can be used to inline resource manifests inside other objects (e.g. as templates). +func KubeReplicaSetList_Manifest(props *KubeReplicaSetListProps) interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "k8s.KubeReplicaSetList", + "manifest", + []interface{}{props}, + &returns, + ) + + return returns +} + +// Returns the `ApiObject` named `Resource` which is a child of the given construct. +// +// If `c` is an `ApiObject`, it is returned directly. Throws an +// exception if the construct does not have a child named `Default` _or_ if +// this child is not an `ApiObject`. +func KubeReplicaSetList_Of(c constructs.IConstruct) cdk8s.ApiObject { + _init_.Initialize() + + var returns cdk8s.ApiObject + + _jsii_.StaticInvoke( + "k8s.KubeReplicaSetList", + "of", + []interface{}{c}, + &returns, + ) + + return returns +} + +func KubeReplicaSetList_GVK() *cdk8s.GroupVersionKind { + _init_.Initialize() + var returns *cdk8s.GroupVersionKind + _jsii_.StaticGet( + "k8s.KubeReplicaSetList", + "GVK", + &returns, + ) + return returns +} + +func (k *jsiiProxy_KubeReplicaSetList) AddDependency(dependencies ...constructs.IConstruct) { + args := []interface{}{} + for _, a := range dependencies { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addDependency", + args, + ) +} + +func (k *jsiiProxy_KubeReplicaSetList) AddJsonPatch(ops ...cdk8s.JsonPatch) { + args := []interface{}{} + for _, a := range ops { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addJsonPatch", + args, + ) +} + +func (k *jsiiProxy_KubeReplicaSetList) ToJson() interface{} { + var returns interface{} + + _jsii_.Invoke( + k, + "toJson", + nil, // no parameters + &returns, + ) + + return returns +} + +func (k *jsiiProxy_KubeReplicaSetList) ToString() *string { + var returns *string + + _jsii_.Invoke( + k, + "toString", + nil, // no parameters + &returns, + ) + + return returns +} + +// ReplicaSetList is a collection of ReplicaSets. +type KubeReplicaSetListProps struct { + // List of ReplicaSets. + // + // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller + Items *[]*KubeReplicaSetProps `field:"required" json:"items" yaml:"items"` + // Standard list metadata. + // + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + Metadata *ListMeta `field:"optional" json:"metadata" yaml:"metadata"` +} + +// ReplicaSet ensures that a specified number of pod replicas are running at any given time. +type KubeReplicaSetProps struct { + // If the Labels of a ReplicaSet are empty, they are defaulted to be the same as the Pod(s) that the ReplicaSet manages. + // + // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + Metadata *ObjectMeta `field:"optional" json:"metadata" yaml:"metadata"` + // Spec defines the specification of the desired behavior of the ReplicaSet. + // + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + Spec *ReplicaSetSpec `field:"optional" json:"spec" yaml:"spec"` +} + +// ReplicationController represents the configuration of a replication controller. +type KubeReplicationController interface { + cdk8s.ApiObject + // The group portion of the API version (e.g. `authorization.k8s.io`). + ApiGroup() *string + // The object's API version (e.g. `authorization.k8s.io/v1`). + ApiVersion() *string + // The chart in which this object is defined. + Chart() cdk8s.Chart + // The object kind. + Kind() *string + // Metadata associated with this API object. + Metadata() cdk8s.ApiObjectMetadataDefinition + // The name of the API object. + // + // If a name is specified in `metadata.name` this will be the name returned. + // Otherwise, a name will be generated by calling + // `AddHelm.of(this).generatedObjectName(this)`, which by default uses the + // construct path to generate a DNS-compatible name for the resource. + Name() *string + // The tree node. + Node() constructs.Node + // Create a dependency between this ApiObject and other constructs. + // + // These can be other ApiObjects, Charts, or custom. + AddDependency(dependencies ...constructs.IConstruct) + // Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. + // + // Example: + // kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true)); + // + AddJsonPatch(ops ...cdk8s.JsonPatch) + // Renders the object to Kubernetes JSON. + ToJson() interface{} + // Returns a string representation of this construct. + ToString() *string +} + +// The jsii proxy struct for KubeReplicationController +type jsiiProxy_KubeReplicationController struct { + internal.Type__cdk8sApiObject +} + +func (j *jsiiProxy_KubeReplicationController) ApiGroup() *string { + var returns *string + _jsii_.Get( + j, + "apiGroup", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeReplicationController) ApiVersion() *string { + var returns *string + _jsii_.Get( + j, + "apiVersion", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeReplicationController) Chart() cdk8s.Chart { + var returns cdk8s.Chart + _jsii_.Get( + j, + "chart", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeReplicationController) Kind() *string { + var returns *string + _jsii_.Get( + j, + "kind", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeReplicationController) Metadata() cdk8s.ApiObjectMetadataDefinition { + var returns cdk8s.ApiObjectMetadataDefinition + _jsii_.Get( + j, + "metadata", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeReplicationController) Name() *string { + var returns *string + _jsii_.Get( + j, + "name", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeReplicationController) Node() constructs.Node { + var returns constructs.Node + _jsii_.Get( + j, + "node", + &returns, + ) + return returns +} + +// Defines a "io.k8s.api.core.v1.ReplicationController" API object. +func NewKubeReplicationController(scope constructs.Construct, id *string, props *KubeReplicationControllerProps) KubeReplicationController { + _init_.Initialize() + + j := jsiiProxy_KubeReplicationController{} + + _jsii_.Create( + "k8s.KubeReplicationController", + []interface{}{scope, id, props}, + &j, + ) + + return &j +} + +// Defines a "io.k8s.api.core.v1.ReplicationController" API object. +func NewKubeReplicationController_Override(k KubeReplicationController, scope constructs.Construct, id *string, props *KubeReplicationControllerProps) { + _init_.Initialize() + + _jsii_.Create( + "k8s.KubeReplicationController", + []interface{}{scope, id, props}, + k, + ) +} + +// Checks if `x` is a construct. +// +// Use this method instead of `instanceof` to properly detect `Construct` +// instances, even when the construct library is symlinked. +// +// Explanation: in JavaScript, multiple copies of the `constructs` library on +// disk are seen as independent, completely different libraries. As a +// consequence, the class `Construct` in each copy of the `constructs` library +// is seen as a different class, and an instance of one class will not test as +// `instanceof` the other class. `npm install` will not create installations +// like this, but users may manually symlink construct libraries together or +// use a monorepo tool: in those cases, multiple copies of the `constructs` +// library can be accidentally installed, and `instanceof` will behave +// unpredictably. It is safest to avoid using `instanceof`, and using +// this type-testing method instead. +// +// Returns: true if `x` is an object created from a class which extends `Construct`. +func KubeReplicationController_IsConstruct(x interface{}) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "k8s.KubeReplicationController", + "isConstruct", + []interface{}{x}, + &returns, + ) + + return returns +} + +// Renders a Kubernetes manifest for "io.k8s.api.core.v1.ReplicationController". +// +// This can be used to inline resource manifests inside other objects (e.g. as templates). +func KubeReplicationController_Manifest(props *KubeReplicationControllerProps) interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "k8s.KubeReplicationController", + "manifest", + []interface{}{props}, + &returns, + ) + + return returns +} + +// Returns the `ApiObject` named `Resource` which is a child of the given construct. +// +// If `c` is an `ApiObject`, it is returned directly. Throws an +// exception if the construct does not have a child named `Default` _or_ if +// this child is not an `ApiObject`. +func KubeReplicationController_Of(c constructs.IConstruct) cdk8s.ApiObject { + _init_.Initialize() + + var returns cdk8s.ApiObject + + _jsii_.StaticInvoke( + "k8s.KubeReplicationController", + "of", + []interface{}{c}, + &returns, + ) + + return returns +} + +func KubeReplicationController_GVK() *cdk8s.GroupVersionKind { + _init_.Initialize() + var returns *cdk8s.GroupVersionKind + _jsii_.StaticGet( + "k8s.KubeReplicationController", + "GVK", + &returns, + ) + return returns +} + +func (k *jsiiProxy_KubeReplicationController) AddDependency(dependencies ...constructs.IConstruct) { + args := []interface{}{} + for _, a := range dependencies { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addDependency", + args, + ) +} + +func (k *jsiiProxy_KubeReplicationController) AddJsonPatch(ops ...cdk8s.JsonPatch) { + args := []interface{}{} + for _, a := range ops { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addJsonPatch", + args, + ) +} + +func (k *jsiiProxy_KubeReplicationController) ToJson() interface{} { + var returns interface{} + + _jsii_.Invoke( + k, + "toJson", + nil, // no parameters + &returns, + ) + + return returns +} + +func (k *jsiiProxy_KubeReplicationController) ToString() *string { + var returns *string + + _jsii_.Invoke( + k, + "toString", + nil, // no parameters + &returns, + ) + + return returns +} + +// ReplicationControllerList is a collection of replication controllers. +type KubeReplicationControllerList interface { + cdk8s.ApiObject + // The group portion of the API version (e.g. `authorization.k8s.io`). + ApiGroup() *string + // The object's API version (e.g. `authorization.k8s.io/v1`). + ApiVersion() *string + // The chart in which this object is defined. + Chart() cdk8s.Chart + // The object kind. + Kind() *string + // Metadata associated with this API object. + Metadata() cdk8s.ApiObjectMetadataDefinition + // The name of the API object. + // + // If a name is specified in `metadata.name` this will be the name returned. + // Otherwise, a name will be generated by calling + // `AddHelm.of(this).generatedObjectName(this)`, which by default uses the + // construct path to generate a DNS-compatible name for the resource. + Name() *string + // The tree node. + Node() constructs.Node + // Create a dependency between this ApiObject and other constructs. + // + // These can be other ApiObjects, Charts, or custom. + AddDependency(dependencies ...constructs.IConstruct) + // Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. + // + // Example: + // kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true)); + // + AddJsonPatch(ops ...cdk8s.JsonPatch) + // Renders the object to Kubernetes JSON. + ToJson() interface{} + // Returns a string representation of this construct. + ToString() *string +} + +// The jsii proxy struct for KubeReplicationControllerList +type jsiiProxy_KubeReplicationControllerList struct { + internal.Type__cdk8sApiObject +} + +func (j *jsiiProxy_KubeReplicationControllerList) ApiGroup() *string { + var returns *string + _jsii_.Get( + j, + "apiGroup", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeReplicationControllerList) ApiVersion() *string { + var returns *string + _jsii_.Get( + j, + "apiVersion", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeReplicationControllerList) Chart() cdk8s.Chart { + var returns cdk8s.Chart + _jsii_.Get( + j, + "chart", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeReplicationControllerList) Kind() *string { + var returns *string + _jsii_.Get( + j, + "kind", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeReplicationControllerList) Metadata() cdk8s.ApiObjectMetadataDefinition { + var returns cdk8s.ApiObjectMetadataDefinition + _jsii_.Get( + j, + "metadata", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeReplicationControllerList) Name() *string { + var returns *string + _jsii_.Get( + j, + "name", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeReplicationControllerList) Node() constructs.Node { + var returns constructs.Node + _jsii_.Get( + j, + "node", + &returns, + ) + return returns +} + +// Defines a "io.k8s.api.core.v1.ReplicationControllerList" API object. +func NewKubeReplicationControllerList(scope constructs.Construct, id *string, props *KubeReplicationControllerListProps) KubeReplicationControllerList { + _init_.Initialize() + + j := jsiiProxy_KubeReplicationControllerList{} + + _jsii_.Create( + "k8s.KubeReplicationControllerList", + []interface{}{scope, id, props}, + &j, + ) + + return &j +} + +// Defines a "io.k8s.api.core.v1.ReplicationControllerList" API object. +func NewKubeReplicationControllerList_Override(k KubeReplicationControllerList, scope constructs.Construct, id *string, props *KubeReplicationControllerListProps) { + _init_.Initialize() + + _jsii_.Create( + "k8s.KubeReplicationControllerList", + []interface{}{scope, id, props}, + k, + ) +} + +// Checks if `x` is a construct. +// +// Use this method instead of `instanceof` to properly detect `Construct` +// instances, even when the construct library is symlinked. +// +// Explanation: in JavaScript, multiple copies of the `constructs` library on +// disk are seen as independent, completely different libraries. As a +// consequence, the class `Construct` in each copy of the `constructs` library +// is seen as a different class, and an instance of one class will not test as +// `instanceof` the other class. `npm install` will not create installations +// like this, but users may manually symlink construct libraries together or +// use a monorepo tool: in those cases, multiple copies of the `constructs` +// library can be accidentally installed, and `instanceof` will behave +// unpredictably. It is safest to avoid using `instanceof`, and using +// this type-testing method instead. +// +// Returns: true if `x` is an object created from a class which extends `Construct`. +func KubeReplicationControllerList_IsConstruct(x interface{}) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "k8s.KubeReplicationControllerList", + "isConstruct", + []interface{}{x}, + &returns, + ) + + return returns +} + +// Renders a Kubernetes manifest for "io.k8s.api.core.v1.ReplicationControllerList". +// +// This can be used to inline resource manifests inside other objects (e.g. as templates). +func KubeReplicationControllerList_Manifest(props *KubeReplicationControllerListProps) interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "k8s.KubeReplicationControllerList", + "manifest", + []interface{}{props}, + &returns, + ) + + return returns +} + +// Returns the `ApiObject` named `Resource` which is a child of the given construct. +// +// If `c` is an `ApiObject`, it is returned directly. Throws an +// exception if the construct does not have a child named `Default` _or_ if +// this child is not an `ApiObject`. +func KubeReplicationControllerList_Of(c constructs.IConstruct) cdk8s.ApiObject { + _init_.Initialize() + + var returns cdk8s.ApiObject + + _jsii_.StaticInvoke( + "k8s.KubeReplicationControllerList", + "of", + []interface{}{c}, + &returns, + ) + + return returns +} + +func KubeReplicationControllerList_GVK() *cdk8s.GroupVersionKind { + _init_.Initialize() + var returns *cdk8s.GroupVersionKind + _jsii_.StaticGet( + "k8s.KubeReplicationControllerList", + "GVK", + &returns, + ) + return returns +} + +func (k *jsiiProxy_KubeReplicationControllerList) AddDependency(dependencies ...constructs.IConstruct) { + args := []interface{}{} + for _, a := range dependencies { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addDependency", + args, + ) +} + +func (k *jsiiProxy_KubeReplicationControllerList) AddJsonPatch(ops ...cdk8s.JsonPatch) { + args := []interface{}{} + for _, a := range ops { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addJsonPatch", + args, + ) +} + +func (k *jsiiProxy_KubeReplicationControllerList) ToJson() interface{} { + var returns interface{} + + _jsii_.Invoke( + k, + "toJson", + nil, // no parameters + &returns, + ) + + return returns +} + +func (k *jsiiProxy_KubeReplicationControllerList) ToString() *string { + var returns *string + + _jsii_.Invoke( + k, + "toString", + nil, // no parameters + &returns, + ) + + return returns +} + +// ReplicationControllerList is a collection of replication controllers. +type KubeReplicationControllerListProps struct { + // List of replication controllers. + // + // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller + Items *[]*KubeReplicationControllerProps `field:"required" json:"items" yaml:"items"` + // Standard list metadata. + // + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + Metadata *ListMeta `field:"optional" json:"metadata" yaml:"metadata"` +} + +// ReplicationController represents the configuration of a replication controller. +type KubeReplicationControllerProps struct { + // If the Labels of a ReplicationController are empty, they are defaulted to be the same as the Pod(s) that the replication controller manages. + // + // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + Metadata *ObjectMeta `field:"optional" json:"metadata" yaml:"metadata"` + // Spec defines the specification of the desired behavior of the replication controller. + // + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + Spec *ReplicationControllerSpec `field:"optional" json:"spec" yaml:"spec"` +} + +// ResourceQuota sets aggregate quota restrictions enforced per namespace. +type KubeResourceQuota interface { + cdk8s.ApiObject + // The group portion of the API version (e.g. `authorization.k8s.io`). + ApiGroup() *string + // The object's API version (e.g. `authorization.k8s.io/v1`). + ApiVersion() *string + // The chart in which this object is defined. + Chart() cdk8s.Chart + // The object kind. + Kind() *string + // Metadata associated with this API object. + Metadata() cdk8s.ApiObjectMetadataDefinition + // The name of the API object. + // + // If a name is specified in `metadata.name` this will be the name returned. + // Otherwise, a name will be generated by calling + // `AddHelm.of(this).generatedObjectName(this)`, which by default uses the + // construct path to generate a DNS-compatible name for the resource. + Name() *string + // The tree node. + Node() constructs.Node + // Create a dependency between this ApiObject and other constructs. + // + // These can be other ApiObjects, Charts, or custom. + AddDependency(dependencies ...constructs.IConstruct) + // Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. + // + // Example: + // kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true)); + // + AddJsonPatch(ops ...cdk8s.JsonPatch) + // Renders the object to Kubernetes JSON. + ToJson() interface{} + // Returns a string representation of this construct. + ToString() *string +} + +// The jsii proxy struct for KubeResourceQuota +type jsiiProxy_KubeResourceQuota struct { + internal.Type__cdk8sApiObject +} + +func (j *jsiiProxy_KubeResourceQuota) ApiGroup() *string { + var returns *string + _jsii_.Get( + j, + "apiGroup", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeResourceQuota) ApiVersion() *string { + var returns *string + _jsii_.Get( + j, + "apiVersion", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeResourceQuota) Chart() cdk8s.Chart { + var returns cdk8s.Chart + _jsii_.Get( + j, + "chart", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeResourceQuota) Kind() *string { + var returns *string + _jsii_.Get( + j, + "kind", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeResourceQuota) Metadata() cdk8s.ApiObjectMetadataDefinition { + var returns cdk8s.ApiObjectMetadataDefinition + _jsii_.Get( + j, + "metadata", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeResourceQuota) Name() *string { + var returns *string + _jsii_.Get( + j, + "name", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeResourceQuota) Node() constructs.Node { + var returns constructs.Node + _jsii_.Get( + j, + "node", + &returns, + ) + return returns +} + +// Defines a "io.k8s.api.core.v1.ResourceQuota" API object. +func NewKubeResourceQuota(scope constructs.Construct, id *string, props *KubeResourceQuotaProps) KubeResourceQuota { + _init_.Initialize() + + j := jsiiProxy_KubeResourceQuota{} + + _jsii_.Create( + "k8s.KubeResourceQuota", + []interface{}{scope, id, props}, + &j, + ) + + return &j +} + +// Defines a "io.k8s.api.core.v1.ResourceQuota" API object. +func NewKubeResourceQuota_Override(k KubeResourceQuota, scope constructs.Construct, id *string, props *KubeResourceQuotaProps) { + _init_.Initialize() + + _jsii_.Create( + "k8s.KubeResourceQuota", + []interface{}{scope, id, props}, + k, + ) +} + +// Checks if `x` is a construct. +// +// Use this method instead of `instanceof` to properly detect `Construct` +// instances, even when the construct library is symlinked. +// +// Explanation: in JavaScript, multiple copies of the `constructs` library on +// disk are seen as independent, completely different libraries. As a +// consequence, the class `Construct` in each copy of the `constructs` library +// is seen as a different class, and an instance of one class will not test as +// `instanceof` the other class. `npm install` will not create installations +// like this, but users may manually symlink construct libraries together or +// use a monorepo tool: in those cases, multiple copies of the `constructs` +// library can be accidentally installed, and `instanceof` will behave +// unpredictably. It is safest to avoid using `instanceof`, and using +// this type-testing method instead. +// +// Returns: true if `x` is an object created from a class which extends `Construct`. +func KubeResourceQuota_IsConstruct(x interface{}) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "k8s.KubeResourceQuota", + "isConstruct", + []interface{}{x}, + &returns, + ) + + return returns +} + +// Renders a Kubernetes manifest for "io.k8s.api.core.v1.ResourceQuota". +// +// This can be used to inline resource manifests inside other objects (e.g. as templates). +func KubeResourceQuota_Manifest(props *KubeResourceQuotaProps) interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "k8s.KubeResourceQuota", + "manifest", + []interface{}{props}, + &returns, + ) + + return returns +} + +// Returns the `ApiObject` named `Resource` which is a child of the given construct. +// +// If `c` is an `ApiObject`, it is returned directly. Throws an +// exception if the construct does not have a child named `Default` _or_ if +// this child is not an `ApiObject`. +func KubeResourceQuota_Of(c constructs.IConstruct) cdk8s.ApiObject { + _init_.Initialize() + + var returns cdk8s.ApiObject + + _jsii_.StaticInvoke( + "k8s.KubeResourceQuota", + "of", + []interface{}{c}, + &returns, + ) + + return returns +} + +func KubeResourceQuota_GVK() *cdk8s.GroupVersionKind { + _init_.Initialize() + var returns *cdk8s.GroupVersionKind + _jsii_.StaticGet( + "k8s.KubeResourceQuota", + "GVK", + &returns, + ) + return returns +} + +func (k *jsiiProxy_KubeResourceQuota) AddDependency(dependencies ...constructs.IConstruct) { + args := []interface{}{} + for _, a := range dependencies { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addDependency", + args, + ) +} + +func (k *jsiiProxy_KubeResourceQuota) AddJsonPatch(ops ...cdk8s.JsonPatch) { + args := []interface{}{} + for _, a := range ops { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addJsonPatch", + args, + ) +} + +func (k *jsiiProxy_KubeResourceQuota) ToJson() interface{} { + var returns interface{} + + _jsii_.Invoke( + k, + "toJson", + nil, // no parameters + &returns, + ) + + return returns +} + +func (k *jsiiProxy_KubeResourceQuota) ToString() *string { + var returns *string + + _jsii_.Invoke( + k, + "toString", + nil, // no parameters + &returns, + ) + + return returns +} + +// ResourceQuotaList is a list of ResourceQuota items. +type KubeResourceQuotaList interface { + cdk8s.ApiObject + // The group portion of the API version (e.g. `authorization.k8s.io`). + ApiGroup() *string + // The object's API version (e.g. `authorization.k8s.io/v1`). + ApiVersion() *string + // The chart in which this object is defined. + Chart() cdk8s.Chart + // The object kind. + Kind() *string + // Metadata associated with this API object. + Metadata() cdk8s.ApiObjectMetadataDefinition + // The name of the API object. + // + // If a name is specified in `metadata.name` this will be the name returned. + // Otherwise, a name will be generated by calling + // `AddHelm.of(this).generatedObjectName(this)`, which by default uses the + // construct path to generate a DNS-compatible name for the resource. + Name() *string + // The tree node. + Node() constructs.Node + // Create a dependency between this ApiObject and other constructs. + // + // These can be other ApiObjects, Charts, or custom. + AddDependency(dependencies ...constructs.IConstruct) + // Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. + // + // Example: + // kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true)); + // + AddJsonPatch(ops ...cdk8s.JsonPatch) + // Renders the object to Kubernetes JSON. + ToJson() interface{} + // Returns a string representation of this construct. + ToString() *string +} + +// The jsii proxy struct for KubeResourceQuotaList +type jsiiProxy_KubeResourceQuotaList struct { + internal.Type__cdk8sApiObject +} + +func (j *jsiiProxy_KubeResourceQuotaList) ApiGroup() *string { + var returns *string + _jsii_.Get( + j, + "apiGroup", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeResourceQuotaList) ApiVersion() *string { + var returns *string + _jsii_.Get( + j, + "apiVersion", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeResourceQuotaList) Chart() cdk8s.Chart { + var returns cdk8s.Chart + _jsii_.Get( + j, + "chart", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeResourceQuotaList) Kind() *string { + var returns *string + _jsii_.Get( + j, + "kind", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeResourceQuotaList) Metadata() cdk8s.ApiObjectMetadataDefinition { + var returns cdk8s.ApiObjectMetadataDefinition + _jsii_.Get( + j, + "metadata", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeResourceQuotaList) Name() *string { + var returns *string + _jsii_.Get( + j, + "name", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeResourceQuotaList) Node() constructs.Node { + var returns constructs.Node + _jsii_.Get( + j, + "node", + &returns, + ) + return returns +} + +// Defines a "io.k8s.api.core.v1.ResourceQuotaList" API object. +func NewKubeResourceQuotaList(scope constructs.Construct, id *string, props *KubeResourceQuotaListProps) KubeResourceQuotaList { + _init_.Initialize() + + j := jsiiProxy_KubeResourceQuotaList{} + + _jsii_.Create( + "k8s.KubeResourceQuotaList", + []interface{}{scope, id, props}, + &j, + ) + + return &j +} + +// Defines a "io.k8s.api.core.v1.ResourceQuotaList" API object. +func NewKubeResourceQuotaList_Override(k KubeResourceQuotaList, scope constructs.Construct, id *string, props *KubeResourceQuotaListProps) { + _init_.Initialize() + + _jsii_.Create( + "k8s.KubeResourceQuotaList", + []interface{}{scope, id, props}, + k, + ) +} + +// Checks if `x` is a construct. +// +// Use this method instead of `instanceof` to properly detect `Construct` +// instances, even when the construct library is symlinked. +// +// Explanation: in JavaScript, multiple copies of the `constructs` library on +// disk are seen as independent, completely different libraries. As a +// consequence, the class `Construct` in each copy of the `constructs` library +// is seen as a different class, and an instance of one class will not test as +// `instanceof` the other class. `npm install` will not create installations +// like this, but users may manually symlink construct libraries together or +// use a monorepo tool: in those cases, multiple copies of the `constructs` +// library can be accidentally installed, and `instanceof` will behave +// unpredictably. It is safest to avoid using `instanceof`, and using +// this type-testing method instead. +// +// Returns: true if `x` is an object created from a class which extends `Construct`. +func KubeResourceQuotaList_IsConstruct(x interface{}) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "k8s.KubeResourceQuotaList", + "isConstruct", + []interface{}{x}, + &returns, + ) + + return returns +} + +// Renders a Kubernetes manifest for "io.k8s.api.core.v1.ResourceQuotaList". +// +// This can be used to inline resource manifests inside other objects (e.g. as templates). +func KubeResourceQuotaList_Manifest(props *KubeResourceQuotaListProps) interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "k8s.KubeResourceQuotaList", + "manifest", + []interface{}{props}, + &returns, + ) + + return returns +} + +// Returns the `ApiObject` named `Resource` which is a child of the given construct. +// +// If `c` is an `ApiObject`, it is returned directly. Throws an +// exception if the construct does not have a child named `Default` _or_ if +// this child is not an `ApiObject`. +func KubeResourceQuotaList_Of(c constructs.IConstruct) cdk8s.ApiObject { + _init_.Initialize() + + var returns cdk8s.ApiObject + + _jsii_.StaticInvoke( + "k8s.KubeResourceQuotaList", + "of", + []interface{}{c}, + &returns, + ) + + return returns +} + +func KubeResourceQuotaList_GVK() *cdk8s.GroupVersionKind { + _init_.Initialize() + var returns *cdk8s.GroupVersionKind + _jsii_.StaticGet( + "k8s.KubeResourceQuotaList", + "GVK", + &returns, + ) + return returns +} + +func (k *jsiiProxy_KubeResourceQuotaList) AddDependency(dependencies ...constructs.IConstruct) { + args := []interface{}{} + for _, a := range dependencies { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addDependency", + args, + ) +} + +func (k *jsiiProxy_KubeResourceQuotaList) AddJsonPatch(ops ...cdk8s.JsonPatch) { + args := []interface{}{} + for _, a := range ops { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addJsonPatch", + args, + ) +} + +func (k *jsiiProxy_KubeResourceQuotaList) ToJson() interface{} { + var returns interface{} + + _jsii_.Invoke( + k, + "toJson", + nil, // no parameters + &returns, + ) + + return returns +} + +func (k *jsiiProxy_KubeResourceQuotaList) ToString() *string { + var returns *string + + _jsii_.Invoke( + k, + "toString", + nil, // no parameters + &returns, + ) + + return returns +} + +// ResourceQuotaList is a list of ResourceQuota items. +type KubeResourceQuotaListProps struct { + // Items is a list of ResourceQuota objects. + // + // More info: https://kubernetes.io/docs/concepts/policy/resource-quotas/ + Items *[]*KubeResourceQuotaProps `field:"required" json:"items" yaml:"items"` + // Standard list metadata. + // + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + Metadata *ListMeta `field:"optional" json:"metadata" yaml:"metadata"` +} + +// ResourceQuota sets aggregate quota restrictions enforced per namespace. +type KubeResourceQuotaProps struct { + // Standard object's metadata. + // + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + Metadata *ObjectMeta `field:"optional" json:"metadata" yaml:"metadata"` + // Spec defines the desired quota. + // + // https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + Spec *ResourceQuotaSpec `field:"optional" json:"spec" yaml:"spec"` +} + +// Role is a namespaced, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding. +type KubeRole interface { + cdk8s.ApiObject + // The group portion of the API version (e.g. `authorization.k8s.io`). + ApiGroup() *string + // The object's API version (e.g. `authorization.k8s.io/v1`). + ApiVersion() *string + // The chart in which this object is defined. + Chart() cdk8s.Chart + // The object kind. + Kind() *string + // Metadata associated with this API object. + Metadata() cdk8s.ApiObjectMetadataDefinition + // The name of the API object. + // + // If a name is specified in `metadata.name` this will be the name returned. + // Otherwise, a name will be generated by calling + // `AddHelm.of(this).generatedObjectName(this)`, which by default uses the + // construct path to generate a DNS-compatible name for the resource. + Name() *string + // The tree node. + Node() constructs.Node + // Create a dependency between this ApiObject and other constructs. + // + // These can be other ApiObjects, Charts, or custom. + AddDependency(dependencies ...constructs.IConstruct) + // Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. + // + // Example: + // kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true)); + // + AddJsonPatch(ops ...cdk8s.JsonPatch) + // Renders the object to Kubernetes JSON. + ToJson() interface{} + // Returns a string representation of this construct. + ToString() *string +} + +// The jsii proxy struct for KubeRole +type jsiiProxy_KubeRole struct { + internal.Type__cdk8sApiObject +} + +func (j *jsiiProxy_KubeRole) ApiGroup() *string { + var returns *string + _jsii_.Get( + j, + "apiGroup", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeRole) ApiVersion() *string { + var returns *string + _jsii_.Get( + j, + "apiVersion", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeRole) Chart() cdk8s.Chart { + var returns cdk8s.Chart + _jsii_.Get( + j, + "chart", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeRole) Kind() *string { + var returns *string + _jsii_.Get( + j, + "kind", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeRole) Metadata() cdk8s.ApiObjectMetadataDefinition { + var returns cdk8s.ApiObjectMetadataDefinition + _jsii_.Get( + j, + "metadata", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeRole) Name() *string { + var returns *string + _jsii_.Get( + j, + "name", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeRole) Node() constructs.Node { + var returns constructs.Node + _jsii_.Get( + j, + "node", + &returns, + ) + return returns +} + +// Defines a "io.k8s.api.rbac.v1.Role" API object. +func NewKubeRole(scope constructs.Construct, id *string, props *KubeRoleProps) KubeRole { + _init_.Initialize() + + j := jsiiProxy_KubeRole{} + + _jsii_.Create( + "k8s.KubeRole", + []interface{}{scope, id, props}, + &j, + ) + + return &j +} + +// Defines a "io.k8s.api.rbac.v1.Role" API object. +func NewKubeRole_Override(k KubeRole, scope constructs.Construct, id *string, props *KubeRoleProps) { + _init_.Initialize() + + _jsii_.Create( + "k8s.KubeRole", + []interface{}{scope, id, props}, + k, + ) +} + +// Checks if `x` is a construct. +// +// Use this method instead of `instanceof` to properly detect `Construct` +// instances, even when the construct library is symlinked. +// +// Explanation: in JavaScript, multiple copies of the `constructs` library on +// disk are seen as independent, completely different libraries. As a +// consequence, the class `Construct` in each copy of the `constructs` library +// is seen as a different class, and an instance of one class will not test as +// `instanceof` the other class. `npm install` will not create installations +// like this, but users may manually symlink construct libraries together or +// use a monorepo tool: in those cases, multiple copies of the `constructs` +// library can be accidentally installed, and `instanceof` will behave +// unpredictably. It is safest to avoid using `instanceof`, and using +// this type-testing method instead. +// +// Returns: true if `x` is an object created from a class which extends `Construct`. +func KubeRole_IsConstruct(x interface{}) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "k8s.KubeRole", + "isConstruct", + []interface{}{x}, + &returns, + ) + + return returns +} + +// Renders a Kubernetes manifest for "io.k8s.api.rbac.v1.Role". +// +// This can be used to inline resource manifests inside other objects (e.g. as templates). +func KubeRole_Manifest(props *KubeRoleProps) interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "k8s.KubeRole", + "manifest", + []interface{}{props}, + &returns, + ) + + return returns +} + +// Returns the `ApiObject` named `Resource` which is a child of the given construct. +// +// If `c` is an `ApiObject`, it is returned directly. Throws an +// exception if the construct does not have a child named `Default` _or_ if +// this child is not an `ApiObject`. +func KubeRole_Of(c constructs.IConstruct) cdk8s.ApiObject { + _init_.Initialize() + + var returns cdk8s.ApiObject + + _jsii_.StaticInvoke( + "k8s.KubeRole", + "of", + []interface{}{c}, + &returns, + ) + + return returns +} + +func KubeRole_GVK() *cdk8s.GroupVersionKind { + _init_.Initialize() + var returns *cdk8s.GroupVersionKind + _jsii_.StaticGet( + "k8s.KubeRole", + "GVK", + &returns, + ) + return returns +} + +func (k *jsiiProxy_KubeRole) AddDependency(dependencies ...constructs.IConstruct) { + args := []interface{}{} + for _, a := range dependencies { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addDependency", + args, + ) +} + +func (k *jsiiProxy_KubeRole) AddJsonPatch(ops ...cdk8s.JsonPatch) { + args := []interface{}{} + for _, a := range ops { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addJsonPatch", + args, + ) +} + +func (k *jsiiProxy_KubeRole) ToJson() interface{} { + var returns interface{} + + _jsii_.Invoke( + k, + "toJson", + nil, // no parameters + &returns, + ) + + return returns +} + +func (k *jsiiProxy_KubeRole) ToString() *string { + var returns *string + + _jsii_.Invoke( + k, + "toString", + nil, // no parameters + &returns, + ) + + return returns +} + +// RoleBinding references a role, but does not contain it. +// +// It can reference a Role in the same namespace or a ClusterRole in the global namespace. It adds who information via Subjects and namespace information by which namespace it exists in. RoleBindings in a given namespace only have effect in that namespace. +type KubeRoleBinding interface { + cdk8s.ApiObject + // The group portion of the API version (e.g. `authorization.k8s.io`). + ApiGroup() *string + // The object's API version (e.g. `authorization.k8s.io/v1`). + ApiVersion() *string + // The chart in which this object is defined. + Chart() cdk8s.Chart + // The object kind. + Kind() *string + // Metadata associated with this API object. + Metadata() cdk8s.ApiObjectMetadataDefinition + // The name of the API object. + // + // If a name is specified in `metadata.name` this will be the name returned. + // Otherwise, a name will be generated by calling + // `AddHelm.of(this).generatedObjectName(this)`, which by default uses the + // construct path to generate a DNS-compatible name for the resource. + Name() *string + // The tree node. + Node() constructs.Node + // Create a dependency between this ApiObject and other constructs. + // + // These can be other ApiObjects, Charts, or custom. + AddDependency(dependencies ...constructs.IConstruct) + // Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. + // + // Example: + // kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true)); + // + AddJsonPatch(ops ...cdk8s.JsonPatch) + // Renders the object to Kubernetes JSON. + ToJson() interface{} + // Returns a string representation of this construct. + ToString() *string +} + +// The jsii proxy struct for KubeRoleBinding +type jsiiProxy_KubeRoleBinding struct { + internal.Type__cdk8sApiObject +} + +func (j *jsiiProxy_KubeRoleBinding) ApiGroup() *string { + var returns *string + _jsii_.Get( + j, + "apiGroup", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeRoleBinding) ApiVersion() *string { + var returns *string + _jsii_.Get( + j, + "apiVersion", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeRoleBinding) Chart() cdk8s.Chart { + var returns cdk8s.Chart + _jsii_.Get( + j, + "chart", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeRoleBinding) Kind() *string { + var returns *string + _jsii_.Get( + j, + "kind", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeRoleBinding) Metadata() cdk8s.ApiObjectMetadataDefinition { + var returns cdk8s.ApiObjectMetadataDefinition + _jsii_.Get( + j, + "metadata", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeRoleBinding) Name() *string { + var returns *string + _jsii_.Get( + j, + "name", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeRoleBinding) Node() constructs.Node { + var returns constructs.Node + _jsii_.Get( + j, + "node", + &returns, + ) + return returns +} + +// Defines a "io.k8s.api.rbac.v1.RoleBinding" API object. +func NewKubeRoleBinding(scope constructs.Construct, id *string, props *KubeRoleBindingProps) KubeRoleBinding { + _init_.Initialize() + + j := jsiiProxy_KubeRoleBinding{} + + _jsii_.Create( + "k8s.KubeRoleBinding", + []interface{}{scope, id, props}, + &j, + ) + + return &j +} + +// Defines a "io.k8s.api.rbac.v1.RoleBinding" API object. +func NewKubeRoleBinding_Override(k KubeRoleBinding, scope constructs.Construct, id *string, props *KubeRoleBindingProps) { + _init_.Initialize() + + _jsii_.Create( + "k8s.KubeRoleBinding", + []interface{}{scope, id, props}, + k, + ) +} + +// Checks if `x` is a construct. +// +// Use this method instead of `instanceof` to properly detect `Construct` +// instances, even when the construct library is symlinked. +// +// Explanation: in JavaScript, multiple copies of the `constructs` library on +// disk are seen as independent, completely different libraries. As a +// consequence, the class `Construct` in each copy of the `constructs` library +// is seen as a different class, and an instance of one class will not test as +// `instanceof` the other class. `npm install` will not create installations +// like this, but users may manually symlink construct libraries together or +// use a monorepo tool: in those cases, multiple copies of the `constructs` +// library can be accidentally installed, and `instanceof` will behave +// unpredictably. It is safest to avoid using `instanceof`, and using +// this type-testing method instead. +// +// Returns: true if `x` is an object created from a class which extends `Construct`. +func KubeRoleBinding_IsConstruct(x interface{}) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "k8s.KubeRoleBinding", + "isConstruct", + []interface{}{x}, + &returns, + ) + + return returns +} + +// Renders a Kubernetes manifest for "io.k8s.api.rbac.v1.RoleBinding". +// +// This can be used to inline resource manifests inside other objects (e.g. as templates). +func KubeRoleBinding_Manifest(props *KubeRoleBindingProps) interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "k8s.KubeRoleBinding", + "manifest", + []interface{}{props}, + &returns, + ) + + return returns +} + +// Returns the `ApiObject` named `Resource` which is a child of the given construct. +// +// If `c` is an `ApiObject`, it is returned directly. Throws an +// exception if the construct does not have a child named `Default` _or_ if +// this child is not an `ApiObject`. +func KubeRoleBinding_Of(c constructs.IConstruct) cdk8s.ApiObject { + _init_.Initialize() + + var returns cdk8s.ApiObject + + _jsii_.StaticInvoke( + "k8s.KubeRoleBinding", + "of", + []interface{}{c}, + &returns, + ) + + return returns +} + +func KubeRoleBinding_GVK() *cdk8s.GroupVersionKind { + _init_.Initialize() + var returns *cdk8s.GroupVersionKind + _jsii_.StaticGet( + "k8s.KubeRoleBinding", + "GVK", + &returns, + ) + return returns +} + +func (k *jsiiProxy_KubeRoleBinding) AddDependency(dependencies ...constructs.IConstruct) { + args := []interface{}{} + for _, a := range dependencies { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addDependency", + args, + ) +} + +func (k *jsiiProxy_KubeRoleBinding) AddJsonPatch(ops ...cdk8s.JsonPatch) { + args := []interface{}{} + for _, a := range ops { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addJsonPatch", + args, + ) +} + +func (k *jsiiProxy_KubeRoleBinding) ToJson() interface{} { + var returns interface{} + + _jsii_.Invoke( + k, + "toJson", + nil, // no parameters + &returns, + ) + + return returns +} + +func (k *jsiiProxy_KubeRoleBinding) ToString() *string { + var returns *string + + _jsii_.Invoke( + k, + "toString", + nil, // no parameters + &returns, + ) + + return returns +} + +// RoleBindingList is a collection of RoleBindings. +type KubeRoleBindingList interface { + cdk8s.ApiObject + // The group portion of the API version (e.g. `authorization.k8s.io`). + ApiGroup() *string + // The object's API version (e.g. `authorization.k8s.io/v1`). + ApiVersion() *string + // The chart in which this object is defined. + Chart() cdk8s.Chart + // The object kind. + Kind() *string + // Metadata associated with this API object. + Metadata() cdk8s.ApiObjectMetadataDefinition + // The name of the API object. + // + // If a name is specified in `metadata.name` this will be the name returned. + // Otherwise, a name will be generated by calling + // `AddHelm.of(this).generatedObjectName(this)`, which by default uses the + // construct path to generate a DNS-compatible name for the resource. + Name() *string + // The tree node. + Node() constructs.Node + // Create a dependency between this ApiObject and other constructs. + // + // These can be other ApiObjects, Charts, or custom. + AddDependency(dependencies ...constructs.IConstruct) + // Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. + // + // Example: + // kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true)); + // + AddJsonPatch(ops ...cdk8s.JsonPatch) + // Renders the object to Kubernetes JSON. + ToJson() interface{} + // Returns a string representation of this construct. + ToString() *string +} + +// The jsii proxy struct for KubeRoleBindingList +type jsiiProxy_KubeRoleBindingList struct { + internal.Type__cdk8sApiObject +} + +func (j *jsiiProxy_KubeRoleBindingList) ApiGroup() *string { + var returns *string + _jsii_.Get( + j, + "apiGroup", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeRoleBindingList) ApiVersion() *string { + var returns *string + _jsii_.Get( + j, + "apiVersion", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeRoleBindingList) Chart() cdk8s.Chart { + var returns cdk8s.Chart + _jsii_.Get( + j, + "chart", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeRoleBindingList) Kind() *string { + var returns *string + _jsii_.Get( + j, + "kind", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeRoleBindingList) Metadata() cdk8s.ApiObjectMetadataDefinition { + var returns cdk8s.ApiObjectMetadataDefinition + _jsii_.Get( + j, + "metadata", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeRoleBindingList) Name() *string { + var returns *string + _jsii_.Get( + j, + "name", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeRoleBindingList) Node() constructs.Node { + var returns constructs.Node + _jsii_.Get( + j, + "node", + &returns, + ) + return returns +} + +// Defines a "io.k8s.api.rbac.v1.RoleBindingList" API object. +func NewKubeRoleBindingList(scope constructs.Construct, id *string, props *KubeRoleBindingListProps) KubeRoleBindingList { + _init_.Initialize() + + j := jsiiProxy_KubeRoleBindingList{} + + _jsii_.Create( + "k8s.KubeRoleBindingList", + []interface{}{scope, id, props}, + &j, + ) + + return &j +} + +// Defines a "io.k8s.api.rbac.v1.RoleBindingList" API object. +func NewKubeRoleBindingList_Override(k KubeRoleBindingList, scope constructs.Construct, id *string, props *KubeRoleBindingListProps) { + _init_.Initialize() + + _jsii_.Create( + "k8s.KubeRoleBindingList", + []interface{}{scope, id, props}, + k, + ) +} + +// Checks if `x` is a construct. +// +// Use this method instead of `instanceof` to properly detect `Construct` +// instances, even when the construct library is symlinked. +// +// Explanation: in JavaScript, multiple copies of the `constructs` library on +// disk are seen as independent, completely different libraries. As a +// consequence, the class `Construct` in each copy of the `constructs` library +// is seen as a different class, and an instance of one class will not test as +// `instanceof` the other class. `npm install` will not create installations +// like this, but users may manually symlink construct libraries together or +// use a monorepo tool: in those cases, multiple copies of the `constructs` +// library can be accidentally installed, and `instanceof` will behave +// unpredictably. It is safest to avoid using `instanceof`, and using +// this type-testing method instead. +// +// Returns: true if `x` is an object created from a class which extends `Construct`. +func KubeRoleBindingList_IsConstruct(x interface{}) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "k8s.KubeRoleBindingList", + "isConstruct", + []interface{}{x}, + &returns, + ) + + return returns +} + +// Renders a Kubernetes manifest for "io.k8s.api.rbac.v1.RoleBindingList". +// +// This can be used to inline resource manifests inside other objects (e.g. as templates). +func KubeRoleBindingList_Manifest(props *KubeRoleBindingListProps) interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "k8s.KubeRoleBindingList", + "manifest", + []interface{}{props}, + &returns, + ) + + return returns +} + +// Returns the `ApiObject` named `Resource` which is a child of the given construct. +// +// If `c` is an `ApiObject`, it is returned directly. Throws an +// exception if the construct does not have a child named `Default` _or_ if +// this child is not an `ApiObject`. +func KubeRoleBindingList_Of(c constructs.IConstruct) cdk8s.ApiObject { + _init_.Initialize() + + var returns cdk8s.ApiObject + + _jsii_.StaticInvoke( + "k8s.KubeRoleBindingList", + "of", + []interface{}{c}, + &returns, + ) + + return returns +} + +func KubeRoleBindingList_GVK() *cdk8s.GroupVersionKind { + _init_.Initialize() + var returns *cdk8s.GroupVersionKind + _jsii_.StaticGet( + "k8s.KubeRoleBindingList", + "GVK", + &returns, + ) + return returns +} + +func (k *jsiiProxy_KubeRoleBindingList) AddDependency(dependencies ...constructs.IConstruct) { + args := []interface{}{} + for _, a := range dependencies { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addDependency", + args, + ) +} + +func (k *jsiiProxy_KubeRoleBindingList) AddJsonPatch(ops ...cdk8s.JsonPatch) { + args := []interface{}{} + for _, a := range ops { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addJsonPatch", + args, + ) +} + +func (k *jsiiProxy_KubeRoleBindingList) ToJson() interface{} { + var returns interface{} + + _jsii_.Invoke( + k, + "toJson", + nil, // no parameters + &returns, + ) + + return returns +} + +func (k *jsiiProxy_KubeRoleBindingList) ToString() *string { + var returns *string + + _jsii_.Invoke( + k, + "toString", + nil, // no parameters + &returns, + ) + + return returns +} + +// RoleBindingList is a collection of RoleBindings. +type KubeRoleBindingListProps struct { + // Items is a list of RoleBindings. + Items *[]*KubeRoleBindingProps `field:"required" json:"items" yaml:"items"` + // Standard object's metadata. + Metadata *ListMeta `field:"optional" json:"metadata" yaml:"metadata"` +} + +// RoleBindingList is a collection of RoleBindings Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 RoleBindingList, and will no longer be served in v1.22. +type KubeRoleBindingListV1Alpha1 interface { + cdk8s.ApiObject + // The group portion of the API version (e.g. `authorization.k8s.io`). + ApiGroup() *string + // The object's API version (e.g. `authorization.k8s.io/v1`). + ApiVersion() *string + // The chart in which this object is defined. + Chart() cdk8s.Chart + // The object kind. + Kind() *string + // Metadata associated with this API object. + Metadata() cdk8s.ApiObjectMetadataDefinition + // The name of the API object. + // + // If a name is specified in `metadata.name` this will be the name returned. + // Otherwise, a name will be generated by calling + // `AddHelm.of(this).generatedObjectName(this)`, which by default uses the + // construct path to generate a DNS-compatible name for the resource. + Name() *string + // The tree node. + Node() constructs.Node + // Create a dependency between this ApiObject and other constructs. + // + // These can be other ApiObjects, Charts, or custom. + AddDependency(dependencies ...constructs.IConstruct) + // Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. + // + // Example: + // kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true)); + // + AddJsonPatch(ops ...cdk8s.JsonPatch) + // Renders the object to Kubernetes JSON. + ToJson() interface{} + // Returns a string representation of this construct. + ToString() *string +} + +// The jsii proxy struct for KubeRoleBindingListV1Alpha1 +type jsiiProxy_KubeRoleBindingListV1Alpha1 struct { + internal.Type__cdk8sApiObject +} + +func (j *jsiiProxy_KubeRoleBindingListV1Alpha1) ApiGroup() *string { + var returns *string + _jsii_.Get( + j, + "apiGroup", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeRoleBindingListV1Alpha1) ApiVersion() *string { + var returns *string + _jsii_.Get( + j, + "apiVersion", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeRoleBindingListV1Alpha1) Chart() cdk8s.Chart { + var returns cdk8s.Chart + _jsii_.Get( + j, + "chart", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeRoleBindingListV1Alpha1) Kind() *string { + var returns *string + _jsii_.Get( + j, + "kind", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeRoleBindingListV1Alpha1) Metadata() cdk8s.ApiObjectMetadataDefinition { + var returns cdk8s.ApiObjectMetadataDefinition + _jsii_.Get( + j, + "metadata", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeRoleBindingListV1Alpha1) Name() *string { + var returns *string + _jsii_.Get( + j, + "name", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeRoleBindingListV1Alpha1) Node() constructs.Node { + var returns constructs.Node + _jsii_.Get( + j, + "node", + &returns, + ) + return returns +} + +// Defines a "io.k8s.api.rbac.v1alpha1.RoleBindingList" API object. +func NewKubeRoleBindingListV1Alpha1(scope constructs.Construct, id *string, props *KubeRoleBindingListV1Alpha1Props) KubeRoleBindingListV1Alpha1 { + _init_.Initialize() + + j := jsiiProxy_KubeRoleBindingListV1Alpha1{} + + _jsii_.Create( + "k8s.KubeRoleBindingListV1Alpha1", + []interface{}{scope, id, props}, + &j, + ) + + return &j +} + +// Defines a "io.k8s.api.rbac.v1alpha1.RoleBindingList" API object. +func NewKubeRoleBindingListV1Alpha1_Override(k KubeRoleBindingListV1Alpha1, scope constructs.Construct, id *string, props *KubeRoleBindingListV1Alpha1Props) { + _init_.Initialize() + + _jsii_.Create( + "k8s.KubeRoleBindingListV1Alpha1", + []interface{}{scope, id, props}, + k, + ) +} + +// Checks if `x` is a construct. +// +// Use this method instead of `instanceof` to properly detect `Construct` +// instances, even when the construct library is symlinked. +// +// Explanation: in JavaScript, multiple copies of the `constructs` library on +// disk are seen as independent, completely different libraries. As a +// consequence, the class `Construct` in each copy of the `constructs` library +// is seen as a different class, and an instance of one class will not test as +// `instanceof` the other class. `npm install` will not create installations +// like this, but users may manually symlink construct libraries together or +// use a monorepo tool: in those cases, multiple copies of the `constructs` +// library can be accidentally installed, and `instanceof` will behave +// unpredictably. It is safest to avoid using `instanceof`, and using +// this type-testing method instead. +// +// Returns: true if `x` is an object created from a class which extends `Construct`. +func KubeRoleBindingListV1Alpha1_IsConstruct(x interface{}) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "k8s.KubeRoleBindingListV1Alpha1", + "isConstruct", + []interface{}{x}, + &returns, + ) + + return returns +} + +// Renders a Kubernetes manifest for "io.k8s.api.rbac.v1alpha1.RoleBindingList". +// +// This can be used to inline resource manifests inside other objects (e.g. as templates). +func KubeRoleBindingListV1Alpha1_Manifest(props *KubeRoleBindingListV1Alpha1Props) interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "k8s.KubeRoleBindingListV1Alpha1", + "manifest", + []interface{}{props}, + &returns, + ) + + return returns +} + +// Returns the `ApiObject` named `Resource` which is a child of the given construct. +// +// If `c` is an `ApiObject`, it is returned directly. Throws an +// exception if the construct does not have a child named `Default` _or_ if +// this child is not an `ApiObject`. +func KubeRoleBindingListV1Alpha1_Of(c constructs.IConstruct) cdk8s.ApiObject { + _init_.Initialize() + + var returns cdk8s.ApiObject + + _jsii_.StaticInvoke( + "k8s.KubeRoleBindingListV1Alpha1", + "of", + []interface{}{c}, + &returns, + ) + + return returns +} + +func KubeRoleBindingListV1Alpha1_GVK() *cdk8s.GroupVersionKind { + _init_.Initialize() + var returns *cdk8s.GroupVersionKind + _jsii_.StaticGet( + "k8s.KubeRoleBindingListV1Alpha1", + "GVK", + &returns, + ) + return returns +} + +func (k *jsiiProxy_KubeRoleBindingListV1Alpha1) AddDependency(dependencies ...constructs.IConstruct) { + args := []interface{}{} + for _, a := range dependencies { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addDependency", + args, + ) +} + +func (k *jsiiProxy_KubeRoleBindingListV1Alpha1) AddJsonPatch(ops ...cdk8s.JsonPatch) { + args := []interface{}{} + for _, a := range ops { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addJsonPatch", + args, + ) +} + +func (k *jsiiProxy_KubeRoleBindingListV1Alpha1) ToJson() interface{} { + var returns interface{} + + _jsii_.Invoke( + k, + "toJson", + nil, // no parameters + &returns, + ) + + return returns +} + +func (k *jsiiProxy_KubeRoleBindingListV1Alpha1) ToString() *string { + var returns *string + + _jsii_.Invoke( + k, + "toString", + nil, // no parameters + &returns, + ) + + return returns +} + +// RoleBindingList is a collection of RoleBindings Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 RoleBindingList, and will no longer be served in v1.22. +type KubeRoleBindingListV1Alpha1Props struct { + // Items is a list of RoleBindings. + Items *[]*KubeRoleBindingV1Alpha1Props `field:"required" json:"items" yaml:"items"` + // Standard object's metadata. + Metadata *ListMeta `field:"optional" json:"metadata" yaml:"metadata"` +} + +// RoleBinding references a role, but does not contain it. +// +// It can reference a Role in the same namespace or a ClusterRole in the global namespace. It adds who information via Subjects and namespace information by which namespace it exists in. RoleBindings in a given namespace only have effect in that namespace. +type KubeRoleBindingProps struct { + // RoleRef can reference a Role in the current namespace or a ClusterRole in the global namespace. + // + // If the RoleRef cannot be resolved, the Authorizer must return an error. + RoleRef *RoleRef `field:"required" json:"roleRef" yaml:"roleRef"` + // Standard object's metadata. + Metadata *ObjectMeta `field:"optional" json:"metadata" yaml:"metadata"` + // Subjects holds references to the objects the role applies to. + Subjects *[]*Subject `field:"optional" json:"subjects" yaml:"subjects"` +} + +// RoleBinding references a role, but does not contain it. +// +// It can reference a Role in the same namespace or a ClusterRole in the global namespace. It adds who information via Subjects and namespace information by which namespace it exists in. RoleBindings in a given namespace only have effect in that namespace. Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 RoleBinding, and will no longer be served in v1.22. +type KubeRoleBindingV1Alpha1 interface { + cdk8s.ApiObject + // The group portion of the API version (e.g. `authorization.k8s.io`). + ApiGroup() *string + // The object's API version (e.g. `authorization.k8s.io/v1`). + ApiVersion() *string + // The chart in which this object is defined. + Chart() cdk8s.Chart + // The object kind. + Kind() *string + // Metadata associated with this API object. + Metadata() cdk8s.ApiObjectMetadataDefinition + // The name of the API object. + // + // If a name is specified in `metadata.name` this will be the name returned. + // Otherwise, a name will be generated by calling + // `AddHelm.of(this).generatedObjectName(this)`, which by default uses the + // construct path to generate a DNS-compatible name for the resource. + Name() *string + // The tree node. + Node() constructs.Node + // Create a dependency between this ApiObject and other constructs. + // + // These can be other ApiObjects, Charts, or custom. + AddDependency(dependencies ...constructs.IConstruct) + // Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. + // + // Example: + // kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true)); + // + AddJsonPatch(ops ...cdk8s.JsonPatch) + // Renders the object to Kubernetes JSON. + ToJson() interface{} + // Returns a string representation of this construct. + ToString() *string +} + +// The jsii proxy struct for KubeRoleBindingV1Alpha1 +type jsiiProxy_KubeRoleBindingV1Alpha1 struct { + internal.Type__cdk8sApiObject +} + +func (j *jsiiProxy_KubeRoleBindingV1Alpha1) ApiGroup() *string { + var returns *string + _jsii_.Get( + j, + "apiGroup", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeRoleBindingV1Alpha1) ApiVersion() *string { + var returns *string + _jsii_.Get( + j, + "apiVersion", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeRoleBindingV1Alpha1) Chart() cdk8s.Chart { + var returns cdk8s.Chart + _jsii_.Get( + j, + "chart", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeRoleBindingV1Alpha1) Kind() *string { + var returns *string + _jsii_.Get( + j, + "kind", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeRoleBindingV1Alpha1) Metadata() cdk8s.ApiObjectMetadataDefinition { + var returns cdk8s.ApiObjectMetadataDefinition + _jsii_.Get( + j, + "metadata", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeRoleBindingV1Alpha1) Name() *string { + var returns *string + _jsii_.Get( + j, + "name", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeRoleBindingV1Alpha1) Node() constructs.Node { + var returns constructs.Node + _jsii_.Get( + j, + "node", + &returns, + ) + return returns +} + +// Defines a "io.k8s.api.rbac.v1alpha1.RoleBinding" API object. +func NewKubeRoleBindingV1Alpha1(scope constructs.Construct, id *string, props *KubeRoleBindingV1Alpha1Props) KubeRoleBindingV1Alpha1 { + _init_.Initialize() + + j := jsiiProxy_KubeRoleBindingV1Alpha1{} + + _jsii_.Create( + "k8s.KubeRoleBindingV1Alpha1", + []interface{}{scope, id, props}, + &j, + ) + + return &j +} + +// Defines a "io.k8s.api.rbac.v1alpha1.RoleBinding" API object. +func NewKubeRoleBindingV1Alpha1_Override(k KubeRoleBindingV1Alpha1, scope constructs.Construct, id *string, props *KubeRoleBindingV1Alpha1Props) { + _init_.Initialize() + + _jsii_.Create( + "k8s.KubeRoleBindingV1Alpha1", + []interface{}{scope, id, props}, + k, + ) +} + +// Checks if `x` is a construct. +// +// Use this method instead of `instanceof` to properly detect `Construct` +// instances, even when the construct library is symlinked. +// +// Explanation: in JavaScript, multiple copies of the `constructs` library on +// disk are seen as independent, completely different libraries. As a +// consequence, the class `Construct` in each copy of the `constructs` library +// is seen as a different class, and an instance of one class will not test as +// `instanceof` the other class. `npm install` will not create installations +// like this, but users may manually symlink construct libraries together or +// use a monorepo tool: in those cases, multiple copies of the `constructs` +// library can be accidentally installed, and `instanceof` will behave +// unpredictably. It is safest to avoid using `instanceof`, and using +// this type-testing method instead. +// +// Returns: true if `x` is an object created from a class which extends `Construct`. +func KubeRoleBindingV1Alpha1_IsConstruct(x interface{}) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "k8s.KubeRoleBindingV1Alpha1", + "isConstruct", + []interface{}{x}, + &returns, + ) + + return returns +} + +// Renders a Kubernetes manifest for "io.k8s.api.rbac.v1alpha1.RoleBinding". +// +// This can be used to inline resource manifests inside other objects (e.g. as templates). +func KubeRoleBindingV1Alpha1_Manifest(props *KubeRoleBindingV1Alpha1Props) interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "k8s.KubeRoleBindingV1Alpha1", + "manifest", + []interface{}{props}, + &returns, + ) + + return returns +} + +// Returns the `ApiObject` named `Resource` which is a child of the given construct. +// +// If `c` is an `ApiObject`, it is returned directly. Throws an +// exception if the construct does not have a child named `Default` _or_ if +// this child is not an `ApiObject`. +func KubeRoleBindingV1Alpha1_Of(c constructs.IConstruct) cdk8s.ApiObject { + _init_.Initialize() + + var returns cdk8s.ApiObject + + _jsii_.StaticInvoke( + "k8s.KubeRoleBindingV1Alpha1", + "of", + []interface{}{c}, + &returns, + ) + + return returns +} + +func KubeRoleBindingV1Alpha1_GVK() *cdk8s.GroupVersionKind { + _init_.Initialize() + var returns *cdk8s.GroupVersionKind + _jsii_.StaticGet( + "k8s.KubeRoleBindingV1Alpha1", + "GVK", + &returns, + ) + return returns +} + +func (k *jsiiProxy_KubeRoleBindingV1Alpha1) AddDependency(dependencies ...constructs.IConstruct) { + args := []interface{}{} + for _, a := range dependencies { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addDependency", + args, + ) +} + +func (k *jsiiProxy_KubeRoleBindingV1Alpha1) AddJsonPatch(ops ...cdk8s.JsonPatch) { + args := []interface{}{} + for _, a := range ops { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addJsonPatch", + args, + ) +} + +func (k *jsiiProxy_KubeRoleBindingV1Alpha1) ToJson() interface{} { + var returns interface{} + + _jsii_.Invoke( + k, + "toJson", + nil, // no parameters + &returns, + ) + + return returns +} + +func (k *jsiiProxy_KubeRoleBindingV1Alpha1) ToString() *string { + var returns *string + + _jsii_.Invoke( + k, + "toString", + nil, // no parameters + &returns, + ) + + return returns +} + +// RoleBinding references a role, but does not contain it. +// +// It can reference a Role in the same namespace or a ClusterRole in the global namespace. It adds who information via Subjects and namespace information by which namespace it exists in. RoleBindings in a given namespace only have effect in that namespace. Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 RoleBinding, and will no longer be served in v1.22. +type KubeRoleBindingV1Alpha1Props struct { + // RoleRef can reference a Role in the current namespace or a ClusterRole in the global namespace. + // + // If the RoleRef cannot be resolved, the Authorizer must return an error. + RoleRef *RoleRefV1Alpha1 `field:"required" json:"roleRef" yaml:"roleRef"` + // Standard object's metadata. + Metadata *ObjectMeta `field:"optional" json:"metadata" yaml:"metadata"` + // Subjects holds references to the objects the role applies to. + Subjects *[]*SubjectV1Alpha1 `field:"optional" json:"subjects" yaml:"subjects"` +} + +// RoleList is a collection of Roles. +type KubeRoleList interface { + cdk8s.ApiObject + // The group portion of the API version (e.g. `authorization.k8s.io`). + ApiGroup() *string + // The object's API version (e.g. `authorization.k8s.io/v1`). + ApiVersion() *string + // The chart in which this object is defined. + Chart() cdk8s.Chart + // The object kind. + Kind() *string + // Metadata associated with this API object. + Metadata() cdk8s.ApiObjectMetadataDefinition + // The name of the API object. + // + // If a name is specified in `metadata.name` this will be the name returned. + // Otherwise, a name will be generated by calling + // `AddHelm.of(this).generatedObjectName(this)`, which by default uses the + // construct path to generate a DNS-compatible name for the resource. + Name() *string + // The tree node. + Node() constructs.Node + // Create a dependency between this ApiObject and other constructs. + // + // These can be other ApiObjects, Charts, or custom. + AddDependency(dependencies ...constructs.IConstruct) + // Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. + // + // Example: + // kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true)); + // + AddJsonPatch(ops ...cdk8s.JsonPatch) + // Renders the object to Kubernetes JSON. + ToJson() interface{} + // Returns a string representation of this construct. + ToString() *string +} + +// The jsii proxy struct for KubeRoleList +type jsiiProxy_KubeRoleList struct { + internal.Type__cdk8sApiObject +} + +func (j *jsiiProxy_KubeRoleList) ApiGroup() *string { + var returns *string + _jsii_.Get( + j, + "apiGroup", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeRoleList) ApiVersion() *string { + var returns *string + _jsii_.Get( + j, + "apiVersion", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeRoleList) Chart() cdk8s.Chart { + var returns cdk8s.Chart + _jsii_.Get( + j, + "chart", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeRoleList) Kind() *string { + var returns *string + _jsii_.Get( + j, + "kind", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeRoleList) Metadata() cdk8s.ApiObjectMetadataDefinition { + var returns cdk8s.ApiObjectMetadataDefinition + _jsii_.Get( + j, + "metadata", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeRoleList) Name() *string { + var returns *string + _jsii_.Get( + j, + "name", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeRoleList) Node() constructs.Node { + var returns constructs.Node + _jsii_.Get( + j, + "node", + &returns, + ) + return returns +} + +// Defines a "io.k8s.api.rbac.v1.RoleList" API object. +func NewKubeRoleList(scope constructs.Construct, id *string, props *KubeRoleListProps) KubeRoleList { + _init_.Initialize() + + j := jsiiProxy_KubeRoleList{} + + _jsii_.Create( + "k8s.KubeRoleList", + []interface{}{scope, id, props}, + &j, + ) + + return &j +} + +// Defines a "io.k8s.api.rbac.v1.RoleList" API object. +func NewKubeRoleList_Override(k KubeRoleList, scope constructs.Construct, id *string, props *KubeRoleListProps) { + _init_.Initialize() + + _jsii_.Create( + "k8s.KubeRoleList", + []interface{}{scope, id, props}, + k, + ) +} + +// Checks if `x` is a construct. +// +// Use this method instead of `instanceof` to properly detect `Construct` +// instances, even when the construct library is symlinked. +// +// Explanation: in JavaScript, multiple copies of the `constructs` library on +// disk are seen as independent, completely different libraries. As a +// consequence, the class `Construct` in each copy of the `constructs` library +// is seen as a different class, and an instance of one class will not test as +// `instanceof` the other class. `npm install` will not create installations +// like this, but users may manually symlink construct libraries together or +// use a monorepo tool: in those cases, multiple copies of the `constructs` +// library can be accidentally installed, and `instanceof` will behave +// unpredictably. It is safest to avoid using `instanceof`, and using +// this type-testing method instead. +// +// Returns: true if `x` is an object created from a class which extends `Construct`. +func KubeRoleList_IsConstruct(x interface{}) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "k8s.KubeRoleList", + "isConstruct", + []interface{}{x}, + &returns, + ) + + return returns +} + +// Renders a Kubernetes manifest for "io.k8s.api.rbac.v1.RoleList". +// +// This can be used to inline resource manifests inside other objects (e.g. as templates). +func KubeRoleList_Manifest(props *KubeRoleListProps) interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "k8s.KubeRoleList", + "manifest", + []interface{}{props}, + &returns, + ) + + return returns +} + +// Returns the `ApiObject` named `Resource` which is a child of the given construct. +// +// If `c` is an `ApiObject`, it is returned directly. Throws an +// exception if the construct does not have a child named `Default` _or_ if +// this child is not an `ApiObject`. +func KubeRoleList_Of(c constructs.IConstruct) cdk8s.ApiObject { + _init_.Initialize() + + var returns cdk8s.ApiObject + + _jsii_.StaticInvoke( + "k8s.KubeRoleList", + "of", + []interface{}{c}, + &returns, + ) + + return returns +} + +func KubeRoleList_GVK() *cdk8s.GroupVersionKind { + _init_.Initialize() + var returns *cdk8s.GroupVersionKind + _jsii_.StaticGet( + "k8s.KubeRoleList", + "GVK", + &returns, + ) + return returns +} + +func (k *jsiiProxy_KubeRoleList) AddDependency(dependencies ...constructs.IConstruct) { + args := []interface{}{} + for _, a := range dependencies { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addDependency", + args, + ) +} + +func (k *jsiiProxy_KubeRoleList) AddJsonPatch(ops ...cdk8s.JsonPatch) { + args := []interface{}{} + for _, a := range ops { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addJsonPatch", + args, + ) +} + +func (k *jsiiProxy_KubeRoleList) ToJson() interface{} { + var returns interface{} + + _jsii_.Invoke( + k, + "toJson", + nil, // no parameters + &returns, + ) + + return returns +} + +func (k *jsiiProxy_KubeRoleList) ToString() *string { + var returns *string + + _jsii_.Invoke( + k, + "toString", + nil, // no parameters + &returns, + ) + + return returns +} + +// RoleList is a collection of Roles. +type KubeRoleListProps struct { + // Items is a list of Roles. + Items *[]*KubeRoleProps `field:"required" json:"items" yaml:"items"` + // Standard object's metadata. + Metadata *ListMeta `field:"optional" json:"metadata" yaml:"metadata"` +} + +// RoleList is a collection of Roles. +// +// Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 RoleList, and will no longer be served in v1.22. +type KubeRoleListV1Alpha1 interface { + cdk8s.ApiObject + // The group portion of the API version (e.g. `authorization.k8s.io`). + ApiGroup() *string + // The object's API version (e.g. `authorization.k8s.io/v1`). + ApiVersion() *string + // The chart in which this object is defined. + Chart() cdk8s.Chart + // The object kind. + Kind() *string + // Metadata associated with this API object. + Metadata() cdk8s.ApiObjectMetadataDefinition + // The name of the API object. + // + // If a name is specified in `metadata.name` this will be the name returned. + // Otherwise, a name will be generated by calling + // `AddHelm.of(this).generatedObjectName(this)`, which by default uses the + // construct path to generate a DNS-compatible name for the resource. + Name() *string + // The tree node. + Node() constructs.Node + // Create a dependency between this ApiObject and other constructs. + // + // These can be other ApiObjects, Charts, or custom. + AddDependency(dependencies ...constructs.IConstruct) + // Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. + // + // Example: + // kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true)); + // + AddJsonPatch(ops ...cdk8s.JsonPatch) + // Renders the object to Kubernetes JSON. + ToJson() interface{} + // Returns a string representation of this construct. + ToString() *string +} + +// The jsii proxy struct for KubeRoleListV1Alpha1 +type jsiiProxy_KubeRoleListV1Alpha1 struct { + internal.Type__cdk8sApiObject +} + +func (j *jsiiProxy_KubeRoleListV1Alpha1) ApiGroup() *string { + var returns *string + _jsii_.Get( + j, + "apiGroup", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeRoleListV1Alpha1) ApiVersion() *string { + var returns *string + _jsii_.Get( + j, + "apiVersion", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeRoleListV1Alpha1) Chart() cdk8s.Chart { + var returns cdk8s.Chart + _jsii_.Get( + j, + "chart", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeRoleListV1Alpha1) Kind() *string { + var returns *string + _jsii_.Get( + j, + "kind", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeRoleListV1Alpha1) Metadata() cdk8s.ApiObjectMetadataDefinition { + var returns cdk8s.ApiObjectMetadataDefinition + _jsii_.Get( + j, + "metadata", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeRoleListV1Alpha1) Name() *string { + var returns *string + _jsii_.Get( + j, + "name", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeRoleListV1Alpha1) Node() constructs.Node { + var returns constructs.Node + _jsii_.Get( + j, + "node", + &returns, + ) + return returns +} + +// Defines a "io.k8s.api.rbac.v1alpha1.RoleList" API object. +func NewKubeRoleListV1Alpha1(scope constructs.Construct, id *string, props *KubeRoleListV1Alpha1Props) KubeRoleListV1Alpha1 { + _init_.Initialize() + + j := jsiiProxy_KubeRoleListV1Alpha1{} + + _jsii_.Create( + "k8s.KubeRoleListV1Alpha1", + []interface{}{scope, id, props}, + &j, + ) + + return &j +} + +// Defines a "io.k8s.api.rbac.v1alpha1.RoleList" API object. +func NewKubeRoleListV1Alpha1_Override(k KubeRoleListV1Alpha1, scope constructs.Construct, id *string, props *KubeRoleListV1Alpha1Props) { + _init_.Initialize() + + _jsii_.Create( + "k8s.KubeRoleListV1Alpha1", + []interface{}{scope, id, props}, + k, + ) +} + +// Checks if `x` is a construct. +// +// Use this method instead of `instanceof` to properly detect `Construct` +// instances, even when the construct library is symlinked. +// +// Explanation: in JavaScript, multiple copies of the `constructs` library on +// disk are seen as independent, completely different libraries. As a +// consequence, the class `Construct` in each copy of the `constructs` library +// is seen as a different class, and an instance of one class will not test as +// `instanceof` the other class. `npm install` will not create installations +// like this, but users may manually symlink construct libraries together or +// use a monorepo tool: in those cases, multiple copies of the `constructs` +// library can be accidentally installed, and `instanceof` will behave +// unpredictably. It is safest to avoid using `instanceof`, and using +// this type-testing method instead. +// +// Returns: true if `x` is an object created from a class which extends `Construct`. +func KubeRoleListV1Alpha1_IsConstruct(x interface{}) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "k8s.KubeRoleListV1Alpha1", + "isConstruct", + []interface{}{x}, + &returns, + ) + + return returns +} + +// Renders a Kubernetes manifest for "io.k8s.api.rbac.v1alpha1.RoleList". +// +// This can be used to inline resource manifests inside other objects (e.g. as templates). +func KubeRoleListV1Alpha1_Manifest(props *KubeRoleListV1Alpha1Props) interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "k8s.KubeRoleListV1Alpha1", + "manifest", + []interface{}{props}, + &returns, + ) + + return returns +} + +// Returns the `ApiObject` named `Resource` which is a child of the given construct. +// +// If `c` is an `ApiObject`, it is returned directly. Throws an +// exception if the construct does not have a child named `Default` _or_ if +// this child is not an `ApiObject`. +func KubeRoleListV1Alpha1_Of(c constructs.IConstruct) cdk8s.ApiObject { + _init_.Initialize() + + var returns cdk8s.ApiObject + + _jsii_.StaticInvoke( + "k8s.KubeRoleListV1Alpha1", + "of", + []interface{}{c}, + &returns, + ) + + return returns +} + +func KubeRoleListV1Alpha1_GVK() *cdk8s.GroupVersionKind { + _init_.Initialize() + var returns *cdk8s.GroupVersionKind + _jsii_.StaticGet( + "k8s.KubeRoleListV1Alpha1", + "GVK", + &returns, + ) + return returns +} + +func (k *jsiiProxy_KubeRoleListV1Alpha1) AddDependency(dependencies ...constructs.IConstruct) { + args := []interface{}{} + for _, a := range dependencies { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addDependency", + args, + ) +} + +func (k *jsiiProxy_KubeRoleListV1Alpha1) AddJsonPatch(ops ...cdk8s.JsonPatch) { + args := []interface{}{} + for _, a := range ops { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addJsonPatch", + args, + ) +} + +func (k *jsiiProxy_KubeRoleListV1Alpha1) ToJson() interface{} { + var returns interface{} + + _jsii_.Invoke( + k, + "toJson", + nil, // no parameters + &returns, + ) + + return returns +} + +func (k *jsiiProxy_KubeRoleListV1Alpha1) ToString() *string { + var returns *string + + _jsii_.Invoke( + k, + "toString", + nil, // no parameters + &returns, + ) + + return returns +} + +// RoleList is a collection of Roles. +// +// Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 RoleList, and will no longer be served in v1.22. +type KubeRoleListV1Alpha1Props struct { + // Items is a list of Roles. + Items *[]*KubeRoleV1Alpha1Props `field:"required" json:"items" yaml:"items"` + // Standard object's metadata. + Metadata *ListMeta `field:"optional" json:"metadata" yaml:"metadata"` +} + +// Role is a namespaced, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding. +type KubeRoleProps struct { + // Standard object's metadata. + Metadata *ObjectMeta `field:"optional" json:"metadata" yaml:"metadata"` + // Rules holds all the PolicyRules for this Role. + Rules *[]*PolicyRule `field:"optional" json:"rules" yaml:"rules"` +} + +// Role is a namespaced, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding. +// +// Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 Role, and will no longer be served in v1.22. +type KubeRoleV1Alpha1 interface { + cdk8s.ApiObject + // The group portion of the API version (e.g. `authorization.k8s.io`). + ApiGroup() *string + // The object's API version (e.g. `authorization.k8s.io/v1`). + ApiVersion() *string + // The chart in which this object is defined. + Chart() cdk8s.Chart + // The object kind. + Kind() *string + // Metadata associated with this API object. + Metadata() cdk8s.ApiObjectMetadataDefinition + // The name of the API object. + // + // If a name is specified in `metadata.name` this will be the name returned. + // Otherwise, a name will be generated by calling + // `AddHelm.of(this).generatedObjectName(this)`, which by default uses the + // construct path to generate a DNS-compatible name for the resource. + Name() *string + // The tree node. + Node() constructs.Node + // Create a dependency between this ApiObject and other constructs. + // + // These can be other ApiObjects, Charts, or custom. + AddDependency(dependencies ...constructs.IConstruct) + // Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. + // + // Example: + // kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true)); + // + AddJsonPatch(ops ...cdk8s.JsonPatch) + // Renders the object to Kubernetes JSON. + ToJson() interface{} + // Returns a string representation of this construct. + ToString() *string +} + +// The jsii proxy struct for KubeRoleV1Alpha1 +type jsiiProxy_KubeRoleV1Alpha1 struct { + internal.Type__cdk8sApiObject +} + +func (j *jsiiProxy_KubeRoleV1Alpha1) ApiGroup() *string { + var returns *string + _jsii_.Get( + j, + "apiGroup", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeRoleV1Alpha1) ApiVersion() *string { + var returns *string + _jsii_.Get( + j, + "apiVersion", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeRoleV1Alpha1) Chart() cdk8s.Chart { + var returns cdk8s.Chart + _jsii_.Get( + j, + "chart", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeRoleV1Alpha1) Kind() *string { + var returns *string + _jsii_.Get( + j, + "kind", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeRoleV1Alpha1) Metadata() cdk8s.ApiObjectMetadataDefinition { + var returns cdk8s.ApiObjectMetadataDefinition + _jsii_.Get( + j, + "metadata", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeRoleV1Alpha1) Name() *string { + var returns *string + _jsii_.Get( + j, + "name", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeRoleV1Alpha1) Node() constructs.Node { + var returns constructs.Node + _jsii_.Get( + j, + "node", + &returns, + ) + return returns +} + +// Defines a "io.k8s.api.rbac.v1alpha1.Role" API object. +func NewKubeRoleV1Alpha1(scope constructs.Construct, id *string, props *KubeRoleV1Alpha1Props) KubeRoleV1Alpha1 { + _init_.Initialize() + + j := jsiiProxy_KubeRoleV1Alpha1{} + + _jsii_.Create( + "k8s.KubeRoleV1Alpha1", + []interface{}{scope, id, props}, + &j, + ) + + return &j +} + +// Defines a "io.k8s.api.rbac.v1alpha1.Role" API object. +func NewKubeRoleV1Alpha1_Override(k KubeRoleV1Alpha1, scope constructs.Construct, id *string, props *KubeRoleV1Alpha1Props) { + _init_.Initialize() + + _jsii_.Create( + "k8s.KubeRoleV1Alpha1", + []interface{}{scope, id, props}, + k, + ) +} + +// Checks if `x` is a construct. +// +// Use this method instead of `instanceof` to properly detect `Construct` +// instances, even when the construct library is symlinked. +// +// Explanation: in JavaScript, multiple copies of the `constructs` library on +// disk are seen as independent, completely different libraries. As a +// consequence, the class `Construct` in each copy of the `constructs` library +// is seen as a different class, and an instance of one class will not test as +// `instanceof` the other class. `npm install` will not create installations +// like this, but users may manually symlink construct libraries together or +// use a monorepo tool: in those cases, multiple copies of the `constructs` +// library can be accidentally installed, and `instanceof` will behave +// unpredictably. It is safest to avoid using `instanceof`, and using +// this type-testing method instead. +// +// Returns: true if `x` is an object created from a class which extends `Construct`. +func KubeRoleV1Alpha1_IsConstruct(x interface{}) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "k8s.KubeRoleV1Alpha1", + "isConstruct", + []interface{}{x}, + &returns, + ) + + return returns +} + +// Renders a Kubernetes manifest for "io.k8s.api.rbac.v1alpha1.Role". +// +// This can be used to inline resource manifests inside other objects (e.g. as templates). +func KubeRoleV1Alpha1_Manifest(props *KubeRoleV1Alpha1Props) interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "k8s.KubeRoleV1Alpha1", + "manifest", + []interface{}{props}, + &returns, + ) + + return returns +} + +// Returns the `ApiObject` named `Resource` which is a child of the given construct. +// +// If `c` is an `ApiObject`, it is returned directly. Throws an +// exception if the construct does not have a child named `Default` _or_ if +// this child is not an `ApiObject`. +func KubeRoleV1Alpha1_Of(c constructs.IConstruct) cdk8s.ApiObject { + _init_.Initialize() + + var returns cdk8s.ApiObject + + _jsii_.StaticInvoke( + "k8s.KubeRoleV1Alpha1", + "of", + []interface{}{c}, + &returns, + ) + + return returns +} + +func KubeRoleV1Alpha1_GVK() *cdk8s.GroupVersionKind { + _init_.Initialize() + var returns *cdk8s.GroupVersionKind + _jsii_.StaticGet( + "k8s.KubeRoleV1Alpha1", + "GVK", + &returns, + ) + return returns +} + +func (k *jsiiProxy_KubeRoleV1Alpha1) AddDependency(dependencies ...constructs.IConstruct) { + args := []interface{}{} + for _, a := range dependencies { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addDependency", + args, + ) +} + +func (k *jsiiProxy_KubeRoleV1Alpha1) AddJsonPatch(ops ...cdk8s.JsonPatch) { + args := []interface{}{} + for _, a := range ops { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addJsonPatch", + args, + ) +} + +func (k *jsiiProxy_KubeRoleV1Alpha1) ToJson() interface{} { + var returns interface{} + + _jsii_.Invoke( + k, + "toJson", + nil, // no parameters + &returns, + ) + + return returns +} + +func (k *jsiiProxy_KubeRoleV1Alpha1) ToString() *string { + var returns *string + + _jsii_.Invoke( + k, + "toString", + nil, // no parameters + &returns, + ) + + return returns +} + +// Role is a namespaced, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding. +// +// Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 Role, and will no longer be served in v1.22. +type KubeRoleV1Alpha1Props struct { + // Standard object's metadata. + Metadata *ObjectMeta `field:"optional" json:"metadata" yaml:"metadata"` + // Rules holds all the PolicyRules for this Role. + Rules *[]*PolicyRuleV1Alpha1 `field:"optional" json:"rules" yaml:"rules"` +} + +// RuntimeClass defines a class of container runtime supported in the cluster. +// +// The RuntimeClass is used to determine which container runtime is used to run all containers in a pod. RuntimeClasses are manually defined by a user or cluster provisioner, and referenced in the PodSpec. The Kubelet is responsible for resolving the RuntimeClassName reference before running the pod. For more details, see https://kubernetes.io/docs/concepts/containers/runtime-class/ +type KubeRuntimeClass interface { + cdk8s.ApiObject + // The group portion of the API version (e.g. `authorization.k8s.io`). + ApiGroup() *string + // The object's API version (e.g. `authorization.k8s.io/v1`). + ApiVersion() *string + // The chart in which this object is defined. + Chart() cdk8s.Chart + // The object kind. + Kind() *string + // Metadata associated with this API object. + Metadata() cdk8s.ApiObjectMetadataDefinition + // The name of the API object. + // + // If a name is specified in `metadata.name` this will be the name returned. + // Otherwise, a name will be generated by calling + // `AddHelm.of(this).generatedObjectName(this)`, which by default uses the + // construct path to generate a DNS-compatible name for the resource. + Name() *string + // The tree node. + Node() constructs.Node + // Create a dependency between this ApiObject and other constructs. + // + // These can be other ApiObjects, Charts, or custom. + AddDependency(dependencies ...constructs.IConstruct) + // Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. + // + // Example: + // kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true)); + // + AddJsonPatch(ops ...cdk8s.JsonPatch) + // Renders the object to Kubernetes JSON. + ToJson() interface{} + // Returns a string representation of this construct. + ToString() *string +} + +// The jsii proxy struct for KubeRuntimeClass +type jsiiProxy_KubeRuntimeClass struct { + internal.Type__cdk8sApiObject +} + +func (j *jsiiProxy_KubeRuntimeClass) ApiGroup() *string { + var returns *string + _jsii_.Get( + j, + "apiGroup", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeRuntimeClass) ApiVersion() *string { + var returns *string + _jsii_.Get( + j, + "apiVersion", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeRuntimeClass) Chart() cdk8s.Chart { + var returns cdk8s.Chart + _jsii_.Get( + j, + "chart", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeRuntimeClass) Kind() *string { + var returns *string + _jsii_.Get( + j, + "kind", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeRuntimeClass) Metadata() cdk8s.ApiObjectMetadataDefinition { + var returns cdk8s.ApiObjectMetadataDefinition + _jsii_.Get( + j, + "metadata", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeRuntimeClass) Name() *string { + var returns *string + _jsii_.Get( + j, + "name", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeRuntimeClass) Node() constructs.Node { + var returns constructs.Node + _jsii_.Get( + j, + "node", + &returns, + ) + return returns +} + +// Defines a "io.k8s.api.node.v1.RuntimeClass" API object. +func NewKubeRuntimeClass(scope constructs.Construct, id *string, props *KubeRuntimeClassProps) KubeRuntimeClass { + _init_.Initialize() + + j := jsiiProxy_KubeRuntimeClass{} + + _jsii_.Create( + "k8s.KubeRuntimeClass", + []interface{}{scope, id, props}, + &j, + ) + + return &j +} + +// Defines a "io.k8s.api.node.v1.RuntimeClass" API object. +func NewKubeRuntimeClass_Override(k KubeRuntimeClass, scope constructs.Construct, id *string, props *KubeRuntimeClassProps) { + _init_.Initialize() + + _jsii_.Create( + "k8s.KubeRuntimeClass", + []interface{}{scope, id, props}, + k, + ) +} + +// Checks if `x` is a construct. +// +// Use this method instead of `instanceof` to properly detect `Construct` +// instances, even when the construct library is symlinked. +// +// Explanation: in JavaScript, multiple copies of the `constructs` library on +// disk are seen as independent, completely different libraries. As a +// consequence, the class `Construct` in each copy of the `constructs` library +// is seen as a different class, and an instance of one class will not test as +// `instanceof` the other class. `npm install` will not create installations +// like this, but users may manually symlink construct libraries together or +// use a monorepo tool: in those cases, multiple copies of the `constructs` +// library can be accidentally installed, and `instanceof` will behave +// unpredictably. It is safest to avoid using `instanceof`, and using +// this type-testing method instead. +// +// Returns: true if `x` is an object created from a class which extends `Construct`. +func KubeRuntimeClass_IsConstruct(x interface{}) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "k8s.KubeRuntimeClass", + "isConstruct", + []interface{}{x}, + &returns, + ) + + return returns +} + +// Renders a Kubernetes manifest for "io.k8s.api.node.v1.RuntimeClass". +// +// This can be used to inline resource manifests inside other objects (e.g. as templates). +func KubeRuntimeClass_Manifest(props *KubeRuntimeClassProps) interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "k8s.KubeRuntimeClass", + "manifest", + []interface{}{props}, + &returns, + ) + + return returns +} + +// Returns the `ApiObject` named `Resource` which is a child of the given construct. +// +// If `c` is an `ApiObject`, it is returned directly. Throws an +// exception if the construct does not have a child named `Default` _or_ if +// this child is not an `ApiObject`. +func KubeRuntimeClass_Of(c constructs.IConstruct) cdk8s.ApiObject { + _init_.Initialize() + + var returns cdk8s.ApiObject + + _jsii_.StaticInvoke( + "k8s.KubeRuntimeClass", + "of", + []interface{}{c}, + &returns, + ) + + return returns +} + +func KubeRuntimeClass_GVK() *cdk8s.GroupVersionKind { + _init_.Initialize() + var returns *cdk8s.GroupVersionKind + _jsii_.StaticGet( + "k8s.KubeRuntimeClass", + "GVK", + &returns, + ) + return returns +} + +func (k *jsiiProxy_KubeRuntimeClass) AddDependency(dependencies ...constructs.IConstruct) { + args := []interface{}{} + for _, a := range dependencies { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addDependency", + args, + ) +} + +func (k *jsiiProxy_KubeRuntimeClass) AddJsonPatch(ops ...cdk8s.JsonPatch) { + args := []interface{}{} + for _, a := range ops { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addJsonPatch", + args, + ) +} + +func (k *jsiiProxy_KubeRuntimeClass) ToJson() interface{} { + var returns interface{} + + _jsii_.Invoke( + k, + "toJson", + nil, // no parameters + &returns, + ) + + return returns +} + +func (k *jsiiProxy_KubeRuntimeClass) ToString() *string { + var returns *string + + _jsii_.Invoke( + k, + "toString", + nil, // no parameters + &returns, + ) + + return returns +} + +// RuntimeClassList is a list of RuntimeClass objects. +type KubeRuntimeClassList interface { + cdk8s.ApiObject + // The group portion of the API version (e.g. `authorization.k8s.io`). + ApiGroup() *string + // The object's API version (e.g. `authorization.k8s.io/v1`). + ApiVersion() *string + // The chart in which this object is defined. + Chart() cdk8s.Chart + // The object kind. + Kind() *string + // Metadata associated with this API object. + Metadata() cdk8s.ApiObjectMetadataDefinition + // The name of the API object. + // + // If a name is specified in `metadata.name` this will be the name returned. + // Otherwise, a name will be generated by calling + // `AddHelm.of(this).generatedObjectName(this)`, which by default uses the + // construct path to generate a DNS-compatible name for the resource. + Name() *string + // The tree node. + Node() constructs.Node + // Create a dependency between this ApiObject and other constructs. + // + // These can be other ApiObjects, Charts, or custom. + AddDependency(dependencies ...constructs.IConstruct) + // Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. + // + // Example: + // kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true)); + // + AddJsonPatch(ops ...cdk8s.JsonPatch) + // Renders the object to Kubernetes JSON. + ToJson() interface{} + // Returns a string representation of this construct. + ToString() *string +} + +// The jsii proxy struct for KubeRuntimeClassList +type jsiiProxy_KubeRuntimeClassList struct { + internal.Type__cdk8sApiObject +} + +func (j *jsiiProxy_KubeRuntimeClassList) ApiGroup() *string { + var returns *string + _jsii_.Get( + j, + "apiGroup", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeRuntimeClassList) ApiVersion() *string { + var returns *string + _jsii_.Get( + j, + "apiVersion", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeRuntimeClassList) Chart() cdk8s.Chart { + var returns cdk8s.Chart + _jsii_.Get( + j, + "chart", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeRuntimeClassList) Kind() *string { + var returns *string + _jsii_.Get( + j, + "kind", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeRuntimeClassList) Metadata() cdk8s.ApiObjectMetadataDefinition { + var returns cdk8s.ApiObjectMetadataDefinition + _jsii_.Get( + j, + "metadata", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeRuntimeClassList) Name() *string { + var returns *string + _jsii_.Get( + j, + "name", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeRuntimeClassList) Node() constructs.Node { + var returns constructs.Node + _jsii_.Get( + j, + "node", + &returns, + ) + return returns +} + +// Defines a "io.k8s.api.node.v1.RuntimeClassList" API object. +func NewKubeRuntimeClassList(scope constructs.Construct, id *string, props *KubeRuntimeClassListProps) KubeRuntimeClassList { + _init_.Initialize() + + j := jsiiProxy_KubeRuntimeClassList{} + + _jsii_.Create( + "k8s.KubeRuntimeClassList", + []interface{}{scope, id, props}, + &j, + ) + + return &j +} + +// Defines a "io.k8s.api.node.v1.RuntimeClassList" API object. +func NewKubeRuntimeClassList_Override(k KubeRuntimeClassList, scope constructs.Construct, id *string, props *KubeRuntimeClassListProps) { + _init_.Initialize() + + _jsii_.Create( + "k8s.KubeRuntimeClassList", + []interface{}{scope, id, props}, + k, + ) +} + +// Checks if `x` is a construct. +// +// Use this method instead of `instanceof` to properly detect `Construct` +// instances, even when the construct library is symlinked. +// +// Explanation: in JavaScript, multiple copies of the `constructs` library on +// disk are seen as independent, completely different libraries. As a +// consequence, the class `Construct` in each copy of the `constructs` library +// is seen as a different class, and an instance of one class will not test as +// `instanceof` the other class. `npm install` will not create installations +// like this, but users may manually symlink construct libraries together or +// use a monorepo tool: in those cases, multiple copies of the `constructs` +// library can be accidentally installed, and `instanceof` will behave +// unpredictably. It is safest to avoid using `instanceof`, and using +// this type-testing method instead. +// +// Returns: true if `x` is an object created from a class which extends `Construct`. +func KubeRuntimeClassList_IsConstruct(x interface{}) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "k8s.KubeRuntimeClassList", + "isConstruct", + []interface{}{x}, + &returns, + ) + + return returns +} + +// Renders a Kubernetes manifest for "io.k8s.api.node.v1.RuntimeClassList". +// +// This can be used to inline resource manifests inside other objects (e.g. as templates). +func KubeRuntimeClassList_Manifest(props *KubeRuntimeClassListProps) interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "k8s.KubeRuntimeClassList", + "manifest", + []interface{}{props}, + &returns, + ) + + return returns +} + +// Returns the `ApiObject` named `Resource` which is a child of the given construct. +// +// If `c` is an `ApiObject`, it is returned directly. Throws an +// exception if the construct does not have a child named `Default` _or_ if +// this child is not an `ApiObject`. +func KubeRuntimeClassList_Of(c constructs.IConstruct) cdk8s.ApiObject { + _init_.Initialize() + + var returns cdk8s.ApiObject + + _jsii_.StaticInvoke( + "k8s.KubeRuntimeClassList", + "of", + []interface{}{c}, + &returns, + ) + + return returns +} + +func KubeRuntimeClassList_GVK() *cdk8s.GroupVersionKind { + _init_.Initialize() + var returns *cdk8s.GroupVersionKind + _jsii_.StaticGet( + "k8s.KubeRuntimeClassList", + "GVK", + &returns, + ) + return returns +} + +func (k *jsiiProxy_KubeRuntimeClassList) AddDependency(dependencies ...constructs.IConstruct) { + args := []interface{}{} + for _, a := range dependencies { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addDependency", + args, + ) +} + +func (k *jsiiProxy_KubeRuntimeClassList) AddJsonPatch(ops ...cdk8s.JsonPatch) { + args := []interface{}{} + for _, a := range ops { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addJsonPatch", + args, + ) +} + +func (k *jsiiProxy_KubeRuntimeClassList) ToJson() interface{} { + var returns interface{} + + _jsii_.Invoke( + k, + "toJson", + nil, // no parameters + &returns, + ) + + return returns +} + +func (k *jsiiProxy_KubeRuntimeClassList) ToString() *string { + var returns *string + + _jsii_.Invoke( + k, + "toString", + nil, // no parameters + &returns, + ) + + return returns +} + +// RuntimeClassList is a list of RuntimeClass objects. +type KubeRuntimeClassListProps struct { + // Items is a list of schema objects. + Items *[]*KubeRuntimeClassProps `field:"required" json:"items" yaml:"items"` + // Standard list metadata. + // + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + Metadata *ListMeta `field:"optional" json:"metadata" yaml:"metadata"` +} + +// RuntimeClassList is a list of RuntimeClass objects. +type KubeRuntimeClassListV1Alpha1 interface { + cdk8s.ApiObject + // The group portion of the API version (e.g. `authorization.k8s.io`). + ApiGroup() *string + // The object's API version (e.g. `authorization.k8s.io/v1`). + ApiVersion() *string + // The chart in which this object is defined. + Chart() cdk8s.Chart + // The object kind. + Kind() *string + // Metadata associated with this API object. + Metadata() cdk8s.ApiObjectMetadataDefinition + // The name of the API object. + // + // If a name is specified in `metadata.name` this will be the name returned. + // Otherwise, a name will be generated by calling + // `AddHelm.of(this).generatedObjectName(this)`, which by default uses the + // construct path to generate a DNS-compatible name for the resource. + Name() *string + // The tree node. + Node() constructs.Node + // Create a dependency between this ApiObject and other constructs. + // + // These can be other ApiObjects, Charts, or custom. + AddDependency(dependencies ...constructs.IConstruct) + // Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. + // + // Example: + // kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true)); + // + AddJsonPatch(ops ...cdk8s.JsonPatch) + // Renders the object to Kubernetes JSON. + ToJson() interface{} + // Returns a string representation of this construct. + ToString() *string +} + +// The jsii proxy struct for KubeRuntimeClassListV1Alpha1 +type jsiiProxy_KubeRuntimeClassListV1Alpha1 struct { + internal.Type__cdk8sApiObject +} + +func (j *jsiiProxy_KubeRuntimeClassListV1Alpha1) ApiGroup() *string { + var returns *string + _jsii_.Get( + j, + "apiGroup", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeRuntimeClassListV1Alpha1) ApiVersion() *string { + var returns *string + _jsii_.Get( + j, + "apiVersion", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeRuntimeClassListV1Alpha1) Chart() cdk8s.Chart { + var returns cdk8s.Chart + _jsii_.Get( + j, + "chart", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeRuntimeClassListV1Alpha1) Kind() *string { + var returns *string + _jsii_.Get( + j, + "kind", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeRuntimeClassListV1Alpha1) Metadata() cdk8s.ApiObjectMetadataDefinition { + var returns cdk8s.ApiObjectMetadataDefinition + _jsii_.Get( + j, + "metadata", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeRuntimeClassListV1Alpha1) Name() *string { + var returns *string + _jsii_.Get( + j, + "name", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeRuntimeClassListV1Alpha1) Node() constructs.Node { + var returns constructs.Node + _jsii_.Get( + j, + "node", + &returns, + ) + return returns +} + +// Defines a "io.k8s.api.node.v1alpha1.RuntimeClassList" API object. +func NewKubeRuntimeClassListV1Alpha1(scope constructs.Construct, id *string, props *KubeRuntimeClassListV1Alpha1Props) KubeRuntimeClassListV1Alpha1 { + _init_.Initialize() + + j := jsiiProxy_KubeRuntimeClassListV1Alpha1{} + + _jsii_.Create( + "k8s.KubeRuntimeClassListV1Alpha1", + []interface{}{scope, id, props}, + &j, + ) + + return &j +} + +// Defines a "io.k8s.api.node.v1alpha1.RuntimeClassList" API object. +func NewKubeRuntimeClassListV1Alpha1_Override(k KubeRuntimeClassListV1Alpha1, scope constructs.Construct, id *string, props *KubeRuntimeClassListV1Alpha1Props) { + _init_.Initialize() + + _jsii_.Create( + "k8s.KubeRuntimeClassListV1Alpha1", + []interface{}{scope, id, props}, + k, + ) +} + +// Checks if `x` is a construct. +// +// Use this method instead of `instanceof` to properly detect `Construct` +// instances, even when the construct library is symlinked. +// +// Explanation: in JavaScript, multiple copies of the `constructs` library on +// disk are seen as independent, completely different libraries. As a +// consequence, the class `Construct` in each copy of the `constructs` library +// is seen as a different class, and an instance of one class will not test as +// `instanceof` the other class. `npm install` will not create installations +// like this, but users may manually symlink construct libraries together or +// use a monorepo tool: in those cases, multiple copies of the `constructs` +// library can be accidentally installed, and `instanceof` will behave +// unpredictably. It is safest to avoid using `instanceof`, and using +// this type-testing method instead. +// +// Returns: true if `x` is an object created from a class which extends `Construct`. +func KubeRuntimeClassListV1Alpha1_IsConstruct(x interface{}) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "k8s.KubeRuntimeClassListV1Alpha1", + "isConstruct", + []interface{}{x}, + &returns, + ) + + return returns +} + +// Renders a Kubernetes manifest for "io.k8s.api.node.v1alpha1.RuntimeClassList". +// +// This can be used to inline resource manifests inside other objects (e.g. as templates). +func KubeRuntimeClassListV1Alpha1_Manifest(props *KubeRuntimeClassListV1Alpha1Props) interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "k8s.KubeRuntimeClassListV1Alpha1", + "manifest", + []interface{}{props}, + &returns, + ) + + return returns +} + +// Returns the `ApiObject` named `Resource` which is a child of the given construct. +// +// If `c` is an `ApiObject`, it is returned directly. Throws an +// exception if the construct does not have a child named `Default` _or_ if +// this child is not an `ApiObject`. +func KubeRuntimeClassListV1Alpha1_Of(c constructs.IConstruct) cdk8s.ApiObject { + _init_.Initialize() + + var returns cdk8s.ApiObject + + _jsii_.StaticInvoke( + "k8s.KubeRuntimeClassListV1Alpha1", + "of", + []interface{}{c}, + &returns, + ) + + return returns +} + +func KubeRuntimeClassListV1Alpha1_GVK() *cdk8s.GroupVersionKind { + _init_.Initialize() + var returns *cdk8s.GroupVersionKind + _jsii_.StaticGet( + "k8s.KubeRuntimeClassListV1Alpha1", + "GVK", + &returns, + ) + return returns +} + +func (k *jsiiProxy_KubeRuntimeClassListV1Alpha1) AddDependency(dependencies ...constructs.IConstruct) { + args := []interface{}{} + for _, a := range dependencies { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addDependency", + args, + ) +} + +func (k *jsiiProxy_KubeRuntimeClassListV1Alpha1) AddJsonPatch(ops ...cdk8s.JsonPatch) { + args := []interface{}{} + for _, a := range ops { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addJsonPatch", + args, + ) +} + +func (k *jsiiProxy_KubeRuntimeClassListV1Alpha1) ToJson() interface{} { + var returns interface{} + + _jsii_.Invoke( + k, + "toJson", + nil, // no parameters + &returns, + ) + + return returns +} + +func (k *jsiiProxy_KubeRuntimeClassListV1Alpha1) ToString() *string { + var returns *string + + _jsii_.Invoke( + k, + "toString", + nil, // no parameters + &returns, + ) + + return returns +} + +// RuntimeClassList is a list of RuntimeClass objects. +type KubeRuntimeClassListV1Alpha1Props struct { + // Items is a list of schema objects. + Items *[]*KubeRuntimeClassV1Alpha1Props `field:"required" json:"items" yaml:"items"` + // Standard list metadata. + // + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + Metadata *ListMeta `field:"optional" json:"metadata" yaml:"metadata"` +} + +// RuntimeClassList is a list of RuntimeClass objects. +type KubeRuntimeClassListV1Beta1 interface { + cdk8s.ApiObject + // The group portion of the API version (e.g. `authorization.k8s.io`). + ApiGroup() *string + // The object's API version (e.g. `authorization.k8s.io/v1`). + ApiVersion() *string + // The chart in which this object is defined. + Chart() cdk8s.Chart + // The object kind. + Kind() *string + // Metadata associated with this API object. + Metadata() cdk8s.ApiObjectMetadataDefinition + // The name of the API object. + // + // If a name is specified in `metadata.name` this will be the name returned. + // Otherwise, a name will be generated by calling + // `AddHelm.of(this).generatedObjectName(this)`, which by default uses the + // construct path to generate a DNS-compatible name for the resource. + Name() *string + // The tree node. + Node() constructs.Node + // Create a dependency between this ApiObject and other constructs. + // + // These can be other ApiObjects, Charts, or custom. + AddDependency(dependencies ...constructs.IConstruct) + // Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. + // + // Example: + // kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true)); + // + AddJsonPatch(ops ...cdk8s.JsonPatch) + // Renders the object to Kubernetes JSON. + ToJson() interface{} + // Returns a string representation of this construct. + ToString() *string +} + +// The jsii proxy struct for KubeRuntimeClassListV1Beta1 +type jsiiProxy_KubeRuntimeClassListV1Beta1 struct { + internal.Type__cdk8sApiObject +} + +func (j *jsiiProxy_KubeRuntimeClassListV1Beta1) ApiGroup() *string { + var returns *string + _jsii_.Get( + j, + "apiGroup", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeRuntimeClassListV1Beta1) ApiVersion() *string { + var returns *string + _jsii_.Get( + j, + "apiVersion", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeRuntimeClassListV1Beta1) Chart() cdk8s.Chart { + var returns cdk8s.Chart + _jsii_.Get( + j, + "chart", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeRuntimeClassListV1Beta1) Kind() *string { + var returns *string + _jsii_.Get( + j, + "kind", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeRuntimeClassListV1Beta1) Metadata() cdk8s.ApiObjectMetadataDefinition { + var returns cdk8s.ApiObjectMetadataDefinition + _jsii_.Get( + j, + "metadata", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeRuntimeClassListV1Beta1) Name() *string { + var returns *string + _jsii_.Get( + j, + "name", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeRuntimeClassListV1Beta1) Node() constructs.Node { + var returns constructs.Node + _jsii_.Get( + j, + "node", + &returns, + ) + return returns +} + +// Defines a "io.k8s.api.node.v1beta1.RuntimeClassList" API object. +func NewKubeRuntimeClassListV1Beta1(scope constructs.Construct, id *string, props *KubeRuntimeClassListV1Beta1Props) KubeRuntimeClassListV1Beta1 { + _init_.Initialize() + + j := jsiiProxy_KubeRuntimeClassListV1Beta1{} + + _jsii_.Create( + "k8s.KubeRuntimeClassListV1Beta1", + []interface{}{scope, id, props}, + &j, + ) + + return &j +} + +// Defines a "io.k8s.api.node.v1beta1.RuntimeClassList" API object. +func NewKubeRuntimeClassListV1Beta1_Override(k KubeRuntimeClassListV1Beta1, scope constructs.Construct, id *string, props *KubeRuntimeClassListV1Beta1Props) { + _init_.Initialize() + + _jsii_.Create( + "k8s.KubeRuntimeClassListV1Beta1", + []interface{}{scope, id, props}, + k, + ) +} + +// Checks if `x` is a construct. +// +// Use this method instead of `instanceof` to properly detect `Construct` +// instances, even when the construct library is symlinked. +// +// Explanation: in JavaScript, multiple copies of the `constructs` library on +// disk are seen as independent, completely different libraries. As a +// consequence, the class `Construct` in each copy of the `constructs` library +// is seen as a different class, and an instance of one class will not test as +// `instanceof` the other class. `npm install` will not create installations +// like this, but users may manually symlink construct libraries together or +// use a monorepo tool: in those cases, multiple copies of the `constructs` +// library can be accidentally installed, and `instanceof` will behave +// unpredictably. It is safest to avoid using `instanceof`, and using +// this type-testing method instead. +// +// Returns: true if `x` is an object created from a class which extends `Construct`. +func KubeRuntimeClassListV1Beta1_IsConstruct(x interface{}) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "k8s.KubeRuntimeClassListV1Beta1", + "isConstruct", + []interface{}{x}, + &returns, + ) + + return returns +} + +// Renders a Kubernetes manifest for "io.k8s.api.node.v1beta1.RuntimeClassList". +// +// This can be used to inline resource manifests inside other objects (e.g. as templates). +func KubeRuntimeClassListV1Beta1_Manifest(props *KubeRuntimeClassListV1Beta1Props) interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "k8s.KubeRuntimeClassListV1Beta1", + "manifest", + []interface{}{props}, + &returns, + ) + + return returns +} + +// Returns the `ApiObject` named `Resource` which is a child of the given construct. +// +// If `c` is an `ApiObject`, it is returned directly. Throws an +// exception if the construct does not have a child named `Default` _or_ if +// this child is not an `ApiObject`. +func KubeRuntimeClassListV1Beta1_Of(c constructs.IConstruct) cdk8s.ApiObject { + _init_.Initialize() + + var returns cdk8s.ApiObject + + _jsii_.StaticInvoke( + "k8s.KubeRuntimeClassListV1Beta1", + "of", + []interface{}{c}, + &returns, + ) + + return returns +} + +func KubeRuntimeClassListV1Beta1_GVK() *cdk8s.GroupVersionKind { + _init_.Initialize() + var returns *cdk8s.GroupVersionKind + _jsii_.StaticGet( + "k8s.KubeRuntimeClassListV1Beta1", + "GVK", + &returns, + ) + return returns +} + +func (k *jsiiProxy_KubeRuntimeClassListV1Beta1) AddDependency(dependencies ...constructs.IConstruct) { + args := []interface{}{} + for _, a := range dependencies { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addDependency", + args, + ) +} + +func (k *jsiiProxy_KubeRuntimeClassListV1Beta1) AddJsonPatch(ops ...cdk8s.JsonPatch) { + args := []interface{}{} + for _, a := range ops { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addJsonPatch", + args, + ) +} + +func (k *jsiiProxy_KubeRuntimeClassListV1Beta1) ToJson() interface{} { + var returns interface{} + + _jsii_.Invoke( + k, + "toJson", + nil, // no parameters + &returns, + ) + + return returns +} + +func (k *jsiiProxy_KubeRuntimeClassListV1Beta1) ToString() *string { + var returns *string + + _jsii_.Invoke( + k, + "toString", + nil, // no parameters + &returns, + ) + + return returns +} + +// RuntimeClassList is a list of RuntimeClass objects. +type KubeRuntimeClassListV1Beta1Props struct { + // Items is a list of schema objects. + Items *[]*KubeRuntimeClassV1Beta1Props `field:"required" json:"items" yaml:"items"` + // Standard list metadata. + // + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + Metadata *ListMeta `field:"optional" json:"metadata" yaml:"metadata"` +} + +// RuntimeClass defines a class of container runtime supported in the cluster. +// +// The RuntimeClass is used to determine which container runtime is used to run all containers in a pod. RuntimeClasses are manually defined by a user or cluster provisioner, and referenced in the PodSpec. The Kubelet is responsible for resolving the RuntimeClassName reference before running the pod. For more details, see https://kubernetes.io/docs/concepts/containers/runtime-class/ +type KubeRuntimeClassProps struct { + // Handler specifies the underlying runtime and configuration that the CRI implementation will use to handle pods of this class. + // + // The possible values are specific to the node & CRI configuration. It is assumed that all handlers are available on every node, and handlers of the same name are equivalent on every node. For example, a handler called "runc" might specify that the runc OCI runtime (using native Linux containers) will be used to run the containers in a pod. The Handler must be lowercase, conform to the DNS Label (RFC 1123) requirements, and is immutable. + Handler *string `field:"required" json:"handler" yaml:"handler"` + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata. + Metadata *ObjectMeta `field:"optional" json:"metadata" yaml:"metadata"` + // Overhead represents the resource overhead associated with running a pod for a given RuntimeClass. + // + // For more details, see + // https://kubernetes.io/docs/concepts/scheduling-eviction/pod-overhead/ + // This field is in beta starting v1.18 and is only honored by servers that enable the PodOverhead feature. + Overhead *Overhead `field:"optional" json:"overhead" yaml:"overhead"` + // Scheduling holds the scheduling constraints to ensure that pods running with this RuntimeClass are scheduled to nodes that support it. + // + // If scheduling is nil, this RuntimeClass is assumed to be supported by all nodes. + Scheduling *Scheduling `field:"optional" json:"scheduling" yaml:"scheduling"` +} + +// RuntimeClass defines a class of container runtime supported in the cluster. +// +// The RuntimeClass is used to determine which container runtime is used to run all containers in a pod. RuntimeClasses are (currently) manually defined by a user or cluster provisioner, and referenced in the PodSpec. The Kubelet is responsible for resolving the RuntimeClassName reference before running the pod. For more details, see https://git.k8s.io/enhancements/keps/sig-node/585-runtime-class +type KubeRuntimeClassV1Alpha1 interface { + cdk8s.ApiObject + // The group portion of the API version (e.g. `authorization.k8s.io`). + ApiGroup() *string + // The object's API version (e.g. `authorization.k8s.io/v1`). + ApiVersion() *string + // The chart in which this object is defined. + Chart() cdk8s.Chart + // The object kind. + Kind() *string + // Metadata associated with this API object. + Metadata() cdk8s.ApiObjectMetadataDefinition + // The name of the API object. + // + // If a name is specified in `metadata.name` this will be the name returned. + // Otherwise, a name will be generated by calling + // `AddHelm.of(this).generatedObjectName(this)`, which by default uses the + // construct path to generate a DNS-compatible name for the resource. + Name() *string + // The tree node. + Node() constructs.Node + // Create a dependency between this ApiObject and other constructs. + // + // These can be other ApiObjects, Charts, or custom. + AddDependency(dependencies ...constructs.IConstruct) + // Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. + // + // Example: + // kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true)); + // + AddJsonPatch(ops ...cdk8s.JsonPatch) + // Renders the object to Kubernetes JSON. + ToJson() interface{} + // Returns a string representation of this construct. + ToString() *string +} + +// The jsii proxy struct for KubeRuntimeClassV1Alpha1 +type jsiiProxy_KubeRuntimeClassV1Alpha1 struct { + internal.Type__cdk8sApiObject +} + +func (j *jsiiProxy_KubeRuntimeClassV1Alpha1) ApiGroup() *string { + var returns *string + _jsii_.Get( + j, + "apiGroup", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeRuntimeClassV1Alpha1) ApiVersion() *string { + var returns *string + _jsii_.Get( + j, + "apiVersion", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeRuntimeClassV1Alpha1) Chart() cdk8s.Chart { + var returns cdk8s.Chart + _jsii_.Get( + j, + "chart", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeRuntimeClassV1Alpha1) Kind() *string { + var returns *string + _jsii_.Get( + j, + "kind", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeRuntimeClassV1Alpha1) Metadata() cdk8s.ApiObjectMetadataDefinition { + var returns cdk8s.ApiObjectMetadataDefinition + _jsii_.Get( + j, + "metadata", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeRuntimeClassV1Alpha1) Name() *string { + var returns *string + _jsii_.Get( + j, + "name", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeRuntimeClassV1Alpha1) Node() constructs.Node { + var returns constructs.Node + _jsii_.Get( + j, + "node", + &returns, + ) + return returns +} + +// Defines a "io.k8s.api.node.v1alpha1.RuntimeClass" API object. +func NewKubeRuntimeClassV1Alpha1(scope constructs.Construct, id *string, props *KubeRuntimeClassV1Alpha1Props) KubeRuntimeClassV1Alpha1 { + _init_.Initialize() + + j := jsiiProxy_KubeRuntimeClassV1Alpha1{} + + _jsii_.Create( + "k8s.KubeRuntimeClassV1Alpha1", + []interface{}{scope, id, props}, + &j, + ) + + return &j +} + +// Defines a "io.k8s.api.node.v1alpha1.RuntimeClass" API object. +func NewKubeRuntimeClassV1Alpha1_Override(k KubeRuntimeClassV1Alpha1, scope constructs.Construct, id *string, props *KubeRuntimeClassV1Alpha1Props) { + _init_.Initialize() + + _jsii_.Create( + "k8s.KubeRuntimeClassV1Alpha1", + []interface{}{scope, id, props}, + k, + ) +} + +// Checks if `x` is a construct. +// +// Use this method instead of `instanceof` to properly detect `Construct` +// instances, even when the construct library is symlinked. +// +// Explanation: in JavaScript, multiple copies of the `constructs` library on +// disk are seen as independent, completely different libraries. As a +// consequence, the class `Construct` in each copy of the `constructs` library +// is seen as a different class, and an instance of one class will not test as +// `instanceof` the other class. `npm install` will not create installations +// like this, but users may manually symlink construct libraries together or +// use a monorepo tool: in those cases, multiple copies of the `constructs` +// library can be accidentally installed, and `instanceof` will behave +// unpredictably. It is safest to avoid using `instanceof`, and using +// this type-testing method instead. +// +// Returns: true if `x` is an object created from a class which extends `Construct`. +func KubeRuntimeClassV1Alpha1_IsConstruct(x interface{}) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "k8s.KubeRuntimeClassV1Alpha1", + "isConstruct", + []interface{}{x}, + &returns, + ) + + return returns +} + +// Renders a Kubernetes manifest for "io.k8s.api.node.v1alpha1.RuntimeClass". +// +// This can be used to inline resource manifests inside other objects (e.g. as templates). +func KubeRuntimeClassV1Alpha1_Manifest(props *KubeRuntimeClassV1Alpha1Props) interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "k8s.KubeRuntimeClassV1Alpha1", + "manifest", + []interface{}{props}, + &returns, + ) + + return returns +} + +// Returns the `ApiObject` named `Resource` which is a child of the given construct. +// +// If `c` is an `ApiObject`, it is returned directly. Throws an +// exception if the construct does not have a child named `Default` _or_ if +// this child is not an `ApiObject`. +func KubeRuntimeClassV1Alpha1_Of(c constructs.IConstruct) cdk8s.ApiObject { + _init_.Initialize() + + var returns cdk8s.ApiObject + + _jsii_.StaticInvoke( + "k8s.KubeRuntimeClassV1Alpha1", + "of", + []interface{}{c}, + &returns, + ) + + return returns +} + +func KubeRuntimeClassV1Alpha1_GVK() *cdk8s.GroupVersionKind { + _init_.Initialize() + var returns *cdk8s.GroupVersionKind + _jsii_.StaticGet( + "k8s.KubeRuntimeClassV1Alpha1", + "GVK", + &returns, + ) + return returns +} + +func (k *jsiiProxy_KubeRuntimeClassV1Alpha1) AddDependency(dependencies ...constructs.IConstruct) { + args := []interface{}{} + for _, a := range dependencies { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addDependency", + args, + ) +} + +func (k *jsiiProxy_KubeRuntimeClassV1Alpha1) AddJsonPatch(ops ...cdk8s.JsonPatch) { + args := []interface{}{} + for _, a := range ops { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addJsonPatch", + args, + ) +} + +func (k *jsiiProxy_KubeRuntimeClassV1Alpha1) ToJson() interface{} { + var returns interface{} + + _jsii_.Invoke( + k, + "toJson", + nil, // no parameters + &returns, + ) + + return returns +} + +func (k *jsiiProxy_KubeRuntimeClassV1Alpha1) ToString() *string { + var returns *string + + _jsii_.Invoke( + k, + "toString", + nil, // no parameters + &returns, + ) + + return returns +} + +// RuntimeClass defines a class of container runtime supported in the cluster. +// +// The RuntimeClass is used to determine which container runtime is used to run all containers in a pod. RuntimeClasses are (currently) manually defined by a user or cluster provisioner, and referenced in the PodSpec. The Kubelet is responsible for resolving the RuntimeClassName reference before running the pod. For more details, see https://git.k8s.io/enhancements/keps/sig-node/585-runtime-class +type KubeRuntimeClassV1Alpha1Props struct { + // Specification of the RuntimeClass More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status. + Spec *RuntimeClassSpecV1Alpha1 `field:"required" json:"spec" yaml:"spec"` + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata. + Metadata *ObjectMeta `field:"optional" json:"metadata" yaml:"metadata"` +} + +// RuntimeClass defines a class of container runtime supported in the cluster. +// +// The RuntimeClass is used to determine which container runtime is used to run all containers in a pod. RuntimeClasses are (currently) manually defined by a user or cluster provisioner, and referenced in the PodSpec. The Kubelet is responsible for resolving the RuntimeClassName reference before running the pod. For more details, see https://git.k8s.io/enhancements/keps/sig-node/585-runtime-class +type KubeRuntimeClassV1Beta1 interface { + cdk8s.ApiObject + // The group portion of the API version (e.g. `authorization.k8s.io`). + ApiGroup() *string + // The object's API version (e.g. `authorization.k8s.io/v1`). + ApiVersion() *string + // The chart in which this object is defined. + Chart() cdk8s.Chart + // The object kind. + Kind() *string + // Metadata associated with this API object. + Metadata() cdk8s.ApiObjectMetadataDefinition + // The name of the API object. + // + // If a name is specified in `metadata.name` this will be the name returned. + // Otherwise, a name will be generated by calling + // `AddHelm.of(this).generatedObjectName(this)`, which by default uses the + // construct path to generate a DNS-compatible name for the resource. + Name() *string + // The tree node. + Node() constructs.Node + // Create a dependency between this ApiObject and other constructs. + // + // These can be other ApiObjects, Charts, or custom. + AddDependency(dependencies ...constructs.IConstruct) + // Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. + // + // Example: + // kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true)); + // + AddJsonPatch(ops ...cdk8s.JsonPatch) + // Renders the object to Kubernetes JSON. + ToJson() interface{} + // Returns a string representation of this construct. + ToString() *string +} + +// The jsii proxy struct for KubeRuntimeClassV1Beta1 +type jsiiProxy_KubeRuntimeClassV1Beta1 struct { + internal.Type__cdk8sApiObject +} + +func (j *jsiiProxy_KubeRuntimeClassV1Beta1) ApiGroup() *string { + var returns *string + _jsii_.Get( + j, + "apiGroup", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeRuntimeClassV1Beta1) ApiVersion() *string { + var returns *string + _jsii_.Get( + j, + "apiVersion", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeRuntimeClassV1Beta1) Chart() cdk8s.Chart { + var returns cdk8s.Chart + _jsii_.Get( + j, + "chart", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeRuntimeClassV1Beta1) Kind() *string { + var returns *string + _jsii_.Get( + j, + "kind", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeRuntimeClassV1Beta1) Metadata() cdk8s.ApiObjectMetadataDefinition { + var returns cdk8s.ApiObjectMetadataDefinition + _jsii_.Get( + j, + "metadata", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeRuntimeClassV1Beta1) Name() *string { + var returns *string + _jsii_.Get( + j, + "name", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeRuntimeClassV1Beta1) Node() constructs.Node { + var returns constructs.Node + _jsii_.Get( + j, + "node", + &returns, + ) + return returns +} + +// Defines a "io.k8s.api.node.v1beta1.RuntimeClass" API object. +func NewKubeRuntimeClassV1Beta1(scope constructs.Construct, id *string, props *KubeRuntimeClassV1Beta1Props) KubeRuntimeClassV1Beta1 { + _init_.Initialize() + + j := jsiiProxy_KubeRuntimeClassV1Beta1{} + + _jsii_.Create( + "k8s.KubeRuntimeClassV1Beta1", + []interface{}{scope, id, props}, + &j, + ) + + return &j +} + +// Defines a "io.k8s.api.node.v1beta1.RuntimeClass" API object. +func NewKubeRuntimeClassV1Beta1_Override(k KubeRuntimeClassV1Beta1, scope constructs.Construct, id *string, props *KubeRuntimeClassV1Beta1Props) { + _init_.Initialize() + + _jsii_.Create( + "k8s.KubeRuntimeClassV1Beta1", + []interface{}{scope, id, props}, + k, + ) +} + +// Checks if `x` is a construct. +// +// Use this method instead of `instanceof` to properly detect `Construct` +// instances, even when the construct library is symlinked. +// +// Explanation: in JavaScript, multiple copies of the `constructs` library on +// disk are seen as independent, completely different libraries. As a +// consequence, the class `Construct` in each copy of the `constructs` library +// is seen as a different class, and an instance of one class will not test as +// `instanceof` the other class. `npm install` will not create installations +// like this, but users may manually symlink construct libraries together or +// use a monorepo tool: in those cases, multiple copies of the `constructs` +// library can be accidentally installed, and `instanceof` will behave +// unpredictably. It is safest to avoid using `instanceof`, and using +// this type-testing method instead. +// +// Returns: true if `x` is an object created from a class which extends `Construct`. +func KubeRuntimeClassV1Beta1_IsConstruct(x interface{}) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "k8s.KubeRuntimeClassV1Beta1", + "isConstruct", + []interface{}{x}, + &returns, + ) + + return returns +} + +// Renders a Kubernetes manifest for "io.k8s.api.node.v1beta1.RuntimeClass". +// +// This can be used to inline resource manifests inside other objects (e.g. as templates). +func KubeRuntimeClassV1Beta1_Manifest(props *KubeRuntimeClassV1Beta1Props) interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "k8s.KubeRuntimeClassV1Beta1", + "manifest", + []interface{}{props}, + &returns, + ) + + return returns +} + +// Returns the `ApiObject` named `Resource` which is a child of the given construct. +// +// If `c` is an `ApiObject`, it is returned directly. Throws an +// exception if the construct does not have a child named `Default` _or_ if +// this child is not an `ApiObject`. +func KubeRuntimeClassV1Beta1_Of(c constructs.IConstruct) cdk8s.ApiObject { + _init_.Initialize() + + var returns cdk8s.ApiObject + + _jsii_.StaticInvoke( + "k8s.KubeRuntimeClassV1Beta1", + "of", + []interface{}{c}, + &returns, + ) + + return returns +} + +func KubeRuntimeClassV1Beta1_GVK() *cdk8s.GroupVersionKind { + _init_.Initialize() + var returns *cdk8s.GroupVersionKind + _jsii_.StaticGet( + "k8s.KubeRuntimeClassV1Beta1", + "GVK", + &returns, + ) + return returns +} + +func (k *jsiiProxy_KubeRuntimeClassV1Beta1) AddDependency(dependencies ...constructs.IConstruct) { + args := []interface{}{} + for _, a := range dependencies { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addDependency", + args, + ) +} + +func (k *jsiiProxy_KubeRuntimeClassV1Beta1) AddJsonPatch(ops ...cdk8s.JsonPatch) { + args := []interface{}{} + for _, a := range ops { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addJsonPatch", + args, + ) +} + +func (k *jsiiProxy_KubeRuntimeClassV1Beta1) ToJson() interface{} { + var returns interface{} + + _jsii_.Invoke( + k, + "toJson", + nil, // no parameters + &returns, + ) + + return returns +} + +func (k *jsiiProxy_KubeRuntimeClassV1Beta1) ToString() *string { + var returns *string + + _jsii_.Invoke( + k, + "toString", + nil, // no parameters + &returns, + ) + + return returns +} + +// RuntimeClass defines a class of container runtime supported in the cluster. +// +// The RuntimeClass is used to determine which container runtime is used to run all containers in a pod. RuntimeClasses are (currently) manually defined by a user or cluster provisioner, and referenced in the PodSpec. The Kubelet is responsible for resolving the RuntimeClassName reference before running the pod. For more details, see https://git.k8s.io/enhancements/keps/sig-node/585-runtime-class +type KubeRuntimeClassV1Beta1Props struct { + // Handler specifies the underlying runtime and configuration that the CRI implementation will use to handle pods of this class. + // + // The possible values are specific to the node & CRI configuration. It is assumed that all handlers are available on every node, and handlers of the same name are equivalent on every node. For example, a handler called "runc" might specify that the runc OCI runtime (using native Linux containers) will be used to run the containers in a pod. The Handler must be lowercase, conform to the DNS Label (RFC 1123) requirements, and is immutable. + Handler *string `field:"required" json:"handler" yaml:"handler"` + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata. + Metadata *ObjectMeta `field:"optional" json:"metadata" yaml:"metadata"` + // Overhead represents the resource overhead associated with running a pod for a given RuntimeClass. + // + // For more details, see https://git.k8s.io/enhancements/keps/sig-node/688-pod-overhead/README.md This field is beta-level as of Kubernetes v1.18, and is only honored by servers that enable the PodOverhead feature. + Overhead *OverheadV1Beta1 `field:"optional" json:"overhead" yaml:"overhead"` + // Scheduling holds the scheduling constraints to ensure that pods running with this RuntimeClass are scheduled to nodes that support it. + // + // If scheduling is nil, this RuntimeClass is assumed to be supported by all nodes. + Scheduling *SchedulingV1Beta1 `field:"optional" json:"scheduling" yaml:"scheduling"` +} + +// Scale represents a scaling request for a resource. +type KubeScale interface { + cdk8s.ApiObject + // The group portion of the API version (e.g. `authorization.k8s.io`). + ApiGroup() *string + // The object's API version (e.g. `authorization.k8s.io/v1`). + ApiVersion() *string + // The chart in which this object is defined. + Chart() cdk8s.Chart + // The object kind. + Kind() *string + // Metadata associated with this API object. + Metadata() cdk8s.ApiObjectMetadataDefinition + // The name of the API object. + // + // If a name is specified in `metadata.name` this will be the name returned. + // Otherwise, a name will be generated by calling + // `AddHelm.of(this).generatedObjectName(this)`, which by default uses the + // construct path to generate a DNS-compatible name for the resource. + Name() *string + // The tree node. + Node() constructs.Node + // Create a dependency between this ApiObject and other constructs. + // + // These can be other ApiObjects, Charts, or custom. + AddDependency(dependencies ...constructs.IConstruct) + // Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. + // + // Example: + // kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true)); + // + AddJsonPatch(ops ...cdk8s.JsonPatch) + // Renders the object to Kubernetes JSON. + ToJson() interface{} + // Returns a string representation of this construct. + ToString() *string +} + +// The jsii proxy struct for KubeScale +type jsiiProxy_KubeScale struct { + internal.Type__cdk8sApiObject +} + +func (j *jsiiProxy_KubeScale) ApiGroup() *string { + var returns *string + _jsii_.Get( + j, + "apiGroup", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeScale) ApiVersion() *string { + var returns *string + _jsii_.Get( + j, + "apiVersion", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeScale) Chart() cdk8s.Chart { + var returns cdk8s.Chart + _jsii_.Get( + j, + "chart", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeScale) Kind() *string { + var returns *string + _jsii_.Get( + j, + "kind", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeScale) Metadata() cdk8s.ApiObjectMetadataDefinition { + var returns cdk8s.ApiObjectMetadataDefinition + _jsii_.Get( + j, + "metadata", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeScale) Name() *string { + var returns *string + _jsii_.Get( + j, + "name", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeScale) Node() constructs.Node { + var returns constructs.Node + _jsii_.Get( + j, + "node", + &returns, + ) + return returns +} + +// Defines a "io.k8s.api.autoscaling.v1.Scale" API object. +func NewKubeScale(scope constructs.Construct, id *string, props *KubeScaleProps) KubeScale { + _init_.Initialize() + + j := jsiiProxy_KubeScale{} + + _jsii_.Create( + "k8s.KubeScale", + []interface{}{scope, id, props}, + &j, + ) + + return &j +} + +// Defines a "io.k8s.api.autoscaling.v1.Scale" API object. +func NewKubeScale_Override(k KubeScale, scope constructs.Construct, id *string, props *KubeScaleProps) { + _init_.Initialize() + + _jsii_.Create( + "k8s.KubeScale", + []interface{}{scope, id, props}, + k, + ) +} + +// Checks if `x` is a construct. +// +// Use this method instead of `instanceof` to properly detect `Construct` +// instances, even when the construct library is symlinked. +// +// Explanation: in JavaScript, multiple copies of the `constructs` library on +// disk are seen as independent, completely different libraries. As a +// consequence, the class `Construct` in each copy of the `constructs` library +// is seen as a different class, and an instance of one class will not test as +// `instanceof` the other class. `npm install` will not create installations +// like this, but users may manually symlink construct libraries together or +// use a monorepo tool: in those cases, multiple copies of the `constructs` +// library can be accidentally installed, and `instanceof` will behave +// unpredictably. It is safest to avoid using `instanceof`, and using +// this type-testing method instead. +// +// Returns: true if `x` is an object created from a class which extends `Construct`. +func KubeScale_IsConstruct(x interface{}) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "k8s.KubeScale", + "isConstruct", + []interface{}{x}, + &returns, + ) + + return returns +} + +// Renders a Kubernetes manifest for "io.k8s.api.autoscaling.v1.Scale". +// +// This can be used to inline resource manifests inside other objects (e.g. as templates). +func KubeScale_Manifest(props *KubeScaleProps) interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "k8s.KubeScale", + "manifest", + []interface{}{props}, + &returns, + ) + + return returns +} + +// Returns the `ApiObject` named `Resource` which is a child of the given construct. +// +// If `c` is an `ApiObject`, it is returned directly. Throws an +// exception if the construct does not have a child named `Default` _or_ if +// this child is not an `ApiObject`. +func KubeScale_Of(c constructs.IConstruct) cdk8s.ApiObject { + _init_.Initialize() + + var returns cdk8s.ApiObject + + _jsii_.StaticInvoke( + "k8s.KubeScale", + "of", + []interface{}{c}, + &returns, + ) + + return returns +} + +func KubeScale_GVK() *cdk8s.GroupVersionKind { + _init_.Initialize() + var returns *cdk8s.GroupVersionKind + _jsii_.StaticGet( + "k8s.KubeScale", + "GVK", + &returns, + ) + return returns +} + +func (k *jsiiProxy_KubeScale) AddDependency(dependencies ...constructs.IConstruct) { + args := []interface{}{} + for _, a := range dependencies { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addDependency", + args, + ) +} + +func (k *jsiiProxy_KubeScale) AddJsonPatch(ops ...cdk8s.JsonPatch) { + args := []interface{}{} + for _, a := range ops { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addJsonPatch", + args, + ) +} + +func (k *jsiiProxy_KubeScale) ToJson() interface{} { + var returns interface{} + + _jsii_.Invoke( + k, + "toJson", + nil, // no parameters + &returns, + ) + + return returns +} + +func (k *jsiiProxy_KubeScale) ToString() *string { + var returns *string + + _jsii_.Invoke( + k, + "toString", + nil, // no parameters + &returns, + ) + + return returns +} + +// Scale represents a scaling request for a resource. +type KubeScaleProps struct { + // Standard object metadata; + // + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata. + Metadata *ObjectMeta `field:"optional" json:"metadata" yaml:"metadata"` + // defines the behavior of the scale. + // + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status. + Spec *ScaleSpec `field:"optional" json:"spec" yaml:"spec"` +} + +// Secret holds secret data of a certain type. +// +// The total bytes of the values in the Data field must be less than MaxSecretSize bytes. +type KubeSecret interface { + cdk8s.ApiObject + // The group portion of the API version (e.g. `authorization.k8s.io`). + ApiGroup() *string + // The object's API version (e.g. `authorization.k8s.io/v1`). + ApiVersion() *string + // The chart in which this object is defined. + Chart() cdk8s.Chart + // The object kind. + Kind() *string + // Metadata associated with this API object. + Metadata() cdk8s.ApiObjectMetadataDefinition + // The name of the API object. + // + // If a name is specified in `metadata.name` this will be the name returned. + // Otherwise, a name will be generated by calling + // `AddHelm.of(this).generatedObjectName(this)`, which by default uses the + // construct path to generate a DNS-compatible name for the resource. + Name() *string + // The tree node. + Node() constructs.Node + // Create a dependency between this ApiObject and other constructs. + // + // These can be other ApiObjects, Charts, or custom. + AddDependency(dependencies ...constructs.IConstruct) + // Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. + // + // Example: + // kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true)); + // + AddJsonPatch(ops ...cdk8s.JsonPatch) + // Renders the object to Kubernetes JSON. + ToJson() interface{} + // Returns a string representation of this construct. + ToString() *string +} + +// The jsii proxy struct for KubeSecret +type jsiiProxy_KubeSecret struct { + internal.Type__cdk8sApiObject +} + +func (j *jsiiProxy_KubeSecret) ApiGroup() *string { + var returns *string + _jsii_.Get( + j, + "apiGroup", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeSecret) ApiVersion() *string { + var returns *string + _jsii_.Get( + j, + "apiVersion", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeSecret) Chart() cdk8s.Chart { + var returns cdk8s.Chart + _jsii_.Get( + j, + "chart", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeSecret) Kind() *string { + var returns *string + _jsii_.Get( + j, + "kind", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeSecret) Metadata() cdk8s.ApiObjectMetadataDefinition { + var returns cdk8s.ApiObjectMetadataDefinition + _jsii_.Get( + j, + "metadata", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeSecret) Name() *string { + var returns *string + _jsii_.Get( + j, + "name", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeSecret) Node() constructs.Node { + var returns constructs.Node + _jsii_.Get( + j, + "node", + &returns, + ) + return returns +} + +// Defines a "io.k8s.api.core.v1.Secret" API object. +func NewKubeSecret(scope constructs.Construct, id *string, props *KubeSecretProps) KubeSecret { + _init_.Initialize() + + j := jsiiProxy_KubeSecret{} + + _jsii_.Create( + "k8s.KubeSecret", + []interface{}{scope, id, props}, + &j, + ) + + return &j +} + +// Defines a "io.k8s.api.core.v1.Secret" API object. +func NewKubeSecret_Override(k KubeSecret, scope constructs.Construct, id *string, props *KubeSecretProps) { + _init_.Initialize() + + _jsii_.Create( + "k8s.KubeSecret", + []interface{}{scope, id, props}, + k, + ) +} + +// Checks if `x` is a construct. +// +// Use this method instead of `instanceof` to properly detect `Construct` +// instances, even when the construct library is symlinked. +// +// Explanation: in JavaScript, multiple copies of the `constructs` library on +// disk are seen as independent, completely different libraries. As a +// consequence, the class `Construct` in each copy of the `constructs` library +// is seen as a different class, and an instance of one class will not test as +// `instanceof` the other class. `npm install` will not create installations +// like this, but users may manually symlink construct libraries together or +// use a monorepo tool: in those cases, multiple copies of the `constructs` +// library can be accidentally installed, and `instanceof` will behave +// unpredictably. It is safest to avoid using `instanceof`, and using +// this type-testing method instead. +// +// Returns: true if `x` is an object created from a class which extends `Construct`. +func KubeSecret_IsConstruct(x interface{}) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "k8s.KubeSecret", + "isConstruct", + []interface{}{x}, + &returns, + ) + + return returns +} + +// Renders a Kubernetes manifest for "io.k8s.api.core.v1.Secret". +// +// This can be used to inline resource manifests inside other objects (e.g. as templates). +func KubeSecret_Manifest(props *KubeSecretProps) interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "k8s.KubeSecret", + "manifest", + []interface{}{props}, + &returns, + ) + + return returns +} + +// Returns the `ApiObject` named `Resource` which is a child of the given construct. +// +// If `c` is an `ApiObject`, it is returned directly. Throws an +// exception if the construct does not have a child named `Default` _or_ if +// this child is not an `ApiObject`. +func KubeSecret_Of(c constructs.IConstruct) cdk8s.ApiObject { + _init_.Initialize() + + var returns cdk8s.ApiObject + + _jsii_.StaticInvoke( + "k8s.KubeSecret", + "of", + []interface{}{c}, + &returns, + ) + + return returns +} + +func KubeSecret_GVK() *cdk8s.GroupVersionKind { + _init_.Initialize() + var returns *cdk8s.GroupVersionKind + _jsii_.StaticGet( + "k8s.KubeSecret", + "GVK", + &returns, + ) + return returns +} + +func (k *jsiiProxy_KubeSecret) AddDependency(dependencies ...constructs.IConstruct) { + args := []interface{}{} + for _, a := range dependencies { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addDependency", + args, + ) +} + +func (k *jsiiProxy_KubeSecret) AddJsonPatch(ops ...cdk8s.JsonPatch) { + args := []interface{}{} + for _, a := range ops { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addJsonPatch", + args, + ) +} + +func (k *jsiiProxy_KubeSecret) ToJson() interface{} { + var returns interface{} + + _jsii_.Invoke( + k, + "toJson", + nil, // no parameters + &returns, + ) + + return returns +} + +func (k *jsiiProxy_KubeSecret) ToString() *string { + var returns *string + + _jsii_.Invoke( + k, + "toString", + nil, // no parameters + &returns, + ) + + return returns +} + +// SecretList is a list of Secret. +type KubeSecretList interface { + cdk8s.ApiObject + // The group portion of the API version (e.g. `authorization.k8s.io`). + ApiGroup() *string + // The object's API version (e.g. `authorization.k8s.io/v1`). + ApiVersion() *string + // The chart in which this object is defined. + Chart() cdk8s.Chart + // The object kind. + Kind() *string + // Metadata associated with this API object. + Metadata() cdk8s.ApiObjectMetadataDefinition + // The name of the API object. + // + // If a name is specified in `metadata.name` this will be the name returned. + // Otherwise, a name will be generated by calling + // `AddHelm.of(this).generatedObjectName(this)`, which by default uses the + // construct path to generate a DNS-compatible name for the resource. + Name() *string + // The tree node. + Node() constructs.Node + // Create a dependency between this ApiObject and other constructs. + // + // These can be other ApiObjects, Charts, or custom. + AddDependency(dependencies ...constructs.IConstruct) + // Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. + // + // Example: + // kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true)); + // + AddJsonPatch(ops ...cdk8s.JsonPatch) + // Renders the object to Kubernetes JSON. + ToJson() interface{} + // Returns a string representation of this construct. + ToString() *string +} + +// The jsii proxy struct for KubeSecretList +type jsiiProxy_KubeSecretList struct { + internal.Type__cdk8sApiObject +} + +func (j *jsiiProxy_KubeSecretList) ApiGroup() *string { + var returns *string + _jsii_.Get( + j, + "apiGroup", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeSecretList) ApiVersion() *string { + var returns *string + _jsii_.Get( + j, + "apiVersion", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeSecretList) Chart() cdk8s.Chart { + var returns cdk8s.Chart + _jsii_.Get( + j, + "chart", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeSecretList) Kind() *string { + var returns *string + _jsii_.Get( + j, + "kind", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeSecretList) Metadata() cdk8s.ApiObjectMetadataDefinition { + var returns cdk8s.ApiObjectMetadataDefinition + _jsii_.Get( + j, + "metadata", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeSecretList) Name() *string { + var returns *string + _jsii_.Get( + j, + "name", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeSecretList) Node() constructs.Node { + var returns constructs.Node + _jsii_.Get( + j, + "node", + &returns, + ) + return returns +} + +// Defines a "io.k8s.api.core.v1.SecretList" API object. +func NewKubeSecretList(scope constructs.Construct, id *string, props *KubeSecretListProps) KubeSecretList { + _init_.Initialize() + + j := jsiiProxy_KubeSecretList{} + + _jsii_.Create( + "k8s.KubeSecretList", + []interface{}{scope, id, props}, + &j, + ) + + return &j +} + +// Defines a "io.k8s.api.core.v1.SecretList" API object. +func NewKubeSecretList_Override(k KubeSecretList, scope constructs.Construct, id *string, props *KubeSecretListProps) { + _init_.Initialize() + + _jsii_.Create( + "k8s.KubeSecretList", + []interface{}{scope, id, props}, + k, + ) +} + +// Checks if `x` is a construct. +// +// Use this method instead of `instanceof` to properly detect `Construct` +// instances, even when the construct library is symlinked. +// +// Explanation: in JavaScript, multiple copies of the `constructs` library on +// disk are seen as independent, completely different libraries. As a +// consequence, the class `Construct` in each copy of the `constructs` library +// is seen as a different class, and an instance of one class will not test as +// `instanceof` the other class. `npm install` will not create installations +// like this, but users may manually symlink construct libraries together or +// use a monorepo tool: in those cases, multiple copies of the `constructs` +// library can be accidentally installed, and `instanceof` will behave +// unpredictably. It is safest to avoid using `instanceof`, and using +// this type-testing method instead. +// +// Returns: true if `x` is an object created from a class which extends `Construct`. +func KubeSecretList_IsConstruct(x interface{}) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "k8s.KubeSecretList", + "isConstruct", + []interface{}{x}, + &returns, + ) + + return returns +} + +// Renders a Kubernetes manifest for "io.k8s.api.core.v1.SecretList". +// +// This can be used to inline resource manifests inside other objects (e.g. as templates). +func KubeSecretList_Manifest(props *KubeSecretListProps) interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "k8s.KubeSecretList", + "manifest", + []interface{}{props}, + &returns, + ) + + return returns +} + +// Returns the `ApiObject` named `Resource` which is a child of the given construct. +// +// If `c` is an `ApiObject`, it is returned directly. Throws an +// exception if the construct does not have a child named `Default` _or_ if +// this child is not an `ApiObject`. +func KubeSecretList_Of(c constructs.IConstruct) cdk8s.ApiObject { + _init_.Initialize() + + var returns cdk8s.ApiObject + + _jsii_.StaticInvoke( + "k8s.KubeSecretList", + "of", + []interface{}{c}, + &returns, + ) + + return returns +} + +func KubeSecretList_GVK() *cdk8s.GroupVersionKind { + _init_.Initialize() + var returns *cdk8s.GroupVersionKind + _jsii_.StaticGet( + "k8s.KubeSecretList", + "GVK", + &returns, + ) + return returns +} + +func (k *jsiiProxy_KubeSecretList) AddDependency(dependencies ...constructs.IConstruct) { + args := []interface{}{} + for _, a := range dependencies { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addDependency", + args, + ) +} + +func (k *jsiiProxy_KubeSecretList) AddJsonPatch(ops ...cdk8s.JsonPatch) { + args := []interface{}{} + for _, a := range ops { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addJsonPatch", + args, + ) +} + +func (k *jsiiProxy_KubeSecretList) ToJson() interface{} { + var returns interface{} + + _jsii_.Invoke( + k, + "toJson", + nil, // no parameters + &returns, + ) + + return returns +} + +func (k *jsiiProxy_KubeSecretList) ToString() *string { + var returns *string + + _jsii_.Invoke( + k, + "toString", + nil, // no parameters + &returns, + ) + + return returns +} + +// SecretList is a list of Secret. +type KubeSecretListProps struct { + // Items is a list of secret objects. + // + // More info: https://kubernetes.io/docs/concepts/configuration/secret + Items *[]*KubeSecretProps `field:"required" json:"items" yaml:"items"` + // Standard list metadata. + // + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + Metadata *ListMeta `field:"optional" json:"metadata" yaml:"metadata"` +} + +// Secret holds secret data of a certain type. +// +// The total bytes of the values in the Data field must be less than MaxSecretSize bytes. +type KubeSecretProps struct { + // Data contains the secret data. + // + // Each key must consist of alphanumeric characters, '-', '_' or '.'. The serialized form of the secret data is a base64 encoded string, representing the arbitrary (possibly non-string) data value here. Described in https://tools.ietf.org/html/rfc4648#section-4 + Data *map[string]*string `field:"optional" json:"data" yaml:"data"` + // Immutable, if set to true, ensures that data stored in the Secret cannot be updated (only object metadata can be modified). + // + // If not set to true, the field can be modified at any time. Defaulted to nil. + Immutable *bool `field:"optional" json:"immutable" yaml:"immutable"` + // Standard object's metadata. + // + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + Metadata *ObjectMeta `field:"optional" json:"metadata" yaml:"metadata"` + // stringData allows specifying non-binary secret data in string form. + // + // It is provided as a write-only input field for convenience. All keys and values are merged into the data field on write, overwriting any existing values. The stringData field is never output when reading from the API. + StringData *map[string]*string `field:"optional" json:"stringData" yaml:"stringData"` + // Used to facilitate programmatic handling of secret data. + Type *string `field:"optional" json:"type" yaml:"type"` +} + +// SelfSubjectAccessReview checks whether or the current user can perform an action. +// +// Not filling in a spec.namespace means "in all namespaces". Self is a special case, because users should always be able to check whether they can perform an action +type KubeSelfSubjectAccessReview interface { + cdk8s.ApiObject + // The group portion of the API version (e.g. `authorization.k8s.io`). + ApiGroup() *string + // The object's API version (e.g. `authorization.k8s.io/v1`). + ApiVersion() *string + // The chart in which this object is defined. + Chart() cdk8s.Chart + // The object kind. + Kind() *string + // Metadata associated with this API object. + Metadata() cdk8s.ApiObjectMetadataDefinition + // The name of the API object. + // + // If a name is specified in `metadata.name` this will be the name returned. + // Otherwise, a name will be generated by calling + // `AddHelm.of(this).generatedObjectName(this)`, which by default uses the + // construct path to generate a DNS-compatible name for the resource. + Name() *string + // The tree node. + Node() constructs.Node + // Create a dependency between this ApiObject and other constructs. + // + // These can be other ApiObjects, Charts, or custom. + AddDependency(dependencies ...constructs.IConstruct) + // Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. + // + // Example: + // kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true)); + // + AddJsonPatch(ops ...cdk8s.JsonPatch) + // Renders the object to Kubernetes JSON. + ToJson() interface{} + // Returns a string representation of this construct. + ToString() *string +} + +// The jsii proxy struct for KubeSelfSubjectAccessReview +type jsiiProxy_KubeSelfSubjectAccessReview struct { + internal.Type__cdk8sApiObject +} + +func (j *jsiiProxy_KubeSelfSubjectAccessReview) ApiGroup() *string { + var returns *string + _jsii_.Get( + j, + "apiGroup", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeSelfSubjectAccessReview) ApiVersion() *string { + var returns *string + _jsii_.Get( + j, + "apiVersion", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeSelfSubjectAccessReview) Chart() cdk8s.Chart { + var returns cdk8s.Chart + _jsii_.Get( + j, + "chart", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeSelfSubjectAccessReview) Kind() *string { + var returns *string + _jsii_.Get( + j, + "kind", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeSelfSubjectAccessReview) Metadata() cdk8s.ApiObjectMetadataDefinition { + var returns cdk8s.ApiObjectMetadataDefinition + _jsii_.Get( + j, + "metadata", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeSelfSubjectAccessReview) Name() *string { + var returns *string + _jsii_.Get( + j, + "name", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeSelfSubjectAccessReview) Node() constructs.Node { + var returns constructs.Node + _jsii_.Get( + j, + "node", + &returns, + ) + return returns +} + +// Defines a "io.k8s.api.authorization.v1.SelfSubjectAccessReview" API object. +func NewKubeSelfSubjectAccessReview(scope constructs.Construct, id *string, props *KubeSelfSubjectAccessReviewProps) KubeSelfSubjectAccessReview { + _init_.Initialize() + + j := jsiiProxy_KubeSelfSubjectAccessReview{} + + _jsii_.Create( + "k8s.KubeSelfSubjectAccessReview", + []interface{}{scope, id, props}, + &j, + ) + + return &j +} + +// Defines a "io.k8s.api.authorization.v1.SelfSubjectAccessReview" API object. +func NewKubeSelfSubjectAccessReview_Override(k KubeSelfSubjectAccessReview, scope constructs.Construct, id *string, props *KubeSelfSubjectAccessReviewProps) { + _init_.Initialize() + + _jsii_.Create( + "k8s.KubeSelfSubjectAccessReview", + []interface{}{scope, id, props}, + k, + ) +} + +// Checks if `x` is a construct. +// +// Use this method instead of `instanceof` to properly detect `Construct` +// instances, even when the construct library is symlinked. +// +// Explanation: in JavaScript, multiple copies of the `constructs` library on +// disk are seen as independent, completely different libraries. As a +// consequence, the class `Construct` in each copy of the `constructs` library +// is seen as a different class, and an instance of one class will not test as +// `instanceof` the other class. `npm install` will not create installations +// like this, but users may manually symlink construct libraries together or +// use a monorepo tool: in those cases, multiple copies of the `constructs` +// library can be accidentally installed, and `instanceof` will behave +// unpredictably. It is safest to avoid using `instanceof`, and using +// this type-testing method instead. +// +// Returns: true if `x` is an object created from a class which extends `Construct`. +func KubeSelfSubjectAccessReview_IsConstruct(x interface{}) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "k8s.KubeSelfSubjectAccessReview", + "isConstruct", + []interface{}{x}, + &returns, + ) + + return returns +} + +// Renders a Kubernetes manifest for "io.k8s.api.authorization.v1.SelfSubjectAccessReview". +// +// This can be used to inline resource manifests inside other objects (e.g. as templates). +func KubeSelfSubjectAccessReview_Manifest(props *KubeSelfSubjectAccessReviewProps) interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "k8s.KubeSelfSubjectAccessReview", + "manifest", + []interface{}{props}, + &returns, + ) + + return returns +} + +// Returns the `ApiObject` named `Resource` which is a child of the given construct. +// +// If `c` is an `ApiObject`, it is returned directly. Throws an +// exception if the construct does not have a child named `Default` _or_ if +// this child is not an `ApiObject`. +func KubeSelfSubjectAccessReview_Of(c constructs.IConstruct) cdk8s.ApiObject { + _init_.Initialize() + + var returns cdk8s.ApiObject + + _jsii_.StaticInvoke( + "k8s.KubeSelfSubjectAccessReview", + "of", + []interface{}{c}, + &returns, + ) + + return returns +} + +func KubeSelfSubjectAccessReview_GVK() *cdk8s.GroupVersionKind { + _init_.Initialize() + var returns *cdk8s.GroupVersionKind + _jsii_.StaticGet( + "k8s.KubeSelfSubjectAccessReview", + "GVK", + &returns, + ) + return returns +} + +func (k *jsiiProxy_KubeSelfSubjectAccessReview) AddDependency(dependencies ...constructs.IConstruct) { + args := []interface{}{} + for _, a := range dependencies { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addDependency", + args, + ) +} + +func (k *jsiiProxy_KubeSelfSubjectAccessReview) AddJsonPatch(ops ...cdk8s.JsonPatch) { + args := []interface{}{} + for _, a := range ops { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addJsonPatch", + args, + ) +} + +func (k *jsiiProxy_KubeSelfSubjectAccessReview) ToJson() interface{} { + var returns interface{} + + _jsii_.Invoke( + k, + "toJson", + nil, // no parameters + &returns, + ) + + return returns +} + +func (k *jsiiProxy_KubeSelfSubjectAccessReview) ToString() *string { + var returns *string + + _jsii_.Invoke( + k, + "toString", + nil, // no parameters + &returns, + ) + + return returns +} + +// SelfSubjectAccessReview checks whether or the current user can perform an action. +// +// Not filling in a spec.namespace means "in all namespaces". Self is a special case, because users should always be able to check whether they can perform an action +type KubeSelfSubjectAccessReviewProps struct { + // Spec holds information about the request being evaluated. + // + // user and groups must be empty. + Spec *SelfSubjectAccessReviewSpec `field:"required" json:"spec" yaml:"spec"` + // Standard list metadata. + // + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + Metadata *ObjectMeta `field:"optional" json:"metadata" yaml:"metadata"` +} + +// SelfSubjectRulesReview enumerates the set of actions the current user can perform within a namespace. +// +// The returned list of actions may be incomplete depending on the server's authorization mode, and any errors experienced during the evaluation. SelfSubjectRulesReview should be used by UIs to show/hide actions, or to quickly let an end user reason about their permissions. It should NOT Be used by external systems to drive authorization decisions as this raises confused deputy, cache lifetime/revocation, and correctness concerns. SubjectAccessReview, and LocalAccessReview are the correct way to defer authorization decisions to the API server. +type KubeSelfSubjectRulesReview interface { + cdk8s.ApiObject + // The group portion of the API version (e.g. `authorization.k8s.io`). + ApiGroup() *string + // The object's API version (e.g. `authorization.k8s.io/v1`). + ApiVersion() *string + // The chart in which this object is defined. + Chart() cdk8s.Chart + // The object kind. + Kind() *string + // Metadata associated with this API object. + Metadata() cdk8s.ApiObjectMetadataDefinition + // The name of the API object. + // + // If a name is specified in `metadata.name` this will be the name returned. + // Otherwise, a name will be generated by calling + // `AddHelm.of(this).generatedObjectName(this)`, which by default uses the + // construct path to generate a DNS-compatible name for the resource. + Name() *string + // The tree node. + Node() constructs.Node + // Create a dependency between this ApiObject and other constructs. + // + // These can be other ApiObjects, Charts, or custom. + AddDependency(dependencies ...constructs.IConstruct) + // Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. + // + // Example: + // kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true)); + // + AddJsonPatch(ops ...cdk8s.JsonPatch) + // Renders the object to Kubernetes JSON. + ToJson() interface{} + // Returns a string representation of this construct. + ToString() *string +} + +// The jsii proxy struct for KubeSelfSubjectRulesReview +type jsiiProxy_KubeSelfSubjectRulesReview struct { + internal.Type__cdk8sApiObject +} + +func (j *jsiiProxy_KubeSelfSubjectRulesReview) ApiGroup() *string { + var returns *string + _jsii_.Get( + j, + "apiGroup", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeSelfSubjectRulesReview) ApiVersion() *string { + var returns *string + _jsii_.Get( + j, + "apiVersion", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeSelfSubjectRulesReview) Chart() cdk8s.Chart { + var returns cdk8s.Chart + _jsii_.Get( + j, + "chart", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeSelfSubjectRulesReview) Kind() *string { + var returns *string + _jsii_.Get( + j, + "kind", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeSelfSubjectRulesReview) Metadata() cdk8s.ApiObjectMetadataDefinition { + var returns cdk8s.ApiObjectMetadataDefinition + _jsii_.Get( + j, + "metadata", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeSelfSubjectRulesReview) Name() *string { + var returns *string + _jsii_.Get( + j, + "name", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeSelfSubjectRulesReview) Node() constructs.Node { + var returns constructs.Node + _jsii_.Get( + j, + "node", + &returns, + ) + return returns +} + +// Defines a "io.k8s.api.authorization.v1.SelfSubjectRulesReview" API object. +func NewKubeSelfSubjectRulesReview(scope constructs.Construct, id *string, props *KubeSelfSubjectRulesReviewProps) KubeSelfSubjectRulesReview { + _init_.Initialize() + + j := jsiiProxy_KubeSelfSubjectRulesReview{} + + _jsii_.Create( + "k8s.KubeSelfSubjectRulesReview", + []interface{}{scope, id, props}, + &j, + ) + + return &j +} + +// Defines a "io.k8s.api.authorization.v1.SelfSubjectRulesReview" API object. +func NewKubeSelfSubjectRulesReview_Override(k KubeSelfSubjectRulesReview, scope constructs.Construct, id *string, props *KubeSelfSubjectRulesReviewProps) { + _init_.Initialize() + + _jsii_.Create( + "k8s.KubeSelfSubjectRulesReview", + []interface{}{scope, id, props}, + k, + ) +} + +// Checks if `x` is a construct. +// +// Use this method instead of `instanceof` to properly detect `Construct` +// instances, even when the construct library is symlinked. +// +// Explanation: in JavaScript, multiple copies of the `constructs` library on +// disk are seen as independent, completely different libraries. As a +// consequence, the class `Construct` in each copy of the `constructs` library +// is seen as a different class, and an instance of one class will not test as +// `instanceof` the other class. `npm install` will not create installations +// like this, but users may manually symlink construct libraries together or +// use a monorepo tool: in those cases, multiple copies of the `constructs` +// library can be accidentally installed, and `instanceof` will behave +// unpredictably. It is safest to avoid using `instanceof`, and using +// this type-testing method instead. +// +// Returns: true if `x` is an object created from a class which extends `Construct`. +func KubeSelfSubjectRulesReview_IsConstruct(x interface{}) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "k8s.KubeSelfSubjectRulesReview", + "isConstruct", + []interface{}{x}, + &returns, + ) + + return returns +} + +// Renders a Kubernetes manifest for "io.k8s.api.authorization.v1.SelfSubjectRulesReview". +// +// This can be used to inline resource manifests inside other objects (e.g. as templates). +func KubeSelfSubjectRulesReview_Manifest(props *KubeSelfSubjectRulesReviewProps) interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "k8s.KubeSelfSubjectRulesReview", + "manifest", + []interface{}{props}, + &returns, + ) + + return returns +} + +// Returns the `ApiObject` named `Resource` which is a child of the given construct. +// +// If `c` is an `ApiObject`, it is returned directly. Throws an +// exception if the construct does not have a child named `Default` _or_ if +// this child is not an `ApiObject`. +func KubeSelfSubjectRulesReview_Of(c constructs.IConstruct) cdk8s.ApiObject { + _init_.Initialize() + + var returns cdk8s.ApiObject + + _jsii_.StaticInvoke( + "k8s.KubeSelfSubjectRulesReview", + "of", + []interface{}{c}, + &returns, + ) + + return returns +} + +func KubeSelfSubjectRulesReview_GVK() *cdk8s.GroupVersionKind { + _init_.Initialize() + var returns *cdk8s.GroupVersionKind + _jsii_.StaticGet( + "k8s.KubeSelfSubjectRulesReview", + "GVK", + &returns, + ) + return returns +} + +func (k *jsiiProxy_KubeSelfSubjectRulesReview) AddDependency(dependencies ...constructs.IConstruct) { + args := []interface{}{} + for _, a := range dependencies { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addDependency", + args, + ) +} + +func (k *jsiiProxy_KubeSelfSubjectRulesReview) AddJsonPatch(ops ...cdk8s.JsonPatch) { + args := []interface{}{} + for _, a := range ops { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addJsonPatch", + args, + ) +} + +func (k *jsiiProxy_KubeSelfSubjectRulesReview) ToJson() interface{} { + var returns interface{} + + _jsii_.Invoke( + k, + "toJson", + nil, // no parameters + &returns, + ) + + return returns +} + +func (k *jsiiProxy_KubeSelfSubjectRulesReview) ToString() *string { + var returns *string + + _jsii_.Invoke( + k, + "toString", + nil, // no parameters + &returns, + ) + + return returns +} + +// SelfSubjectRulesReview enumerates the set of actions the current user can perform within a namespace. +// +// The returned list of actions may be incomplete depending on the server's authorization mode, and any errors experienced during the evaluation. SelfSubjectRulesReview should be used by UIs to show/hide actions, or to quickly let an end user reason about their permissions. It should NOT Be used by external systems to drive authorization decisions as this raises confused deputy, cache lifetime/revocation, and correctness concerns. SubjectAccessReview, and LocalAccessReview are the correct way to defer authorization decisions to the API server. +type KubeSelfSubjectRulesReviewProps struct { + // Spec holds information about the request being evaluated. + Spec *SelfSubjectRulesReviewSpec `field:"required" json:"spec" yaml:"spec"` + // Standard list metadata. + // + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + Metadata *ObjectMeta `field:"optional" json:"metadata" yaml:"metadata"` +} + +// Service is a named abstraction of software service (for example, mysql) consisting of local port (for example 3306) that the proxy listens on, and the selector that determines which pods will answer requests sent through the proxy. +type KubeService interface { + cdk8s.ApiObject + // The group portion of the API version (e.g. `authorization.k8s.io`). + ApiGroup() *string + // The object's API version (e.g. `authorization.k8s.io/v1`). + ApiVersion() *string + // The chart in which this object is defined. + Chart() cdk8s.Chart + // The object kind. + Kind() *string + // Metadata associated with this API object. + Metadata() cdk8s.ApiObjectMetadataDefinition + // The name of the API object. + // + // If a name is specified in `metadata.name` this will be the name returned. + // Otherwise, a name will be generated by calling + // `AddHelm.of(this).generatedObjectName(this)`, which by default uses the + // construct path to generate a DNS-compatible name for the resource. + Name() *string + // The tree node. + Node() constructs.Node + // Create a dependency between this ApiObject and other constructs. + // + // These can be other ApiObjects, Charts, or custom. + AddDependency(dependencies ...constructs.IConstruct) + // Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. + // + // Example: + // kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true)); + // + AddJsonPatch(ops ...cdk8s.JsonPatch) + // Renders the object to Kubernetes JSON. + ToJson() interface{} + // Returns a string representation of this construct. + ToString() *string +} + +// The jsii proxy struct for KubeService +type jsiiProxy_KubeService struct { + internal.Type__cdk8sApiObject +} + +func (j *jsiiProxy_KubeService) ApiGroup() *string { + var returns *string + _jsii_.Get( + j, + "apiGroup", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeService) ApiVersion() *string { + var returns *string + _jsii_.Get( + j, + "apiVersion", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeService) Chart() cdk8s.Chart { + var returns cdk8s.Chart + _jsii_.Get( + j, + "chart", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeService) Kind() *string { + var returns *string + _jsii_.Get( + j, + "kind", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeService) Metadata() cdk8s.ApiObjectMetadataDefinition { + var returns cdk8s.ApiObjectMetadataDefinition + _jsii_.Get( + j, + "metadata", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeService) Name() *string { + var returns *string + _jsii_.Get( + j, + "name", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeService) Node() constructs.Node { + var returns constructs.Node + _jsii_.Get( + j, + "node", + &returns, + ) + return returns +} + +// Defines a "io.k8s.api.core.v1.Service" API object. +func NewKubeService(scope constructs.Construct, id *string, props *KubeServiceProps) KubeService { + _init_.Initialize() + + j := jsiiProxy_KubeService{} + + _jsii_.Create( + "k8s.KubeService", + []interface{}{scope, id, props}, + &j, + ) + + return &j +} + +// Defines a "io.k8s.api.core.v1.Service" API object. +func NewKubeService_Override(k KubeService, scope constructs.Construct, id *string, props *KubeServiceProps) { + _init_.Initialize() + + _jsii_.Create( + "k8s.KubeService", + []interface{}{scope, id, props}, + k, + ) +} + +// Checks if `x` is a construct. +// +// Use this method instead of `instanceof` to properly detect `Construct` +// instances, even when the construct library is symlinked. +// +// Explanation: in JavaScript, multiple copies of the `constructs` library on +// disk are seen as independent, completely different libraries. As a +// consequence, the class `Construct` in each copy of the `constructs` library +// is seen as a different class, and an instance of one class will not test as +// `instanceof` the other class. `npm install` will not create installations +// like this, but users may manually symlink construct libraries together or +// use a monorepo tool: in those cases, multiple copies of the `constructs` +// library can be accidentally installed, and `instanceof` will behave +// unpredictably. It is safest to avoid using `instanceof`, and using +// this type-testing method instead. +// +// Returns: true if `x` is an object created from a class which extends `Construct`. +func KubeService_IsConstruct(x interface{}) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "k8s.KubeService", + "isConstruct", + []interface{}{x}, + &returns, + ) + + return returns +} + +// Renders a Kubernetes manifest for "io.k8s.api.core.v1.Service". +// +// This can be used to inline resource manifests inside other objects (e.g. as templates). +func KubeService_Manifest(props *KubeServiceProps) interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "k8s.KubeService", + "manifest", + []interface{}{props}, + &returns, + ) + + return returns +} + +// Returns the `ApiObject` named `Resource` which is a child of the given construct. +// +// If `c` is an `ApiObject`, it is returned directly. Throws an +// exception if the construct does not have a child named `Default` _or_ if +// this child is not an `ApiObject`. +func KubeService_Of(c constructs.IConstruct) cdk8s.ApiObject { + _init_.Initialize() + + var returns cdk8s.ApiObject + + _jsii_.StaticInvoke( + "k8s.KubeService", + "of", + []interface{}{c}, + &returns, + ) + + return returns +} + +func KubeService_GVK() *cdk8s.GroupVersionKind { + _init_.Initialize() + var returns *cdk8s.GroupVersionKind + _jsii_.StaticGet( + "k8s.KubeService", + "GVK", + &returns, + ) + return returns +} + +func (k *jsiiProxy_KubeService) AddDependency(dependencies ...constructs.IConstruct) { + args := []interface{}{} + for _, a := range dependencies { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addDependency", + args, + ) +} + +func (k *jsiiProxy_KubeService) AddJsonPatch(ops ...cdk8s.JsonPatch) { + args := []interface{}{} + for _, a := range ops { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addJsonPatch", + args, + ) +} + +func (k *jsiiProxy_KubeService) ToJson() interface{} { + var returns interface{} + + _jsii_.Invoke( + k, + "toJson", + nil, // no parameters + &returns, + ) + + return returns +} + +func (k *jsiiProxy_KubeService) ToString() *string { + var returns *string + + _jsii_.Invoke( + k, + "toString", + nil, // no parameters + &returns, + ) + + return returns +} + +// ServiceAccount binds together: * a name, understood by users, and perhaps by peripheral systems, for an identity * a principal that can be authenticated and authorized * a set of secrets. +type KubeServiceAccount interface { + cdk8s.ApiObject + // The group portion of the API version (e.g. `authorization.k8s.io`). + ApiGroup() *string + // The object's API version (e.g. `authorization.k8s.io/v1`). + ApiVersion() *string + // The chart in which this object is defined. + Chart() cdk8s.Chart + // The object kind. + Kind() *string + // Metadata associated with this API object. + Metadata() cdk8s.ApiObjectMetadataDefinition + // The name of the API object. + // + // If a name is specified in `metadata.name` this will be the name returned. + // Otherwise, a name will be generated by calling + // `AddHelm.of(this).generatedObjectName(this)`, which by default uses the + // construct path to generate a DNS-compatible name for the resource. + Name() *string + // The tree node. + Node() constructs.Node + // Create a dependency between this ApiObject and other constructs. + // + // These can be other ApiObjects, Charts, or custom. + AddDependency(dependencies ...constructs.IConstruct) + // Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. + // + // Example: + // kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true)); + // + AddJsonPatch(ops ...cdk8s.JsonPatch) + // Renders the object to Kubernetes JSON. + ToJson() interface{} + // Returns a string representation of this construct. + ToString() *string +} + +// The jsii proxy struct for KubeServiceAccount +type jsiiProxy_KubeServiceAccount struct { + internal.Type__cdk8sApiObject +} + +func (j *jsiiProxy_KubeServiceAccount) ApiGroup() *string { + var returns *string + _jsii_.Get( + j, + "apiGroup", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeServiceAccount) ApiVersion() *string { + var returns *string + _jsii_.Get( + j, + "apiVersion", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeServiceAccount) Chart() cdk8s.Chart { + var returns cdk8s.Chart + _jsii_.Get( + j, + "chart", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeServiceAccount) Kind() *string { + var returns *string + _jsii_.Get( + j, + "kind", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeServiceAccount) Metadata() cdk8s.ApiObjectMetadataDefinition { + var returns cdk8s.ApiObjectMetadataDefinition + _jsii_.Get( + j, + "metadata", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeServiceAccount) Name() *string { + var returns *string + _jsii_.Get( + j, + "name", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeServiceAccount) Node() constructs.Node { + var returns constructs.Node + _jsii_.Get( + j, + "node", + &returns, + ) + return returns +} + +// Defines a "io.k8s.api.core.v1.ServiceAccount" API object. +func NewKubeServiceAccount(scope constructs.Construct, id *string, props *KubeServiceAccountProps) KubeServiceAccount { + _init_.Initialize() + + j := jsiiProxy_KubeServiceAccount{} + + _jsii_.Create( + "k8s.KubeServiceAccount", + []interface{}{scope, id, props}, + &j, + ) + + return &j +} + +// Defines a "io.k8s.api.core.v1.ServiceAccount" API object. +func NewKubeServiceAccount_Override(k KubeServiceAccount, scope constructs.Construct, id *string, props *KubeServiceAccountProps) { + _init_.Initialize() + + _jsii_.Create( + "k8s.KubeServiceAccount", + []interface{}{scope, id, props}, + k, + ) +} + +// Checks if `x` is a construct. +// +// Use this method instead of `instanceof` to properly detect `Construct` +// instances, even when the construct library is symlinked. +// +// Explanation: in JavaScript, multiple copies of the `constructs` library on +// disk are seen as independent, completely different libraries. As a +// consequence, the class `Construct` in each copy of the `constructs` library +// is seen as a different class, and an instance of one class will not test as +// `instanceof` the other class. `npm install` will not create installations +// like this, but users may manually symlink construct libraries together or +// use a monorepo tool: in those cases, multiple copies of the `constructs` +// library can be accidentally installed, and `instanceof` will behave +// unpredictably. It is safest to avoid using `instanceof`, and using +// this type-testing method instead. +// +// Returns: true if `x` is an object created from a class which extends `Construct`. +func KubeServiceAccount_IsConstruct(x interface{}) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "k8s.KubeServiceAccount", + "isConstruct", + []interface{}{x}, + &returns, + ) + + return returns +} + +// Renders a Kubernetes manifest for "io.k8s.api.core.v1.ServiceAccount". +// +// This can be used to inline resource manifests inside other objects (e.g. as templates). +func KubeServiceAccount_Manifest(props *KubeServiceAccountProps) interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "k8s.KubeServiceAccount", + "manifest", + []interface{}{props}, + &returns, + ) + + return returns +} + +// Returns the `ApiObject` named `Resource` which is a child of the given construct. +// +// If `c` is an `ApiObject`, it is returned directly. Throws an +// exception if the construct does not have a child named `Default` _or_ if +// this child is not an `ApiObject`. +func KubeServiceAccount_Of(c constructs.IConstruct) cdk8s.ApiObject { + _init_.Initialize() + + var returns cdk8s.ApiObject + + _jsii_.StaticInvoke( + "k8s.KubeServiceAccount", + "of", + []interface{}{c}, + &returns, + ) + + return returns +} + +func KubeServiceAccount_GVK() *cdk8s.GroupVersionKind { + _init_.Initialize() + var returns *cdk8s.GroupVersionKind + _jsii_.StaticGet( + "k8s.KubeServiceAccount", + "GVK", + &returns, + ) + return returns +} + +func (k *jsiiProxy_KubeServiceAccount) AddDependency(dependencies ...constructs.IConstruct) { + args := []interface{}{} + for _, a := range dependencies { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addDependency", + args, + ) +} + +func (k *jsiiProxy_KubeServiceAccount) AddJsonPatch(ops ...cdk8s.JsonPatch) { + args := []interface{}{} + for _, a := range ops { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addJsonPatch", + args, + ) +} + +func (k *jsiiProxy_KubeServiceAccount) ToJson() interface{} { + var returns interface{} + + _jsii_.Invoke( + k, + "toJson", + nil, // no parameters + &returns, + ) + + return returns +} + +func (k *jsiiProxy_KubeServiceAccount) ToString() *string { + var returns *string + + _jsii_.Invoke( + k, + "toString", + nil, // no parameters + &returns, + ) + + return returns +} + +// ServiceAccountList is a list of ServiceAccount objects. +type KubeServiceAccountList interface { + cdk8s.ApiObject + // The group portion of the API version (e.g. `authorization.k8s.io`). + ApiGroup() *string + // The object's API version (e.g. `authorization.k8s.io/v1`). + ApiVersion() *string + // The chart in which this object is defined. + Chart() cdk8s.Chart + // The object kind. + Kind() *string + // Metadata associated with this API object. + Metadata() cdk8s.ApiObjectMetadataDefinition + // The name of the API object. + // + // If a name is specified in `metadata.name` this will be the name returned. + // Otherwise, a name will be generated by calling + // `AddHelm.of(this).generatedObjectName(this)`, which by default uses the + // construct path to generate a DNS-compatible name for the resource. + Name() *string + // The tree node. + Node() constructs.Node + // Create a dependency between this ApiObject and other constructs. + // + // These can be other ApiObjects, Charts, or custom. + AddDependency(dependencies ...constructs.IConstruct) + // Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. + // + // Example: + // kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true)); + // + AddJsonPatch(ops ...cdk8s.JsonPatch) + // Renders the object to Kubernetes JSON. + ToJson() interface{} + // Returns a string representation of this construct. + ToString() *string +} + +// The jsii proxy struct for KubeServiceAccountList +type jsiiProxy_KubeServiceAccountList struct { + internal.Type__cdk8sApiObject +} + +func (j *jsiiProxy_KubeServiceAccountList) ApiGroup() *string { + var returns *string + _jsii_.Get( + j, + "apiGroup", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeServiceAccountList) ApiVersion() *string { + var returns *string + _jsii_.Get( + j, + "apiVersion", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeServiceAccountList) Chart() cdk8s.Chart { + var returns cdk8s.Chart + _jsii_.Get( + j, + "chart", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeServiceAccountList) Kind() *string { + var returns *string + _jsii_.Get( + j, + "kind", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeServiceAccountList) Metadata() cdk8s.ApiObjectMetadataDefinition { + var returns cdk8s.ApiObjectMetadataDefinition + _jsii_.Get( + j, + "metadata", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeServiceAccountList) Name() *string { + var returns *string + _jsii_.Get( + j, + "name", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeServiceAccountList) Node() constructs.Node { + var returns constructs.Node + _jsii_.Get( + j, + "node", + &returns, + ) + return returns +} + +// Defines a "io.k8s.api.core.v1.ServiceAccountList" API object. +func NewKubeServiceAccountList(scope constructs.Construct, id *string, props *KubeServiceAccountListProps) KubeServiceAccountList { + _init_.Initialize() + + j := jsiiProxy_KubeServiceAccountList{} + + _jsii_.Create( + "k8s.KubeServiceAccountList", + []interface{}{scope, id, props}, + &j, + ) + + return &j +} + +// Defines a "io.k8s.api.core.v1.ServiceAccountList" API object. +func NewKubeServiceAccountList_Override(k KubeServiceAccountList, scope constructs.Construct, id *string, props *KubeServiceAccountListProps) { + _init_.Initialize() + + _jsii_.Create( + "k8s.KubeServiceAccountList", + []interface{}{scope, id, props}, + k, + ) +} + +// Checks if `x` is a construct. +// +// Use this method instead of `instanceof` to properly detect `Construct` +// instances, even when the construct library is symlinked. +// +// Explanation: in JavaScript, multiple copies of the `constructs` library on +// disk are seen as independent, completely different libraries. As a +// consequence, the class `Construct` in each copy of the `constructs` library +// is seen as a different class, and an instance of one class will not test as +// `instanceof` the other class. `npm install` will not create installations +// like this, but users may manually symlink construct libraries together or +// use a monorepo tool: in those cases, multiple copies of the `constructs` +// library can be accidentally installed, and `instanceof` will behave +// unpredictably. It is safest to avoid using `instanceof`, and using +// this type-testing method instead. +// +// Returns: true if `x` is an object created from a class which extends `Construct`. +func KubeServiceAccountList_IsConstruct(x interface{}) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "k8s.KubeServiceAccountList", + "isConstruct", + []interface{}{x}, + &returns, + ) + + return returns +} + +// Renders a Kubernetes manifest for "io.k8s.api.core.v1.ServiceAccountList". +// +// This can be used to inline resource manifests inside other objects (e.g. as templates). +func KubeServiceAccountList_Manifest(props *KubeServiceAccountListProps) interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "k8s.KubeServiceAccountList", + "manifest", + []interface{}{props}, + &returns, + ) + + return returns +} + +// Returns the `ApiObject` named `Resource` which is a child of the given construct. +// +// If `c` is an `ApiObject`, it is returned directly. Throws an +// exception if the construct does not have a child named `Default` _or_ if +// this child is not an `ApiObject`. +func KubeServiceAccountList_Of(c constructs.IConstruct) cdk8s.ApiObject { + _init_.Initialize() + + var returns cdk8s.ApiObject + + _jsii_.StaticInvoke( + "k8s.KubeServiceAccountList", + "of", + []interface{}{c}, + &returns, + ) + + return returns +} + +func KubeServiceAccountList_GVK() *cdk8s.GroupVersionKind { + _init_.Initialize() + var returns *cdk8s.GroupVersionKind + _jsii_.StaticGet( + "k8s.KubeServiceAccountList", + "GVK", + &returns, + ) + return returns +} + +func (k *jsiiProxy_KubeServiceAccountList) AddDependency(dependencies ...constructs.IConstruct) { + args := []interface{}{} + for _, a := range dependencies { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addDependency", + args, + ) +} + +func (k *jsiiProxy_KubeServiceAccountList) AddJsonPatch(ops ...cdk8s.JsonPatch) { + args := []interface{}{} + for _, a := range ops { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addJsonPatch", + args, + ) +} + +func (k *jsiiProxy_KubeServiceAccountList) ToJson() interface{} { + var returns interface{} + + _jsii_.Invoke( + k, + "toJson", + nil, // no parameters + &returns, + ) + + return returns +} + +func (k *jsiiProxy_KubeServiceAccountList) ToString() *string { + var returns *string + + _jsii_.Invoke( + k, + "toString", + nil, // no parameters + &returns, + ) + + return returns +} + +// ServiceAccountList is a list of ServiceAccount objects. +type KubeServiceAccountListProps struct { + // List of ServiceAccounts. + // + // More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ + Items *[]*KubeServiceAccountProps `field:"required" json:"items" yaml:"items"` + // Standard list metadata. + // + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + Metadata *ListMeta `field:"optional" json:"metadata" yaml:"metadata"` +} + +// ServiceAccount binds together: * a name, understood by users, and perhaps by peripheral systems, for an identity * a principal that can be authenticated and authorized * a set of secrets. +type KubeServiceAccountProps struct { + // AutomountServiceAccountToken indicates whether pods running as this service account should have an API token automatically mounted. + // + // Can be overridden at the pod level. + AutomountServiceAccountToken *bool `field:"optional" json:"automountServiceAccountToken" yaml:"automountServiceAccountToken"` + // ImagePullSecrets is a list of references to secrets in the same namespace to use for pulling any images in pods that reference this ServiceAccount. + // + // ImagePullSecrets are distinct from Secrets because Secrets can be mounted in the pod, but ImagePullSecrets are only accessed by the kubelet. More info: https://kubernetes.io/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod + ImagePullSecrets *[]*LocalObjectReference `field:"optional" json:"imagePullSecrets" yaml:"imagePullSecrets"` + // Standard object's metadata. + // + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + Metadata *ObjectMeta `field:"optional" json:"metadata" yaml:"metadata"` + // Secrets is the list of secrets allowed to be used by pods running using this ServiceAccount. + // + // More info: https://kubernetes.io/docs/concepts/configuration/secret + Secrets *[]*ObjectReference `field:"optional" json:"secrets" yaml:"secrets"` +} + +// ServiceList holds a list of services. +type KubeServiceList interface { + cdk8s.ApiObject + // The group portion of the API version (e.g. `authorization.k8s.io`). + ApiGroup() *string + // The object's API version (e.g. `authorization.k8s.io/v1`). + ApiVersion() *string + // The chart in which this object is defined. + Chart() cdk8s.Chart + // The object kind. + Kind() *string + // Metadata associated with this API object. + Metadata() cdk8s.ApiObjectMetadataDefinition + // The name of the API object. + // + // If a name is specified in `metadata.name` this will be the name returned. + // Otherwise, a name will be generated by calling + // `AddHelm.of(this).generatedObjectName(this)`, which by default uses the + // construct path to generate a DNS-compatible name for the resource. + Name() *string + // The tree node. + Node() constructs.Node + // Create a dependency between this ApiObject and other constructs. + // + // These can be other ApiObjects, Charts, or custom. + AddDependency(dependencies ...constructs.IConstruct) + // Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. + // + // Example: + // kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true)); + // + AddJsonPatch(ops ...cdk8s.JsonPatch) + // Renders the object to Kubernetes JSON. + ToJson() interface{} + // Returns a string representation of this construct. + ToString() *string +} + +// The jsii proxy struct for KubeServiceList +type jsiiProxy_KubeServiceList struct { + internal.Type__cdk8sApiObject +} + +func (j *jsiiProxy_KubeServiceList) ApiGroup() *string { + var returns *string + _jsii_.Get( + j, + "apiGroup", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeServiceList) ApiVersion() *string { + var returns *string + _jsii_.Get( + j, + "apiVersion", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeServiceList) Chart() cdk8s.Chart { + var returns cdk8s.Chart + _jsii_.Get( + j, + "chart", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeServiceList) Kind() *string { + var returns *string + _jsii_.Get( + j, + "kind", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeServiceList) Metadata() cdk8s.ApiObjectMetadataDefinition { + var returns cdk8s.ApiObjectMetadataDefinition + _jsii_.Get( + j, + "metadata", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeServiceList) Name() *string { + var returns *string + _jsii_.Get( + j, + "name", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeServiceList) Node() constructs.Node { + var returns constructs.Node + _jsii_.Get( + j, + "node", + &returns, + ) + return returns +} + +// Defines a "io.k8s.api.core.v1.ServiceList" API object. +func NewKubeServiceList(scope constructs.Construct, id *string, props *KubeServiceListProps) KubeServiceList { + _init_.Initialize() + + j := jsiiProxy_KubeServiceList{} + + _jsii_.Create( + "k8s.KubeServiceList", + []interface{}{scope, id, props}, + &j, + ) + + return &j +} + +// Defines a "io.k8s.api.core.v1.ServiceList" API object. +func NewKubeServiceList_Override(k KubeServiceList, scope constructs.Construct, id *string, props *KubeServiceListProps) { + _init_.Initialize() + + _jsii_.Create( + "k8s.KubeServiceList", + []interface{}{scope, id, props}, + k, + ) +} + +// Checks if `x` is a construct. +// +// Use this method instead of `instanceof` to properly detect `Construct` +// instances, even when the construct library is symlinked. +// +// Explanation: in JavaScript, multiple copies of the `constructs` library on +// disk are seen as independent, completely different libraries. As a +// consequence, the class `Construct` in each copy of the `constructs` library +// is seen as a different class, and an instance of one class will not test as +// `instanceof` the other class. `npm install` will not create installations +// like this, but users may manually symlink construct libraries together or +// use a monorepo tool: in those cases, multiple copies of the `constructs` +// library can be accidentally installed, and `instanceof` will behave +// unpredictably. It is safest to avoid using `instanceof`, and using +// this type-testing method instead. +// +// Returns: true if `x` is an object created from a class which extends `Construct`. +func KubeServiceList_IsConstruct(x interface{}) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "k8s.KubeServiceList", + "isConstruct", + []interface{}{x}, + &returns, + ) + + return returns +} + +// Renders a Kubernetes manifest for "io.k8s.api.core.v1.ServiceList". +// +// This can be used to inline resource manifests inside other objects (e.g. as templates). +func KubeServiceList_Manifest(props *KubeServiceListProps) interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "k8s.KubeServiceList", + "manifest", + []interface{}{props}, + &returns, + ) + + return returns +} + +// Returns the `ApiObject` named `Resource` which is a child of the given construct. +// +// If `c` is an `ApiObject`, it is returned directly. Throws an +// exception if the construct does not have a child named `Default` _or_ if +// this child is not an `ApiObject`. +func KubeServiceList_Of(c constructs.IConstruct) cdk8s.ApiObject { + _init_.Initialize() + + var returns cdk8s.ApiObject + + _jsii_.StaticInvoke( + "k8s.KubeServiceList", + "of", + []interface{}{c}, + &returns, + ) + + return returns +} + +func KubeServiceList_GVK() *cdk8s.GroupVersionKind { + _init_.Initialize() + var returns *cdk8s.GroupVersionKind + _jsii_.StaticGet( + "k8s.KubeServiceList", + "GVK", + &returns, + ) + return returns +} + +func (k *jsiiProxy_KubeServiceList) AddDependency(dependencies ...constructs.IConstruct) { + args := []interface{}{} + for _, a := range dependencies { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addDependency", + args, + ) +} + +func (k *jsiiProxy_KubeServiceList) AddJsonPatch(ops ...cdk8s.JsonPatch) { + args := []interface{}{} + for _, a := range ops { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addJsonPatch", + args, + ) +} + +func (k *jsiiProxy_KubeServiceList) ToJson() interface{} { + var returns interface{} + + _jsii_.Invoke( + k, + "toJson", + nil, // no parameters + &returns, + ) + + return returns +} + +func (k *jsiiProxy_KubeServiceList) ToString() *string { + var returns *string + + _jsii_.Invoke( + k, + "toString", + nil, // no parameters + &returns, + ) + + return returns +} + +// ServiceList holds a list of services. +type KubeServiceListProps struct { + // List of services. + Items *[]*KubeServiceProps `field:"required" json:"items" yaml:"items"` + // Standard list metadata. + // + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + Metadata *ListMeta `field:"optional" json:"metadata" yaml:"metadata"` +} + +// Service is a named abstraction of software service (for example, mysql) consisting of local port (for example 3306) that the proxy listens on, and the selector that determines which pods will answer requests sent through the proxy. +type KubeServiceProps struct { + // Standard object's metadata. + // + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + Metadata *ObjectMeta `field:"optional" json:"metadata" yaml:"metadata"` + // Spec defines the behavior of a service. + // + // https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + Spec *ServiceSpec `field:"optional" json:"spec" yaml:"spec"` +} + +// StatefulSet represents a set of pods with consistent identities. +// +// Identities are defined as: +// - Network: A single stable DNS and hostname. +// - Storage: As many VolumeClaims as requested. +// The StatefulSet guarantees that a given network identity will always map to the same storage identity. +type KubeStatefulSet interface { + cdk8s.ApiObject + // The group portion of the API version (e.g. `authorization.k8s.io`). + ApiGroup() *string + // The object's API version (e.g. `authorization.k8s.io/v1`). + ApiVersion() *string + // The chart in which this object is defined. + Chart() cdk8s.Chart + // The object kind. + Kind() *string + // Metadata associated with this API object. + Metadata() cdk8s.ApiObjectMetadataDefinition + // The name of the API object. + // + // If a name is specified in `metadata.name` this will be the name returned. + // Otherwise, a name will be generated by calling + // `AddHelm.of(this).generatedObjectName(this)`, which by default uses the + // construct path to generate a DNS-compatible name for the resource. + Name() *string + // The tree node. + Node() constructs.Node + // Create a dependency between this ApiObject and other constructs. + // + // These can be other ApiObjects, Charts, or custom. + AddDependency(dependencies ...constructs.IConstruct) + // Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. + // + // Example: + // kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true)); + // + AddJsonPatch(ops ...cdk8s.JsonPatch) + // Renders the object to Kubernetes JSON. + ToJson() interface{} + // Returns a string representation of this construct. + ToString() *string +} + +// The jsii proxy struct for KubeStatefulSet +type jsiiProxy_KubeStatefulSet struct { + internal.Type__cdk8sApiObject +} + +func (j *jsiiProxy_KubeStatefulSet) ApiGroup() *string { + var returns *string + _jsii_.Get( + j, + "apiGroup", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeStatefulSet) ApiVersion() *string { + var returns *string + _jsii_.Get( + j, + "apiVersion", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeStatefulSet) Chart() cdk8s.Chart { + var returns cdk8s.Chart + _jsii_.Get( + j, + "chart", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeStatefulSet) Kind() *string { + var returns *string + _jsii_.Get( + j, + "kind", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeStatefulSet) Metadata() cdk8s.ApiObjectMetadataDefinition { + var returns cdk8s.ApiObjectMetadataDefinition + _jsii_.Get( + j, + "metadata", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeStatefulSet) Name() *string { + var returns *string + _jsii_.Get( + j, + "name", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeStatefulSet) Node() constructs.Node { + var returns constructs.Node + _jsii_.Get( + j, + "node", + &returns, + ) + return returns +} + +// Defines a "io.k8s.api.apps.v1.StatefulSet" API object. +func NewKubeStatefulSet(scope constructs.Construct, id *string, props *KubeStatefulSetProps) KubeStatefulSet { + _init_.Initialize() + + j := jsiiProxy_KubeStatefulSet{} + + _jsii_.Create( + "k8s.KubeStatefulSet", + []interface{}{scope, id, props}, + &j, + ) + + return &j +} + +// Defines a "io.k8s.api.apps.v1.StatefulSet" API object. +func NewKubeStatefulSet_Override(k KubeStatefulSet, scope constructs.Construct, id *string, props *KubeStatefulSetProps) { + _init_.Initialize() + + _jsii_.Create( + "k8s.KubeStatefulSet", + []interface{}{scope, id, props}, + k, + ) +} + +// Checks if `x` is a construct. +// +// Use this method instead of `instanceof` to properly detect `Construct` +// instances, even when the construct library is symlinked. +// +// Explanation: in JavaScript, multiple copies of the `constructs` library on +// disk are seen as independent, completely different libraries. As a +// consequence, the class `Construct` in each copy of the `constructs` library +// is seen as a different class, and an instance of one class will not test as +// `instanceof` the other class. `npm install` will not create installations +// like this, but users may manually symlink construct libraries together or +// use a monorepo tool: in those cases, multiple copies of the `constructs` +// library can be accidentally installed, and `instanceof` will behave +// unpredictably. It is safest to avoid using `instanceof`, and using +// this type-testing method instead. +// +// Returns: true if `x` is an object created from a class which extends `Construct`. +func KubeStatefulSet_IsConstruct(x interface{}) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "k8s.KubeStatefulSet", + "isConstruct", + []interface{}{x}, + &returns, + ) + + return returns +} + +// Renders a Kubernetes manifest for "io.k8s.api.apps.v1.StatefulSet". +// +// This can be used to inline resource manifests inside other objects (e.g. as templates). +func KubeStatefulSet_Manifest(props *KubeStatefulSetProps) interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "k8s.KubeStatefulSet", + "manifest", + []interface{}{props}, + &returns, + ) + + return returns +} + +// Returns the `ApiObject` named `Resource` which is a child of the given construct. +// +// If `c` is an `ApiObject`, it is returned directly. Throws an +// exception if the construct does not have a child named `Default` _or_ if +// this child is not an `ApiObject`. +func KubeStatefulSet_Of(c constructs.IConstruct) cdk8s.ApiObject { + _init_.Initialize() + + var returns cdk8s.ApiObject + + _jsii_.StaticInvoke( + "k8s.KubeStatefulSet", + "of", + []interface{}{c}, + &returns, + ) + + return returns +} + +func KubeStatefulSet_GVK() *cdk8s.GroupVersionKind { + _init_.Initialize() + var returns *cdk8s.GroupVersionKind + _jsii_.StaticGet( + "k8s.KubeStatefulSet", + "GVK", + &returns, + ) + return returns +} + +func (k *jsiiProxy_KubeStatefulSet) AddDependency(dependencies ...constructs.IConstruct) { + args := []interface{}{} + for _, a := range dependencies { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addDependency", + args, + ) +} + +func (k *jsiiProxy_KubeStatefulSet) AddJsonPatch(ops ...cdk8s.JsonPatch) { + args := []interface{}{} + for _, a := range ops { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addJsonPatch", + args, + ) +} + +func (k *jsiiProxy_KubeStatefulSet) ToJson() interface{} { + var returns interface{} + + _jsii_.Invoke( + k, + "toJson", + nil, // no parameters + &returns, + ) + + return returns +} + +func (k *jsiiProxy_KubeStatefulSet) ToString() *string { + var returns *string + + _jsii_.Invoke( + k, + "toString", + nil, // no parameters + &returns, + ) + + return returns +} + +// StatefulSetList is a collection of StatefulSets. +type KubeStatefulSetList interface { + cdk8s.ApiObject + // The group portion of the API version (e.g. `authorization.k8s.io`). + ApiGroup() *string + // The object's API version (e.g. `authorization.k8s.io/v1`). + ApiVersion() *string + // The chart in which this object is defined. + Chart() cdk8s.Chart + // The object kind. + Kind() *string + // Metadata associated with this API object. + Metadata() cdk8s.ApiObjectMetadataDefinition + // The name of the API object. + // + // If a name is specified in `metadata.name` this will be the name returned. + // Otherwise, a name will be generated by calling + // `AddHelm.of(this).generatedObjectName(this)`, which by default uses the + // construct path to generate a DNS-compatible name for the resource. + Name() *string + // The tree node. + Node() constructs.Node + // Create a dependency between this ApiObject and other constructs. + // + // These can be other ApiObjects, Charts, or custom. + AddDependency(dependencies ...constructs.IConstruct) + // Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. + // + // Example: + // kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true)); + // + AddJsonPatch(ops ...cdk8s.JsonPatch) + // Renders the object to Kubernetes JSON. + ToJson() interface{} + // Returns a string representation of this construct. + ToString() *string +} + +// The jsii proxy struct for KubeStatefulSetList +type jsiiProxy_KubeStatefulSetList struct { + internal.Type__cdk8sApiObject +} + +func (j *jsiiProxy_KubeStatefulSetList) ApiGroup() *string { + var returns *string + _jsii_.Get( + j, + "apiGroup", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeStatefulSetList) ApiVersion() *string { + var returns *string + _jsii_.Get( + j, + "apiVersion", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeStatefulSetList) Chart() cdk8s.Chart { + var returns cdk8s.Chart + _jsii_.Get( + j, + "chart", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeStatefulSetList) Kind() *string { + var returns *string + _jsii_.Get( + j, + "kind", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeStatefulSetList) Metadata() cdk8s.ApiObjectMetadataDefinition { + var returns cdk8s.ApiObjectMetadataDefinition + _jsii_.Get( + j, + "metadata", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeStatefulSetList) Name() *string { + var returns *string + _jsii_.Get( + j, + "name", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeStatefulSetList) Node() constructs.Node { + var returns constructs.Node + _jsii_.Get( + j, + "node", + &returns, + ) + return returns +} + +// Defines a "io.k8s.api.apps.v1.StatefulSetList" API object. +func NewKubeStatefulSetList(scope constructs.Construct, id *string, props *KubeStatefulSetListProps) KubeStatefulSetList { + _init_.Initialize() + + j := jsiiProxy_KubeStatefulSetList{} + + _jsii_.Create( + "k8s.KubeStatefulSetList", + []interface{}{scope, id, props}, + &j, + ) + + return &j +} + +// Defines a "io.k8s.api.apps.v1.StatefulSetList" API object. +func NewKubeStatefulSetList_Override(k KubeStatefulSetList, scope constructs.Construct, id *string, props *KubeStatefulSetListProps) { + _init_.Initialize() + + _jsii_.Create( + "k8s.KubeStatefulSetList", + []interface{}{scope, id, props}, + k, + ) +} + +// Checks if `x` is a construct. +// +// Use this method instead of `instanceof` to properly detect `Construct` +// instances, even when the construct library is symlinked. +// +// Explanation: in JavaScript, multiple copies of the `constructs` library on +// disk are seen as independent, completely different libraries. As a +// consequence, the class `Construct` in each copy of the `constructs` library +// is seen as a different class, and an instance of one class will not test as +// `instanceof` the other class. `npm install` will not create installations +// like this, but users may manually symlink construct libraries together or +// use a monorepo tool: in those cases, multiple copies of the `constructs` +// library can be accidentally installed, and `instanceof` will behave +// unpredictably. It is safest to avoid using `instanceof`, and using +// this type-testing method instead. +// +// Returns: true if `x` is an object created from a class which extends `Construct`. +func KubeStatefulSetList_IsConstruct(x interface{}) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "k8s.KubeStatefulSetList", + "isConstruct", + []interface{}{x}, + &returns, + ) + + return returns +} + +// Renders a Kubernetes manifest for "io.k8s.api.apps.v1.StatefulSetList". +// +// This can be used to inline resource manifests inside other objects (e.g. as templates). +func KubeStatefulSetList_Manifest(props *KubeStatefulSetListProps) interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "k8s.KubeStatefulSetList", + "manifest", + []interface{}{props}, + &returns, + ) + + return returns +} + +// Returns the `ApiObject` named `Resource` which is a child of the given construct. +// +// If `c` is an `ApiObject`, it is returned directly. Throws an +// exception if the construct does not have a child named `Default` _or_ if +// this child is not an `ApiObject`. +func KubeStatefulSetList_Of(c constructs.IConstruct) cdk8s.ApiObject { + _init_.Initialize() + + var returns cdk8s.ApiObject + + _jsii_.StaticInvoke( + "k8s.KubeStatefulSetList", + "of", + []interface{}{c}, + &returns, + ) + + return returns +} + +func KubeStatefulSetList_GVK() *cdk8s.GroupVersionKind { + _init_.Initialize() + var returns *cdk8s.GroupVersionKind + _jsii_.StaticGet( + "k8s.KubeStatefulSetList", + "GVK", + &returns, + ) + return returns +} + +func (k *jsiiProxy_KubeStatefulSetList) AddDependency(dependencies ...constructs.IConstruct) { + args := []interface{}{} + for _, a := range dependencies { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addDependency", + args, + ) +} + +func (k *jsiiProxy_KubeStatefulSetList) AddJsonPatch(ops ...cdk8s.JsonPatch) { + args := []interface{}{} + for _, a := range ops { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addJsonPatch", + args, + ) +} + +func (k *jsiiProxy_KubeStatefulSetList) ToJson() interface{} { + var returns interface{} + + _jsii_.Invoke( + k, + "toJson", + nil, // no parameters + &returns, + ) + + return returns +} + +func (k *jsiiProxy_KubeStatefulSetList) ToString() *string { + var returns *string + + _jsii_.Invoke( + k, + "toString", + nil, // no parameters + &returns, + ) + + return returns +} + +// StatefulSetList is a collection of StatefulSets. +type KubeStatefulSetListProps struct { + // Items is the list of stateful sets. + Items *[]*KubeStatefulSetProps `field:"required" json:"items" yaml:"items"` + // Standard list's metadata. + // + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + Metadata *ListMeta `field:"optional" json:"metadata" yaml:"metadata"` +} + +// StatefulSet represents a set of pods with consistent identities. +// +// Identities are defined as: +// - Network: A single stable DNS and hostname. +// - Storage: As many VolumeClaims as requested. +// The StatefulSet guarantees that a given network identity will always map to the same storage identity. +type KubeStatefulSetProps struct { + // Standard object's metadata. + // + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + Metadata *ObjectMeta `field:"optional" json:"metadata" yaml:"metadata"` + // Spec defines the desired identities of pods in this set. + Spec *StatefulSetSpec `field:"optional" json:"spec" yaml:"spec"` +} + +// Status is a return value for calls that don't return other objects. +type KubeStatus interface { + cdk8s.ApiObject + // The group portion of the API version (e.g. `authorization.k8s.io`). + ApiGroup() *string + // The object's API version (e.g. `authorization.k8s.io/v1`). + ApiVersion() *string + // The chart in which this object is defined. + Chart() cdk8s.Chart + // The object kind. + Kind() *string + // Metadata associated with this API object. + Metadata() cdk8s.ApiObjectMetadataDefinition + // The name of the API object. + // + // If a name is specified in `metadata.name` this will be the name returned. + // Otherwise, a name will be generated by calling + // `AddHelm.of(this).generatedObjectName(this)`, which by default uses the + // construct path to generate a DNS-compatible name for the resource. + Name() *string + // The tree node. + Node() constructs.Node + // Create a dependency between this ApiObject and other constructs. + // + // These can be other ApiObjects, Charts, or custom. + AddDependency(dependencies ...constructs.IConstruct) + // Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. + // + // Example: + // kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true)); + // + AddJsonPatch(ops ...cdk8s.JsonPatch) + // Renders the object to Kubernetes JSON. + ToJson() interface{} + // Returns a string representation of this construct. + ToString() *string +} + +// The jsii proxy struct for KubeStatus +type jsiiProxy_KubeStatus struct { + internal.Type__cdk8sApiObject +} + +func (j *jsiiProxy_KubeStatus) ApiGroup() *string { + var returns *string + _jsii_.Get( + j, + "apiGroup", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeStatus) ApiVersion() *string { + var returns *string + _jsii_.Get( + j, + "apiVersion", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeStatus) Chart() cdk8s.Chart { + var returns cdk8s.Chart + _jsii_.Get( + j, + "chart", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeStatus) Kind() *string { + var returns *string + _jsii_.Get( + j, + "kind", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeStatus) Metadata() cdk8s.ApiObjectMetadataDefinition { + var returns cdk8s.ApiObjectMetadataDefinition + _jsii_.Get( + j, + "metadata", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeStatus) Name() *string { + var returns *string + _jsii_.Get( + j, + "name", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeStatus) Node() constructs.Node { + var returns constructs.Node + _jsii_.Get( + j, + "node", + &returns, + ) + return returns +} + +// Defines a "io.k8s.apimachinery.pkg.apis.meta.v1.Status" API object. +func NewKubeStatus(scope constructs.Construct, id *string, props *KubeStatusProps) KubeStatus { + _init_.Initialize() + + j := jsiiProxy_KubeStatus{} + + _jsii_.Create( + "k8s.KubeStatus", + []interface{}{scope, id, props}, + &j, + ) + + return &j +} + +// Defines a "io.k8s.apimachinery.pkg.apis.meta.v1.Status" API object. +func NewKubeStatus_Override(k KubeStatus, scope constructs.Construct, id *string, props *KubeStatusProps) { + _init_.Initialize() + + _jsii_.Create( + "k8s.KubeStatus", + []interface{}{scope, id, props}, + k, + ) +} + +// Checks if `x` is a construct. +// +// Use this method instead of `instanceof` to properly detect `Construct` +// instances, even when the construct library is symlinked. +// +// Explanation: in JavaScript, multiple copies of the `constructs` library on +// disk are seen as independent, completely different libraries. As a +// consequence, the class `Construct` in each copy of the `constructs` library +// is seen as a different class, and an instance of one class will not test as +// `instanceof` the other class. `npm install` will not create installations +// like this, but users may manually symlink construct libraries together or +// use a monorepo tool: in those cases, multiple copies of the `constructs` +// library can be accidentally installed, and `instanceof` will behave +// unpredictably. It is safest to avoid using `instanceof`, and using +// this type-testing method instead. +// +// Returns: true if `x` is an object created from a class which extends `Construct`. +func KubeStatus_IsConstruct(x interface{}) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "k8s.KubeStatus", + "isConstruct", + []interface{}{x}, + &returns, + ) + + return returns +} + +// Renders a Kubernetes manifest for "io.k8s.apimachinery.pkg.apis.meta.v1.Status". +// +// This can be used to inline resource manifests inside other objects (e.g. as templates). +func KubeStatus_Manifest(props *KubeStatusProps) interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "k8s.KubeStatus", + "manifest", + []interface{}{props}, + &returns, + ) + + return returns +} + +// Returns the `ApiObject` named `Resource` which is a child of the given construct. +// +// If `c` is an `ApiObject`, it is returned directly. Throws an +// exception if the construct does not have a child named `Default` _or_ if +// this child is not an `ApiObject`. +func KubeStatus_Of(c constructs.IConstruct) cdk8s.ApiObject { + _init_.Initialize() + + var returns cdk8s.ApiObject + + _jsii_.StaticInvoke( + "k8s.KubeStatus", + "of", + []interface{}{c}, + &returns, + ) + + return returns +} + +func KubeStatus_GVK() *cdk8s.GroupVersionKind { + _init_.Initialize() + var returns *cdk8s.GroupVersionKind + _jsii_.StaticGet( + "k8s.KubeStatus", + "GVK", + &returns, + ) + return returns +} + +func (k *jsiiProxy_KubeStatus) AddDependency(dependencies ...constructs.IConstruct) { + args := []interface{}{} + for _, a := range dependencies { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addDependency", + args, + ) +} + +func (k *jsiiProxy_KubeStatus) AddJsonPatch(ops ...cdk8s.JsonPatch) { + args := []interface{}{} + for _, a := range ops { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addJsonPatch", + args, + ) +} + +func (k *jsiiProxy_KubeStatus) ToJson() interface{} { + var returns interface{} + + _jsii_.Invoke( + k, + "toJson", + nil, // no parameters + &returns, + ) + + return returns +} + +func (k *jsiiProxy_KubeStatus) ToString() *string { + var returns *string + + _jsii_.Invoke( + k, + "toString", + nil, // no parameters + &returns, + ) + + return returns +} + +// Status is a return value for calls that don't return other objects. +type KubeStatusProps struct { + // Suggested HTTP return code for this status, 0 if not set. + Code *float64 `field:"optional" json:"code" yaml:"code"` + // Extended data associated with the reason. + // + // Each reason may define its own extended details. This field is optional and the data returned is not guaranteed to conform to any schema except that defined by the reason type. + Details *StatusDetails `field:"optional" json:"details" yaml:"details"` + // A human-readable description of the status of this operation. + Message *string `field:"optional" json:"message" yaml:"message"` + // Standard list metadata. + // + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + Metadata *ListMeta `field:"optional" json:"metadata" yaml:"metadata"` + // A machine-readable description of why this operation is in the "Failure" status. + // + // If this value is empty there is no information available. A Reason clarifies an HTTP status code but does not override it. + Reason *string `field:"optional" json:"reason" yaml:"reason"` +} + +// StorageClass describes the parameters for a class of storage for which PersistentVolumes can be dynamically provisioned. +// +// StorageClasses are non-namespaced; the name of the storage class according to etcd is in ObjectMeta.Name. +type KubeStorageClass interface { + cdk8s.ApiObject + // The group portion of the API version (e.g. `authorization.k8s.io`). + ApiGroup() *string + // The object's API version (e.g. `authorization.k8s.io/v1`). + ApiVersion() *string + // The chart in which this object is defined. + Chart() cdk8s.Chart + // The object kind. + Kind() *string + // Metadata associated with this API object. + Metadata() cdk8s.ApiObjectMetadataDefinition + // The name of the API object. + // + // If a name is specified in `metadata.name` this will be the name returned. + // Otherwise, a name will be generated by calling + // `AddHelm.of(this).generatedObjectName(this)`, which by default uses the + // construct path to generate a DNS-compatible name for the resource. + Name() *string + // The tree node. + Node() constructs.Node + // Create a dependency between this ApiObject and other constructs. + // + // These can be other ApiObjects, Charts, or custom. + AddDependency(dependencies ...constructs.IConstruct) + // Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. + // + // Example: + // kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true)); + // + AddJsonPatch(ops ...cdk8s.JsonPatch) + // Renders the object to Kubernetes JSON. + ToJson() interface{} + // Returns a string representation of this construct. + ToString() *string +} + +// The jsii proxy struct for KubeStorageClass +type jsiiProxy_KubeStorageClass struct { + internal.Type__cdk8sApiObject +} + +func (j *jsiiProxy_KubeStorageClass) ApiGroup() *string { + var returns *string + _jsii_.Get( + j, + "apiGroup", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeStorageClass) ApiVersion() *string { + var returns *string + _jsii_.Get( + j, + "apiVersion", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeStorageClass) Chart() cdk8s.Chart { + var returns cdk8s.Chart + _jsii_.Get( + j, + "chart", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeStorageClass) Kind() *string { + var returns *string + _jsii_.Get( + j, + "kind", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeStorageClass) Metadata() cdk8s.ApiObjectMetadataDefinition { + var returns cdk8s.ApiObjectMetadataDefinition + _jsii_.Get( + j, + "metadata", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeStorageClass) Name() *string { + var returns *string + _jsii_.Get( + j, + "name", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeStorageClass) Node() constructs.Node { + var returns constructs.Node + _jsii_.Get( + j, + "node", + &returns, + ) + return returns +} + +// Defines a "io.k8s.api.storage.v1.StorageClass" API object. +func NewKubeStorageClass(scope constructs.Construct, id *string, props *KubeStorageClassProps) KubeStorageClass { + _init_.Initialize() + + j := jsiiProxy_KubeStorageClass{} + + _jsii_.Create( + "k8s.KubeStorageClass", + []interface{}{scope, id, props}, + &j, + ) + + return &j +} + +// Defines a "io.k8s.api.storage.v1.StorageClass" API object. +func NewKubeStorageClass_Override(k KubeStorageClass, scope constructs.Construct, id *string, props *KubeStorageClassProps) { + _init_.Initialize() + + _jsii_.Create( + "k8s.KubeStorageClass", + []interface{}{scope, id, props}, + k, + ) +} + +// Checks if `x` is a construct. +// +// Use this method instead of `instanceof` to properly detect `Construct` +// instances, even when the construct library is symlinked. +// +// Explanation: in JavaScript, multiple copies of the `constructs` library on +// disk are seen as independent, completely different libraries. As a +// consequence, the class `Construct` in each copy of the `constructs` library +// is seen as a different class, and an instance of one class will not test as +// `instanceof` the other class. `npm install` will not create installations +// like this, but users may manually symlink construct libraries together or +// use a monorepo tool: in those cases, multiple copies of the `constructs` +// library can be accidentally installed, and `instanceof` will behave +// unpredictably. It is safest to avoid using `instanceof`, and using +// this type-testing method instead. +// +// Returns: true if `x` is an object created from a class which extends `Construct`. +func KubeStorageClass_IsConstruct(x interface{}) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "k8s.KubeStorageClass", + "isConstruct", + []interface{}{x}, + &returns, + ) + + return returns +} + +// Renders a Kubernetes manifest for "io.k8s.api.storage.v1.StorageClass". +// +// This can be used to inline resource manifests inside other objects (e.g. as templates). +func KubeStorageClass_Manifest(props *KubeStorageClassProps) interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "k8s.KubeStorageClass", + "manifest", + []interface{}{props}, + &returns, + ) + + return returns +} + +// Returns the `ApiObject` named `Resource` which is a child of the given construct. +// +// If `c` is an `ApiObject`, it is returned directly. Throws an +// exception if the construct does not have a child named `Default` _or_ if +// this child is not an `ApiObject`. +func KubeStorageClass_Of(c constructs.IConstruct) cdk8s.ApiObject { + _init_.Initialize() + + var returns cdk8s.ApiObject + + _jsii_.StaticInvoke( + "k8s.KubeStorageClass", + "of", + []interface{}{c}, + &returns, + ) + + return returns +} + +func KubeStorageClass_GVK() *cdk8s.GroupVersionKind { + _init_.Initialize() + var returns *cdk8s.GroupVersionKind + _jsii_.StaticGet( + "k8s.KubeStorageClass", + "GVK", + &returns, + ) + return returns +} + +func (k *jsiiProxy_KubeStorageClass) AddDependency(dependencies ...constructs.IConstruct) { + args := []interface{}{} + for _, a := range dependencies { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addDependency", + args, + ) +} + +func (k *jsiiProxy_KubeStorageClass) AddJsonPatch(ops ...cdk8s.JsonPatch) { + args := []interface{}{} + for _, a := range ops { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addJsonPatch", + args, + ) +} + +func (k *jsiiProxy_KubeStorageClass) ToJson() interface{} { + var returns interface{} + + _jsii_.Invoke( + k, + "toJson", + nil, // no parameters + &returns, + ) + + return returns +} + +func (k *jsiiProxy_KubeStorageClass) ToString() *string { + var returns *string + + _jsii_.Invoke( + k, + "toString", + nil, // no parameters + &returns, + ) + + return returns +} + +// StorageClassList is a collection of storage classes. +type KubeStorageClassList interface { + cdk8s.ApiObject + // The group portion of the API version (e.g. `authorization.k8s.io`). + ApiGroup() *string + // The object's API version (e.g. `authorization.k8s.io/v1`). + ApiVersion() *string + // The chart in which this object is defined. + Chart() cdk8s.Chart + // The object kind. + Kind() *string + // Metadata associated with this API object. + Metadata() cdk8s.ApiObjectMetadataDefinition + // The name of the API object. + // + // If a name is specified in `metadata.name` this will be the name returned. + // Otherwise, a name will be generated by calling + // `AddHelm.of(this).generatedObjectName(this)`, which by default uses the + // construct path to generate a DNS-compatible name for the resource. + Name() *string + // The tree node. + Node() constructs.Node + // Create a dependency between this ApiObject and other constructs. + // + // These can be other ApiObjects, Charts, or custom. + AddDependency(dependencies ...constructs.IConstruct) + // Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. + // + // Example: + // kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true)); + // + AddJsonPatch(ops ...cdk8s.JsonPatch) + // Renders the object to Kubernetes JSON. + ToJson() interface{} + // Returns a string representation of this construct. + ToString() *string +} + +// The jsii proxy struct for KubeStorageClassList +type jsiiProxy_KubeStorageClassList struct { + internal.Type__cdk8sApiObject +} + +func (j *jsiiProxy_KubeStorageClassList) ApiGroup() *string { + var returns *string + _jsii_.Get( + j, + "apiGroup", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeStorageClassList) ApiVersion() *string { + var returns *string + _jsii_.Get( + j, + "apiVersion", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeStorageClassList) Chart() cdk8s.Chart { + var returns cdk8s.Chart + _jsii_.Get( + j, + "chart", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeStorageClassList) Kind() *string { + var returns *string + _jsii_.Get( + j, + "kind", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeStorageClassList) Metadata() cdk8s.ApiObjectMetadataDefinition { + var returns cdk8s.ApiObjectMetadataDefinition + _jsii_.Get( + j, + "metadata", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeStorageClassList) Name() *string { + var returns *string + _jsii_.Get( + j, + "name", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeStorageClassList) Node() constructs.Node { + var returns constructs.Node + _jsii_.Get( + j, + "node", + &returns, + ) + return returns +} + +// Defines a "io.k8s.api.storage.v1.StorageClassList" API object. +func NewKubeStorageClassList(scope constructs.Construct, id *string, props *KubeStorageClassListProps) KubeStorageClassList { + _init_.Initialize() + + j := jsiiProxy_KubeStorageClassList{} + + _jsii_.Create( + "k8s.KubeStorageClassList", + []interface{}{scope, id, props}, + &j, + ) + + return &j +} + +// Defines a "io.k8s.api.storage.v1.StorageClassList" API object. +func NewKubeStorageClassList_Override(k KubeStorageClassList, scope constructs.Construct, id *string, props *KubeStorageClassListProps) { + _init_.Initialize() + + _jsii_.Create( + "k8s.KubeStorageClassList", + []interface{}{scope, id, props}, + k, + ) +} + +// Checks if `x` is a construct. +// +// Use this method instead of `instanceof` to properly detect `Construct` +// instances, even when the construct library is symlinked. +// +// Explanation: in JavaScript, multiple copies of the `constructs` library on +// disk are seen as independent, completely different libraries. As a +// consequence, the class `Construct` in each copy of the `constructs` library +// is seen as a different class, and an instance of one class will not test as +// `instanceof` the other class. `npm install` will not create installations +// like this, but users may manually symlink construct libraries together or +// use a monorepo tool: in those cases, multiple copies of the `constructs` +// library can be accidentally installed, and `instanceof` will behave +// unpredictably. It is safest to avoid using `instanceof`, and using +// this type-testing method instead. +// +// Returns: true if `x` is an object created from a class which extends `Construct`. +func KubeStorageClassList_IsConstruct(x interface{}) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "k8s.KubeStorageClassList", + "isConstruct", + []interface{}{x}, + &returns, + ) + + return returns +} + +// Renders a Kubernetes manifest for "io.k8s.api.storage.v1.StorageClassList". +// +// This can be used to inline resource manifests inside other objects (e.g. as templates). +func KubeStorageClassList_Manifest(props *KubeStorageClassListProps) interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "k8s.KubeStorageClassList", + "manifest", + []interface{}{props}, + &returns, + ) + + return returns +} + +// Returns the `ApiObject` named `Resource` which is a child of the given construct. +// +// If `c` is an `ApiObject`, it is returned directly. Throws an +// exception if the construct does not have a child named `Default` _or_ if +// this child is not an `ApiObject`. +func KubeStorageClassList_Of(c constructs.IConstruct) cdk8s.ApiObject { + _init_.Initialize() + + var returns cdk8s.ApiObject + + _jsii_.StaticInvoke( + "k8s.KubeStorageClassList", + "of", + []interface{}{c}, + &returns, + ) + + return returns +} + +func KubeStorageClassList_GVK() *cdk8s.GroupVersionKind { + _init_.Initialize() + var returns *cdk8s.GroupVersionKind + _jsii_.StaticGet( + "k8s.KubeStorageClassList", + "GVK", + &returns, + ) + return returns +} + +func (k *jsiiProxy_KubeStorageClassList) AddDependency(dependencies ...constructs.IConstruct) { + args := []interface{}{} + for _, a := range dependencies { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addDependency", + args, + ) +} + +func (k *jsiiProxy_KubeStorageClassList) AddJsonPatch(ops ...cdk8s.JsonPatch) { + args := []interface{}{} + for _, a := range ops { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addJsonPatch", + args, + ) +} + +func (k *jsiiProxy_KubeStorageClassList) ToJson() interface{} { + var returns interface{} + + _jsii_.Invoke( + k, + "toJson", + nil, // no parameters + &returns, + ) + + return returns +} + +func (k *jsiiProxy_KubeStorageClassList) ToString() *string { + var returns *string + + _jsii_.Invoke( + k, + "toString", + nil, // no parameters + &returns, + ) + + return returns +} + +// StorageClassList is a collection of storage classes. +type KubeStorageClassListProps struct { + // Items is the list of StorageClasses. + Items *[]*KubeStorageClassProps `field:"required" json:"items" yaml:"items"` + // Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata. + Metadata *ListMeta `field:"optional" json:"metadata" yaml:"metadata"` +} + +// StorageClass describes the parameters for a class of storage for which PersistentVolumes can be dynamically provisioned. +// +// StorageClasses are non-namespaced; the name of the storage class according to etcd is in ObjectMeta.Name. +type KubeStorageClassProps struct { + // Provisioner indicates the type of the provisioner. + Provisioner *string `field:"required" json:"provisioner" yaml:"provisioner"` + // Restrict the node topologies where volumes can be dynamically provisioned. + // + // Each volume plugin defines its own supported topology specifications. An empty TopologySelectorTerm list means there is no topology restriction. This field is only honored by servers that enable the VolumeScheduling feature. + AllowedTopologies *[]*TopologySelectorTerm `field:"optional" json:"allowedTopologies" yaml:"allowedTopologies"` + // AllowVolumeExpansion shows whether the storage class allow volume expand. + AllowVolumeExpansion *bool `field:"optional" json:"allowVolumeExpansion" yaml:"allowVolumeExpansion"` + // Standard object's metadata. + // + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + Metadata *ObjectMeta `field:"optional" json:"metadata" yaml:"metadata"` + // Dynamically provisioned PersistentVolumes of this storage class are created with these mountOptions, e.g. ["ro", "soft"]. Not validated - mount of the PVs will simply fail if one is invalid. + MountOptions *[]*string `field:"optional" json:"mountOptions" yaml:"mountOptions"` + // Parameters holds the parameters for the provisioner that should create volumes of this storage class. + Parameters *map[string]*string `field:"optional" json:"parameters" yaml:"parameters"` + // Dynamically provisioned PersistentVolumes of this storage class are created with this reclaimPolicy. + // + // Defaults to Delete. + ReclaimPolicy *string `field:"optional" json:"reclaimPolicy" yaml:"reclaimPolicy"` + // VolumeBindingMode indicates how PersistentVolumeClaims should be provisioned and bound. + // + // When unset, VolumeBindingImmediate is used. This field is only honored by servers that enable the VolumeScheduling feature. + VolumeBindingMode *string `field:"optional" json:"volumeBindingMode" yaml:"volumeBindingMode"` +} + +// A list of StorageVersions. +type KubeStorageVersionListV1Alpha1 interface { + cdk8s.ApiObject + // The group portion of the API version (e.g. `authorization.k8s.io`). + ApiGroup() *string + // The object's API version (e.g. `authorization.k8s.io/v1`). + ApiVersion() *string + // The chart in which this object is defined. + Chart() cdk8s.Chart + // The object kind. + Kind() *string + // Metadata associated with this API object. + Metadata() cdk8s.ApiObjectMetadataDefinition + // The name of the API object. + // + // If a name is specified in `metadata.name` this will be the name returned. + // Otherwise, a name will be generated by calling + // `AddHelm.of(this).generatedObjectName(this)`, which by default uses the + // construct path to generate a DNS-compatible name for the resource. + Name() *string + // The tree node. + Node() constructs.Node + // Create a dependency between this ApiObject and other constructs. + // + // These can be other ApiObjects, Charts, or custom. + AddDependency(dependencies ...constructs.IConstruct) + // Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. + // + // Example: + // kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true)); + // + AddJsonPatch(ops ...cdk8s.JsonPatch) + // Renders the object to Kubernetes JSON. + ToJson() interface{} + // Returns a string representation of this construct. + ToString() *string +} + +// The jsii proxy struct for KubeStorageVersionListV1Alpha1 +type jsiiProxy_KubeStorageVersionListV1Alpha1 struct { + internal.Type__cdk8sApiObject +} + +func (j *jsiiProxy_KubeStorageVersionListV1Alpha1) ApiGroup() *string { + var returns *string + _jsii_.Get( + j, + "apiGroup", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeStorageVersionListV1Alpha1) ApiVersion() *string { + var returns *string + _jsii_.Get( + j, + "apiVersion", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeStorageVersionListV1Alpha1) Chart() cdk8s.Chart { + var returns cdk8s.Chart + _jsii_.Get( + j, + "chart", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeStorageVersionListV1Alpha1) Kind() *string { + var returns *string + _jsii_.Get( + j, + "kind", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeStorageVersionListV1Alpha1) Metadata() cdk8s.ApiObjectMetadataDefinition { + var returns cdk8s.ApiObjectMetadataDefinition + _jsii_.Get( + j, + "metadata", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeStorageVersionListV1Alpha1) Name() *string { + var returns *string + _jsii_.Get( + j, + "name", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeStorageVersionListV1Alpha1) Node() constructs.Node { + var returns constructs.Node + _jsii_.Get( + j, + "node", + &returns, + ) + return returns +} + +// Defines a "io.k8s.api.apiserverinternal.v1alpha1.StorageVersionList" API object. +func NewKubeStorageVersionListV1Alpha1(scope constructs.Construct, id *string, props *KubeStorageVersionListV1Alpha1Props) KubeStorageVersionListV1Alpha1 { + _init_.Initialize() + + j := jsiiProxy_KubeStorageVersionListV1Alpha1{} + + _jsii_.Create( + "k8s.KubeStorageVersionListV1Alpha1", + []interface{}{scope, id, props}, + &j, + ) + + return &j +} + +// Defines a "io.k8s.api.apiserverinternal.v1alpha1.StorageVersionList" API object. +func NewKubeStorageVersionListV1Alpha1_Override(k KubeStorageVersionListV1Alpha1, scope constructs.Construct, id *string, props *KubeStorageVersionListV1Alpha1Props) { + _init_.Initialize() + + _jsii_.Create( + "k8s.KubeStorageVersionListV1Alpha1", + []interface{}{scope, id, props}, + k, + ) +} + +// Checks if `x` is a construct. +// +// Use this method instead of `instanceof` to properly detect `Construct` +// instances, even when the construct library is symlinked. +// +// Explanation: in JavaScript, multiple copies of the `constructs` library on +// disk are seen as independent, completely different libraries. As a +// consequence, the class `Construct` in each copy of the `constructs` library +// is seen as a different class, and an instance of one class will not test as +// `instanceof` the other class. `npm install` will not create installations +// like this, but users may manually symlink construct libraries together or +// use a monorepo tool: in those cases, multiple copies of the `constructs` +// library can be accidentally installed, and `instanceof` will behave +// unpredictably. It is safest to avoid using `instanceof`, and using +// this type-testing method instead. +// +// Returns: true if `x` is an object created from a class which extends `Construct`. +func KubeStorageVersionListV1Alpha1_IsConstruct(x interface{}) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "k8s.KubeStorageVersionListV1Alpha1", + "isConstruct", + []interface{}{x}, + &returns, + ) + + return returns +} + +// Renders a Kubernetes manifest for "io.k8s.api.apiserverinternal.v1alpha1.StorageVersionList". +// +// This can be used to inline resource manifests inside other objects (e.g. as templates). +func KubeStorageVersionListV1Alpha1_Manifest(props *KubeStorageVersionListV1Alpha1Props) interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "k8s.KubeStorageVersionListV1Alpha1", + "manifest", + []interface{}{props}, + &returns, + ) + + return returns +} + +// Returns the `ApiObject` named `Resource` which is a child of the given construct. +// +// If `c` is an `ApiObject`, it is returned directly. Throws an +// exception if the construct does not have a child named `Default` _or_ if +// this child is not an `ApiObject`. +func KubeStorageVersionListV1Alpha1_Of(c constructs.IConstruct) cdk8s.ApiObject { + _init_.Initialize() + + var returns cdk8s.ApiObject + + _jsii_.StaticInvoke( + "k8s.KubeStorageVersionListV1Alpha1", + "of", + []interface{}{c}, + &returns, + ) + + return returns +} + +func KubeStorageVersionListV1Alpha1_GVK() *cdk8s.GroupVersionKind { + _init_.Initialize() + var returns *cdk8s.GroupVersionKind + _jsii_.StaticGet( + "k8s.KubeStorageVersionListV1Alpha1", + "GVK", + &returns, + ) + return returns +} + +func (k *jsiiProxy_KubeStorageVersionListV1Alpha1) AddDependency(dependencies ...constructs.IConstruct) { + args := []interface{}{} + for _, a := range dependencies { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addDependency", + args, + ) +} + +func (k *jsiiProxy_KubeStorageVersionListV1Alpha1) AddJsonPatch(ops ...cdk8s.JsonPatch) { + args := []interface{}{} + for _, a := range ops { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addJsonPatch", + args, + ) +} + +func (k *jsiiProxy_KubeStorageVersionListV1Alpha1) ToJson() interface{} { + var returns interface{} + + _jsii_.Invoke( + k, + "toJson", + nil, // no parameters + &returns, + ) + + return returns +} + +func (k *jsiiProxy_KubeStorageVersionListV1Alpha1) ToString() *string { + var returns *string + + _jsii_.Invoke( + k, + "toString", + nil, // no parameters + &returns, + ) + + return returns +} + +// A list of StorageVersions. +type KubeStorageVersionListV1Alpha1Props struct { + // Items holds a list of StorageVersion. + Items *[]*KubeStorageVersionV1Alpha1Props `field:"required" json:"items" yaml:"items"` + // Standard list metadata. + // + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + Metadata *ListMeta `field:"optional" json:"metadata" yaml:"metadata"` +} + +// Storage version of a specific resource. +type KubeStorageVersionV1Alpha1 interface { + cdk8s.ApiObject + // The group portion of the API version (e.g. `authorization.k8s.io`). + ApiGroup() *string + // The object's API version (e.g. `authorization.k8s.io/v1`). + ApiVersion() *string + // The chart in which this object is defined. + Chart() cdk8s.Chart + // The object kind. + Kind() *string + // Metadata associated with this API object. + Metadata() cdk8s.ApiObjectMetadataDefinition + // The name of the API object. + // + // If a name is specified in `metadata.name` this will be the name returned. + // Otherwise, a name will be generated by calling + // `AddHelm.of(this).generatedObjectName(this)`, which by default uses the + // construct path to generate a DNS-compatible name for the resource. + Name() *string + // The tree node. + Node() constructs.Node + // Create a dependency between this ApiObject and other constructs. + // + // These can be other ApiObjects, Charts, or custom. + AddDependency(dependencies ...constructs.IConstruct) + // Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. + // + // Example: + // kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true)); + // + AddJsonPatch(ops ...cdk8s.JsonPatch) + // Renders the object to Kubernetes JSON. + ToJson() interface{} + // Returns a string representation of this construct. + ToString() *string +} + +// The jsii proxy struct for KubeStorageVersionV1Alpha1 +type jsiiProxy_KubeStorageVersionV1Alpha1 struct { + internal.Type__cdk8sApiObject +} + +func (j *jsiiProxy_KubeStorageVersionV1Alpha1) ApiGroup() *string { + var returns *string + _jsii_.Get( + j, + "apiGroup", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeStorageVersionV1Alpha1) ApiVersion() *string { + var returns *string + _jsii_.Get( + j, + "apiVersion", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeStorageVersionV1Alpha1) Chart() cdk8s.Chart { + var returns cdk8s.Chart + _jsii_.Get( + j, + "chart", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeStorageVersionV1Alpha1) Kind() *string { + var returns *string + _jsii_.Get( + j, + "kind", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeStorageVersionV1Alpha1) Metadata() cdk8s.ApiObjectMetadataDefinition { + var returns cdk8s.ApiObjectMetadataDefinition + _jsii_.Get( + j, + "metadata", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeStorageVersionV1Alpha1) Name() *string { + var returns *string + _jsii_.Get( + j, + "name", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeStorageVersionV1Alpha1) Node() constructs.Node { + var returns constructs.Node + _jsii_.Get( + j, + "node", + &returns, + ) + return returns +} + +// Defines a "io.k8s.api.apiserverinternal.v1alpha1.StorageVersion" API object. +func NewKubeStorageVersionV1Alpha1(scope constructs.Construct, id *string, props *KubeStorageVersionV1Alpha1Props) KubeStorageVersionV1Alpha1 { + _init_.Initialize() + + j := jsiiProxy_KubeStorageVersionV1Alpha1{} + + _jsii_.Create( + "k8s.KubeStorageVersionV1Alpha1", + []interface{}{scope, id, props}, + &j, + ) + + return &j +} + +// Defines a "io.k8s.api.apiserverinternal.v1alpha1.StorageVersion" API object. +func NewKubeStorageVersionV1Alpha1_Override(k KubeStorageVersionV1Alpha1, scope constructs.Construct, id *string, props *KubeStorageVersionV1Alpha1Props) { + _init_.Initialize() + + _jsii_.Create( + "k8s.KubeStorageVersionV1Alpha1", + []interface{}{scope, id, props}, + k, + ) +} + +// Checks if `x` is a construct. +// +// Use this method instead of `instanceof` to properly detect `Construct` +// instances, even when the construct library is symlinked. +// +// Explanation: in JavaScript, multiple copies of the `constructs` library on +// disk are seen as independent, completely different libraries. As a +// consequence, the class `Construct` in each copy of the `constructs` library +// is seen as a different class, and an instance of one class will not test as +// `instanceof` the other class. `npm install` will not create installations +// like this, but users may manually symlink construct libraries together or +// use a monorepo tool: in those cases, multiple copies of the `constructs` +// library can be accidentally installed, and `instanceof` will behave +// unpredictably. It is safest to avoid using `instanceof`, and using +// this type-testing method instead. +// +// Returns: true if `x` is an object created from a class which extends `Construct`. +func KubeStorageVersionV1Alpha1_IsConstruct(x interface{}) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "k8s.KubeStorageVersionV1Alpha1", + "isConstruct", + []interface{}{x}, + &returns, + ) + + return returns +} + +// Renders a Kubernetes manifest for "io.k8s.api.apiserverinternal.v1alpha1.StorageVersion". +// +// This can be used to inline resource manifests inside other objects (e.g. as templates). +func KubeStorageVersionV1Alpha1_Manifest(props *KubeStorageVersionV1Alpha1Props) interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "k8s.KubeStorageVersionV1Alpha1", + "manifest", + []interface{}{props}, + &returns, + ) + + return returns +} + +// Returns the `ApiObject` named `Resource` which is a child of the given construct. +// +// If `c` is an `ApiObject`, it is returned directly. Throws an +// exception if the construct does not have a child named `Default` _or_ if +// this child is not an `ApiObject`. +func KubeStorageVersionV1Alpha1_Of(c constructs.IConstruct) cdk8s.ApiObject { + _init_.Initialize() + + var returns cdk8s.ApiObject + + _jsii_.StaticInvoke( + "k8s.KubeStorageVersionV1Alpha1", + "of", + []interface{}{c}, + &returns, + ) + + return returns +} + +func KubeStorageVersionV1Alpha1_GVK() *cdk8s.GroupVersionKind { + _init_.Initialize() + var returns *cdk8s.GroupVersionKind + _jsii_.StaticGet( + "k8s.KubeStorageVersionV1Alpha1", + "GVK", + &returns, + ) + return returns +} + +func (k *jsiiProxy_KubeStorageVersionV1Alpha1) AddDependency(dependencies ...constructs.IConstruct) { + args := []interface{}{} + for _, a := range dependencies { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addDependency", + args, + ) +} + +func (k *jsiiProxy_KubeStorageVersionV1Alpha1) AddJsonPatch(ops ...cdk8s.JsonPatch) { + args := []interface{}{} + for _, a := range ops { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addJsonPatch", + args, + ) +} + +func (k *jsiiProxy_KubeStorageVersionV1Alpha1) ToJson() interface{} { + var returns interface{} + + _jsii_.Invoke( + k, + "toJson", + nil, // no parameters + &returns, + ) + + return returns +} + +func (k *jsiiProxy_KubeStorageVersionV1Alpha1) ToString() *string { + var returns *string + + _jsii_.Invoke( + k, + "toString", + nil, // no parameters + &returns, + ) + + return returns +} + +// Storage version of a specific resource. +type KubeStorageVersionV1Alpha1Props struct { + // Spec is an empty spec. + // + // It is here to comply with Kubernetes API style. + Spec interface{} `field:"required" json:"spec" yaml:"spec"` + // The name is .. + Metadata *ObjectMeta `field:"optional" json:"metadata" yaml:"metadata"` +} + +// SubjectAccessReview checks whether or not a user or group can perform an action. +type KubeSubjectAccessReview interface { + cdk8s.ApiObject + // The group portion of the API version (e.g. `authorization.k8s.io`). + ApiGroup() *string + // The object's API version (e.g. `authorization.k8s.io/v1`). + ApiVersion() *string + // The chart in which this object is defined. + Chart() cdk8s.Chart + // The object kind. + Kind() *string + // Metadata associated with this API object. + Metadata() cdk8s.ApiObjectMetadataDefinition + // The name of the API object. + // + // If a name is specified in `metadata.name` this will be the name returned. + // Otherwise, a name will be generated by calling + // `AddHelm.of(this).generatedObjectName(this)`, which by default uses the + // construct path to generate a DNS-compatible name for the resource. + Name() *string + // The tree node. + Node() constructs.Node + // Create a dependency between this ApiObject and other constructs. + // + // These can be other ApiObjects, Charts, or custom. + AddDependency(dependencies ...constructs.IConstruct) + // Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. + // + // Example: + // kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true)); + // + AddJsonPatch(ops ...cdk8s.JsonPatch) + // Renders the object to Kubernetes JSON. + ToJson() interface{} + // Returns a string representation of this construct. + ToString() *string +} + +// The jsii proxy struct for KubeSubjectAccessReview +type jsiiProxy_KubeSubjectAccessReview struct { + internal.Type__cdk8sApiObject +} + +func (j *jsiiProxy_KubeSubjectAccessReview) ApiGroup() *string { + var returns *string + _jsii_.Get( + j, + "apiGroup", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeSubjectAccessReview) ApiVersion() *string { + var returns *string + _jsii_.Get( + j, + "apiVersion", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeSubjectAccessReview) Chart() cdk8s.Chart { + var returns cdk8s.Chart + _jsii_.Get( + j, + "chart", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeSubjectAccessReview) Kind() *string { + var returns *string + _jsii_.Get( + j, + "kind", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeSubjectAccessReview) Metadata() cdk8s.ApiObjectMetadataDefinition { + var returns cdk8s.ApiObjectMetadataDefinition + _jsii_.Get( + j, + "metadata", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeSubjectAccessReview) Name() *string { + var returns *string + _jsii_.Get( + j, + "name", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeSubjectAccessReview) Node() constructs.Node { + var returns constructs.Node + _jsii_.Get( + j, + "node", + &returns, + ) + return returns +} + +// Defines a "io.k8s.api.authorization.v1.SubjectAccessReview" API object. +func NewKubeSubjectAccessReview(scope constructs.Construct, id *string, props *KubeSubjectAccessReviewProps) KubeSubjectAccessReview { + _init_.Initialize() + + j := jsiiProxy_KubeSubjectAccessReview{} + + _jsii_.Create( + "k8s.KubeSubjectAccessReview", + []interface{}{scope, id, props}, + &j, + ) + + return &j +} + +// Defines a "io.k8s.api.authorization.v1.SubjectAccessReview" API object. +func NewKubeSubjectAccessReview_Override(k KubeSubjectAccessReview, scope constructs.Construct, id *string, props *KubeSubjectAccessReviewProps) { + _init_.Initialize() + + _jsii_.Create( + "k8s.KubeSubjectAccessReview", + []interface{}{scope, id, props}, + k, + ) +} + +// Checks if `x` is a construct. +// +// Use this method instead of `instanceof` to properly detect `Construct` +// instances, even when the construct library is symlinked. +// +// Explanation: in JavaScript, multiple copies of the `constructs` library on +// disk are seen as independent, completely different libraries. As a +// consequence, the class `Construct` in each copy of the `constructs` library +// is seen as a different class, and an instance of one class will not test as +// `instanceof` the other class. `npm install` will not create installations +// like this, but users may manually symlink construct libraries together or +// use a monorepo tool: in those cases, multiple copies of the `constructs` +// library can be accidentally installed, and `instanceof` will behave +// unpredictably. It is safest to avoid using `instanceof`, and using +// this type-testing method instead. +// +// Returns: true if `x` is an object created from a class which extends `Construct`. +func KubeSubjectAccessReview_IsConstruct(x interface{}) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "k8s.KubeSubjectAccessReview", + "isConstruct", + []interface{}{x}, + &returns, + ) + + return returns +} + +// Renders a Kubernetes manifest for "io.k8s.api.authorization.v1.SubjectAccessReview". +// +// This can be used to inline resource manifests inside other objects (e.g. as templates). +func KubeSubjectAccessReview_Manifest(props *KubeSubjectAccessReviewProps) interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "k8s.KubeSubjectAccessReview", + "manifest", + []interface{}{props}, + &returns, + ) + + return returns +} + +// Returns the `ApiObject` named `Resource` which is a child of the given construct. +// +// If `c` is an `ApiObject`, it is returned directly. Throws an +// exception if the construct does not have a child named `Default` _or_ if +// this child is not an `ApiObject`. +func KubeSubjectAccessReview_Of(c constructs.IConstruct) cdk8s.ApiObject { + _init_.Initialize() + + var returns cdk8s.ApiObject + + _jsii_.StaticInvoke( + "k8s.KubeSubjectAccessReview", + "of", + []interface{}{c}, + &returns, + ) + + return returns +} + +func KubeSubjectAccessReview_GVK() *cdk8s.GroupVersionKind { + _init_.Initialize() + var returns *cdk8s.GroupVersionKind + _jsii_.StaticGet( + "k8s.KubeSubjectAccessReview", + "GVK", + &returns, + ) + return returns +} + +func (k *jsiiProxy_KubeSubjectAccessReview) AddDependency(dependencies ...constructs.IConstruct) { + args := []interface{}{} + for _, a := range dependencies { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addDependency", + args, + ) +} + +func (k *jsiiProxy_KubeSubjectAccessReview) AddJsonPatch(ops ...cdk8s.JsonPatch) { + args := []interface{}{} + for _, a := range ops { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addJsonPatch", + args, + ) +} + +func (k *jsiiProxy_KubeSubjectAccessReview) ToJson() interface{} { + var returns interface{} + + _jsii_.Invoke( + k, + "toJson", + nil, // no parameters + &returns, + ) + + return returns +} + +func (k *jsiiProxy_KubeSubjectAccessReview) ToString() *string { + var returns *string + + _jsii_.Invoke( + k, + "toString", + nil, // no parameters + &returns, + ) + + return returns +} + +// SubjectAccessReview checks whether or not a user or group can perform an action. +type KubeSubjectAccessReviewProps struct { + // Spec holds information about the request being evaluated. + Spec *SubjectAccessReviewSpec `field:"required" json:"spec" yaml:"spec"` + // Standard list metadata. + // + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + Metadata *ObjectMeta `field:"optional" json:"metadata" yaml:"metadata"` +} + +// TokenRequest requests a token for a given service account. +type KubeTokenRequest interface { + cdk8s.ApiObject + // The group portion of the API version (e.g. `authorization.k8s.io`). + ApiGroup() *string + // The object's API version (e.g. `authorization.k8s.io/v1`). + ApiVersion() *string + // The chart in which this object is defined. + Chart() cdk8s.Chart + // The object kind. + Kind() *string + // Metadata associated with this API object. + Metadata() cdk8s.ApiObjectMetadataDefinition + // The name of the API object. + // + // If a name is specified in `metadata.name` this will be the name returned. + // Otherwise, a name will be generated by calling + // `AddHelm.of(this).generatedObjectName(this)`, which by default uses the + // construct path to generate a DNS-compatible name for the resource. + Name() *string + // The tree node. + Node() constructs.Node + // Create a dependency between this ApiObject and other constructs. + // + // These can be other ApiObjects, Charts, or custom. + AddDependency(dependencies ...constructs.IConstruct) + // Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. + // + // Example: + // kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true)); + // + AddJsonPatch(ops ...cdk8s.JsonPatch) + // Renders the object to Kubernetes JSON. + ToJson() interface{} + // Returns a string representation of this construct. + ToString() *string +} + +// The jsii proxy struct for KubeTokenRequest +type jsiiProxy_KubeTokenRequest struct { + internal.Type__cdk8sApiObject +} + +func (j *jsiiProxy_KubeTokenRequest) ApiGroup() *string { + var returns *string + _jsii_.Get( + j, + "apiGroup", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeTokenRequest) ApiVersion() *string { + var returns *string + _jsii_.Get( + j, + "apiVersion", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeTokenRequest) Chart() cdk8s.Chart { + var returns cdk8s.Chart + _jsii_.Get( + j, + "chart", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeTokenRequest) Kind() *string { + var returns *string + _jsii_.Get( + j, + "kind", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeTokenRequest) Metadata() cdk8s.ApiObjectMetadataDefinition { + var returns cdk8s.ApiObjectMetadataDefinition + _jsii_.Get( + j, + "metadata", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeTokenRequest) Name() *string { + var returns *string + _jsii_.Get( + j, + "name", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeTokenRequest) Node() constructs.Node { + var returns constructs.Node + _jsii_.Get( + j, + "node", + &returns, + ) + return returns +} + +// Defines a "io.k8s.api.authentication.v1.TokenRequest" API object. +func NewKubeTokenRequest(scope constructs.Construct, id *string, props *KubeTokenRequestProps) KubeTokenRequest { + _init_.Initialize() + + j := jsiiProxy_KubeTokenRequest{} + + _jsii_.Create( + "k8s.KubeTokenRequest", + []interface{}{scope, id, props}, + &j, + ) + + return &j +} + +// Defines a "io.k8s.api.authentication.v1.TokenRequest" API object. +func NewKubeTokenRequest_Override(k KubeTokenRequest, scope constructs.Construct, id *string, props *KubeTokenRequestProps) { + _init_.Initialize() + + _jsii_.Create( + "k8s.KubeTokenRequest", + []interface{}{scope, id, props}, + k, + ) +} + +// Checks if `x` is a construct. +// +// Use this method instead of `instanceof` to properly detect `Construct` +// instances, even when the construct library is symlinked. +// +// Explanation: in JavaScript, multiple copies of the `constructs` library on +// disk are seen as independent, completely different libraries. As a +// consequence, the class `Construct` in each copy of the `constructs` library +// is seen as a different class, and an instance of one class will not test as +// `instanceof` the other class. `npm install` will not create installations +// like this, but users may manually symlink construct libraries together or +// use a monorepo tool: in those cases, multiple copies of the `constructs` +// library can be accidentally installed, and `instanceof` will behave +// unpredictably. It is safest to avoid using `instanceof`, and using +// this type-testing method instead. +// +// Returns: true if `x` is an object created from a class which extends `Construct`. +func KubeTokenRequest_IsConstruct(x interface{}) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "k8s.KubeTokenRequest", + "isConstruct", + []interface{}{x}, + &returns, + ) + + return returns +} + +// Renders a Kubernetes manifest for "io.k8s.api.authentication.v1.TokenRequest". +// +// This can be used to inline resource manifests inside other objects (e.g. as templates). +func KubeTokenRequest_Manifest(props *KubeTokenRequestProps) interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "k8s.KubeTokenRequest", + "manifest", + []interface{}{props}, + &returns, + ) + + return returns +} + +// Returns the `ApiObject` named `Resource` which is a child of the given construct. +// +// If `c` is an `ApiObject`, it is returned directly. Throws an +// exception if the construct does not have a child named `Default` _or_ if +// this child is not an `ApiObject`. +func KubeTokenRequest_Of(c constructs.IConstruct) cdk8s.ApiObject { + _init_.Initialize() + + var returns cdk8s.ApiObject + + _jsii_.StaticInvoke( + "k8s.KubeTokenRequest", + "of", + []interface{}{c}, + &returns, + ) + + return returns +} + +func KubeTokenRequest_GVK() *cdk8s.GroupVersionKind { + _init_.Initialize() + var returns *cdk8s.GroupVersionKind + _jsii_.StaticGet( + "k8s.KubeTokenRequest", + "GVK", + &returns, + ) + return returns +} + +func (k *jsiiProxy_KubeTokenRequest) AddDependency(dependencies ...constructs.IConstruct) { + args := []interface{}{} + for _, a := range dependencies { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addDependency", + args, + ) +} + +func (k *jsiiProxy_KubeTokenRequest) AddJsonPatch(ops ...cdk8s.JsonPatch) { + args := []interface{}{} + for _, a := range ops { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addJsonPatch", + args, + ) +} + +func (k *jsiiProxy_KubeTokenRequest) ToJson() interface{} { + var returns interface{} + + _jsii_.Invoke( + k, + "toJson", + nil, // no parameters + &returns, + ) + + return returns +} + +func (k *jsiiProxy_KubeTokenRequest) ToString() *string { + var returns *string + + _jsii_.Invoke( + k, + "toString", + nil, // no parameters + &returns, + ) + + return returns +} + +// TokenRequest requests a token for a given service account. +type KubeTokenRequestProps struct { + // Spec holds information about the request being evaluated. + Spec *TokenRequestSpec `field:"required" json:"spec" yaml:"spec"` + // Standard object's metadata. + // + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + Metadata *ObjectMeta `field:"optional" json:"metadata" yaml:"metadata"` +} + +// TokenReview attempts to authenticate a token to a known user. +// +// Note: TokenReview requests may be cached by the webhook token authenticator plugin in the kube-apiserver. +type KubeTokenReview interface { + cdk8s.ApiObject + // The group portion of the API version (e.g. `authorization.k8s.io`). + ApiGroup() *string + // The object's API version (e.g. `authorization.k8s.io/v1`). + ApiVersion() *string + // The chart in which this object is defined. + Chart() cdk8s.Chart + // The object kind. + Kind() *string + // Metadata associated with this API object. + Metadata() cdk8s.ApiObjectMetadataDefinition + // The name of the API object. + // + // If a name is specified in `metadata.name` this will be the name returned. + // Otherwise, a name will be generated by calling + // `AddHelm.of(this).generatedObjectName(this)`, which by default uses the + // construct path to generate a DNS-compatible name for the resource. + Name() *string + // The tree node. + Node() constructs.Node + // Create a dependency between this ApiObject and other constructs. + // + // These can be other ApiObjects, Charts, or custom. + AddDependency(dependencies ...constructs.IConstruct) + // Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. + // + // Example: + // kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true)); + // + AddJsonPatch(ops ...cdk8s.JsonPatch) + // Renders the object to Kubernetes JSON. + ToJson() interface{} + // Returns a string representation of this construct. + ToString() *string +} + +// The jsii proxy struct for KubeTokenReview +type jsiiProxy_KubeTokenReview struct { + internal.Type__cdk8sApiObject +} + +func (j *jsiiProxy_KubeTokenReview) ApiGroup() *string { + var returns *string + _jsii_.Get( + j, + "apiGroup", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeTokenReview) ApiVersion() *string { + var returns *string + _jsii_.Get( + j, + "apiVersion", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeTokenReview) Chart() cdk8s.Chart { + var returns cdk8s.Chart + _jsii_.Get( + j, + "chart", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeTokenReview) Kind() *string { + var returns *string + _jsii_.Get( + j, + "kind", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeTokenReview) Metadata() cdk8s.ApiObjectMetadataDefinition { + var returns cdk8s.ApiObjectMetadataDefinition + _jsii_.Get( + j, + "metadata", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeTokenReview) Name() *string { + var returns *string + _jsii_.Get( + j, + "name", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeTokenReview) Node() constructs.Node { + var returns constructs.Node + _jsii_.Get( + j, + "node", + &returns, + ) + return returns +} + +// Defines a "io.k8s.api.authentication.v1.TokenReview" API object. +func NewKubeTokenReview(scope constructs.Construct, id *string, props *KubeTokenReviewProps) KubeTokenReview { + _init_.Initialize() + + j := jsiiProxy_KubeTokenReview{} + + _jsii_.Create( + "k8s.KubeTokenReview", + []interface{}{scope, id, props}, + &j, + ) + + return &j +} + +// Defines a "io.k8s.api.authentication.v1.TokenReview" API object. +func NewKubeTokenReview_Override(k KubeTokenReview, scope constructs.Construct, id *string, props *KubeTokenReviewProps) { + _init_.Initialize() + + _jsii_.Create( + "k8s.KubeTokenReview", + []interface{}{scope, id, props}, + k, + ) +} + +// Checks if `x` is a construct. +// +// Use this method instead of `instanceof` to properly detect `Construct` +// instances, even when the construct library is symlinked. +// +// Explanation: in JavaScript, multiple copies of the `constructs` library on +// disk are seen as independent, completely different libraries. As a +// consequence, the class `Construct` in each copy of the `constructs` library +// is seen as a different class, and an instance of one class will not test as +// `instanceof` the other class. `npm install` will not create installations +// like this, but users may manually symlink construct libraries together or +// use a monorepo tool: in those cases, multiple copies of the `constructs` +// library can be accidentally installed, and `instanceof` will behave +// unpredictably. It is safest to avoid using `instanceof`, and using +// this type-testing method instead. +// +// Returns: true if `x` is an object created from a class which extends `Construct`. +func KubeTokenReview_IsConstruct(x interface{}) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "k8s.KubeTokenReview", + "isConstruct", + []interface{}{x}, + &returns, + ) + + return returns +} + +// Renders a Kubernetes manifest for "io.k8s.api.authentication.v1.TokenReview". +// +// This can be used to inline resource manifests inside other objects (e.g. as templates). +func KubeTokenReview_Manifest(props *KubeTokenReviewProps) interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "k8s.KubeTokenReview", + "manifest", + []interface{}{props}, + &returns, + ) + + return returns +} + +// Returns the `ApiObject` named `Resource` which is a child of the given construct. +// +// If `c` is an `ApiObject`, it is returned directly. Throws an +// exception if the construct does not have a child named `Default` _or_ if +// this child is not an `ApiObject`. +func KubeTokenReview_Of(c constructs.IConstruct) cdk8s.ApiObject { + _init_.Initialize() + + var returns cdk8s.ApiObject + + _jsii_.StaticInvoke( + "k8s.KubeTokenReview", + "of", + []interface{}{c}, + &returns, + ) + + return returns +} + +func KubeTokenReview_GVK() *cdk8s.GroupVersionKind { + _init_.Initialize() + var returns *cdk8s.GroupVersionKind + _jsii_.StaticGet( + "k8s.KubeTokenReview", + "GVK", + &returns, + ) + return returns +} + +func (k *jsiiProxy_KubeTokenReview) AddDependency(dependencies ...constructs.IConstruct) { + args := []interface{}{} + for _, a := range dependencies { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addDependency", + args, + ) +} + +func (k *jsiiProxy_KubeTokenReview) AddJsonPatch(ops ...cdk8s.JsonPatch) { + args := []interface{}{} + for _, a := range ops { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addJsonPatch", + args, + ) +} + +func (k *jsiiProxy_KubeTokenReview) ToJson() interface{} { + var returns interface{} + + _jsii_.Invoke( + k, + "toJson", + nil, // no parameters + &returns, + ) + + return returns +} + +func (k *jsiiProxy_KubeTokenReview) ToString() *string { + var returns *string + + _jsii_.Invoke( + k, + "toString", + nil, // no parameters + &returns, + ) + + return returns +} + +// TokenReview attempts to authenticate a token to a known user. +// +// Note: TokenReview requests may be cached by the webhook token authenticator plugin in the kube-apiserver. +type KubeTokenReviewProps struct { + // Spec holds information about the request being evaluated. + Spec *TokenReviewSpec `field:"required" json:"spec" yaml:"spec"` + // Standard object's metadata. + // + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + Metadata *ObjectMeta `field:"optional" json:"metadata" yaml:"metadata"` +} + +// ValidatingWebhookConfiguration describes the configuration of and admission webhook that accept or reject and object without changing it. +type KubeValidatingWebhookConfiguration interface { + cdk8s.ApiObject + // The group portion of the API version (e.g. `authorization.k8s.io`). + ApiGroup() *string + // The object's API version (e.g. `authorization.k8s.io/v1`). + ApiVersion() *string + // The chart in which this object is defined. + Chart() cdk8s.Chart + // The object kind. + Kind() *string + // Metadata associated with this API object. + Metadata() cdk8s.ApiObjectMetadataDefinition + // The name of the API object. + // + // If a name is specified in `metadata.name` this will be the name returned. + // Otherwise, a name will be generated by calling + // `AddHelm.of(this).generatedObjectName(this)`, which by default uses the + // construct path to generate a DNS-compatible name for the resource. + Name() *string + // The tree node. + Node() constructs.Node + // Create a dependency between this ApiObject and other constructs. + // + // These can be other ApiObjects, Charts, or custom. + AddDependency(dependencies ...constructs.IConstruct) + // Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. + // + // Example: + // kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true)); + // + AddJsonPatch(ops ...cdk8s.JsonPatch) + // Renders the object to Kubernetes JSON. + ToJson() interface{} + // Returns a string representation of this construct. + ToString() *string +} + +// The jsii proxy struct for KubeValidatingWebhookConfiguration +type jsiiProxy_KubeValidatingWebhookConfiguration struct { + internal.Type__cdk8sApiObject +} + +func (j *jsiiProxy_KubeValidatingWebhookConfiguration) ApiGroup() *string { + var returns *string + _jsii_.Get( + j, + "apiGroup", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeValidatingWebhookConfiguration) ApiVersion() *string { + var returns *string + _jsii_.Get( + j, + "apiVersion", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeValidatingWebhookConfiguration) Chart() cdk8s.Chart { + var returns cdk8s.Chart + _jsii_.Get( + j, + "chart", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeValidatingWebhookConfiguration) Kind() *string { + var returns *string + _jsii_.Get( + j, + "kind", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeValidatingWebhookConfiguration) Metadata() cdk8s.ApiObjectMetadataDefinition { + var returns cdk8s.ApiObjectMetadataDefinition + _jsii_.Get( + j, + "metadata", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeValidatingWebhookConfiguration) Name() *string { + var returns *string + _jsii_.Get( + j, + "name", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeValidatingWebhookConfiguration) Node() constructs.Node { + var returns constructs.Node + _jsii_.Get( + j, + "node", + &returns, + ) + return returns +} + +// Defines a "io.k8s.api.admissionregistration.v1.ValidatingWebhookConfiguration" API object. +func NewKubeValidatingWebhookConfiguration(scope constructs.Construct, id *string, props *KubeValidatingWebhookConfigurationProps) KubeValidatingWebhookConfiguration { + _init_.Initialize() + + j := jsiiProxy_KubeValidatingWebhookConfiguration{} + + _jsii_.Create( + "k8s.KubeValidatingWebhookConfiguration", + []interface{}{scope, id, props}, + &j, + ) + + return &j +} + +// Defines a "io.k8s.api.admissionregistration.v1.ValidatingWebhookConfiguration" API object. +func NewKubeValidatingWebhookConfiguration_Override(k KubeValidatingWebhookConfiguration, scope constructs.Construct, id *string, props *KubeValidatingWebhookConfigurationProps) { + _init_.Initialize() + + _jsii_.Create( + "k8s.KubeValidatingWebhookConfiguration", + []interface{}{scope, id, props}, + k, + ) +} + +// Checks if `x` is a construct. +// +// Use this method instead of `instanceof` to properly detect `Construct` +// instances, even when the construct library is symlinked. +// +// Explanation: in JavaScript, multiple copies of the `constructs` library on +// disk are seen as independent, completely different libraries. As a +// consequence, the class `Construct` in each copy of the `constructs` library +// is seen as a different class, and an instance of one class will not test as +// `instanceof` the other class. `npm install` will not create installations +// like this, but users may manually symlink construct libraries together or +// use a monorepo tool: in those cases, multiple copies of the `constructs` +// library can be accidentally installed, and `instanceof` will behave +// unpredictably. It is safest to avoid using `instanceof`, and using +// this type-testing method instead. +// +// Returns: true if `x` is an object created from a class which extends `Construct`. +func KubeValidatingWebhookConfiguration_IsConstruct(x interface{}) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "k8s.KubeValidatingWebhookConfiguration", + "isConstruct", + []interface{}{x}, + &returns, + ) + + return returns +} + +// Renders a Kubernetes manifest for "io.k8s.api.admissionregistration.v1.ValidatingWebhookConfiguration". +// +// This can be used to inline resource manifests inside other objects (e.g. as templates). +func KubeValidatingWebhookConfiguration_Manifest(props *KubeValidatingWebhookConfigurationProps) interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "k8s.KubeValidatingWebhookConfiguration", + "manifest", + []interface{}{props}, + &returns, + ) + + return returns +} + +// Returns the `ApiObject` named `Resource` which is a child of the given construct. +// +// If `c` is an `ApiObject`, it is returned directly. Throws an +// exception if the construct does not have a child named `Default` _or_ if +// this child is not an `ApiObject`. +func KubeValidatingWebhookConfiguration_Of(c constructs.IConstruct) cdk8s.ApiObject { + _init_.Initialize() + + var returns cdk8s.ApiObject + + _jsii_.StaticInvoke( + "k8s.KubeValidatingWebhookConfiguration", + "of", + []interface{}{c}, + &returns, + ) + + return returns +} + +func KubeValidatingWebhookConfiguration_GVK() *cdk8s.GroupVersionKind { + _init_.Initialize() + var returns *cdk8s.GroupVersionKind + _jsii_.StaticGet( + "k8s.KubeValidatingWebhookConfiguration", + "GVK", + &returns, + ) + return returns +} + +func (k *jsiiProxy_KubeValidatingWebhookConfiguration) AddDependency(dependencies ...constructs.IConstruct) { + args := []interface{}{} + for _, a := range dependencies { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addDependency", + args, + ) +} + +func (k *jsiiProxy_KubeValidatingWebhookConfiguration) AddJsonPatch(ops ...cdk8s.JsonPatch) { + args := []interface{}{} + for _, a := range ops { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addJsonPatch", + args, + ) +} + +func (k *jsiiProxy_KubeValidatingWebhookConfiguration) ToJson() interface{} { + var returns interface{} + + _jsii_.Invoke( + k, + "toJson", + nil, // no parameters + &returns, + ) + + return returns +} + +func (k *jsiiProxy_KubeValidatingWebhookConfiguration) ToString() *string { + var returns *string + + _jsii_.Invoke( + k, + "toString", + nil, // no parameters + &returns, + ) + + return returns +} + +// ValidatingWebhookConfigurationList is a list of ValidatingWebhookConfiguration. +type KubeValidatingWebhookConfigurationList interface { + cdk8s.ApiObject + // The group portion of the API version (e.g. `authorization.k8s.io`). + ApiGroup() *string + // The object's API version (e.g. `authorization.k8s.io/v1`). + ApiVersion() *string + // The chart in which this object is defined. + Chart() cdk8s.Chart + // The object kind. + Kind() *string + // Metadata associated with this API object. + Metadata() cdk8s.ApiObjectMetadataDefinition + // The name of the API object. + // + // If a name is specified in `metadata.name` this will be the name returned. + // Otherwise, a name will be generated by calling + // `AddHelm.of(this).generatedObjectName(this)`, which by default uses the + // construct path to generate a DNS-compatible name for the resource. + Name() *string + // The tree node. + Node() constructs.Node + // Create a dependency between this ApiObject and other constructs. + // + // These can be other ApiObjects, Charts, or custom. + AddDependency(dependencies ...constructs.IConstruct) + // Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. + // + // Example: + // kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true)); + // + AddJsonPatch(ops ...cdk8s.JsonPatch) + // Renders the object to Kubernetes JSON. + ToJson() interface{} + // Returns a string representation of this construct. + ToString() *string +} + +// The jsii proxy struct for KubeValidatingWebhookConfigurationList +type jsiiProxy_KubeValidatingWebhookConfigurationList struct { + internal.Type__cdk8sApiObject +} + +func (j *jsiiProxy_KubeValidatingWebhookConfigurationList) ApiGroup() *string { + var returns *string + _jsii_.Get( + j, + "apiGroup", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeValidatingWebhookConfigurationList) ApiVersion() *string { + var returns *string + _jsii_.Get( + j, + "apiVersion", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeValidatingWebhookConfigurationList) Chart() cdk8s.Chart { + var returns cdk8s.Chart + _jsii_.Get( + j, + "chart", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeValidatingWebhookConfigurationList) Kind() *string { + var returns *string + _jsii_.Get( + j, + "kind", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeValidatingWebhookConfigurationList) Metadata() cdk8s.ApiObjectMetadataDefinition { + var returns cdk8s.ApiObjectMetadataDefinition + _jsii_.Get( + j, + "metadata", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeValidatingWebhookConfigurationList) Name() *string { + var returns *string + _jsii_.Get( + j, + "name", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeValidatingWebhookConfigurationList) Node() constructs.Node { + var returns constructs.Node + _jsii_.Get( + j, + "node", + &returns, + ) + return returns +} + +// Defines a "io.k8s.api.admissionregistration.v1.ValidatingWebhookConfigurationList" API object. +func NewKubeValidatingWebhookConfigurationList(scope constructs.Construct, id *string, props *KubeValidatingWebhookConfigurationListProps) KubeValidatingWebhookConfigurationList { + _init_.Initialize() + + j := jsiiProxy_KubeValidatingWebhookConfigurationList{} + + _jsii_.Create( + "k8s.KubeValidatingWebhookConfigurationList", + []interface{}{scope, id, props}, + &j, + ) + + return &j +} + +// Defines a "io.k8s.api.admissionregistration.v1.ValidatingWebhookConfigurationList" API object. +func NewKubeValidatingWebhookConfigurationList_Override(k KubeValidatingWebhookConfigurationList, scope constructs.Construct, id *string, props *KubeValidatingWebhookConfigurationListProps) { + _init_.Initialize() + + _jsii_.Create( + "k8s.KubeValidatingWebhookConfigurationList", + []interface{}{scope, id, props}, + k, + ) +} + +// Checks if `x` is a construct. +// +// Use this method instead of `instanceof` to properly detect `Construct` +// instances, even when the construct library is symlinked. +// +// Explanation: in JavaScript, multiple copies of the `constructs` library on +// disk are seen as independent, completely different libraries. As a +// consequence, the class `Construct` in each copy of the `constructs` library +// is seen as a different class, and an instance of one class will not test as +// `instanceof` the other class. `npm install` will not create installations +// like this, but users may manually symlink construct libraries together or +// use a monorepo tool: in those cases, multiple copies of the `constructs` +// library can be accidentally installed, and `instanceof` will behave +// unpredictably. It is safest to avoid using `instanceof`, and using +// this type-testing method instead. +// +// Returns: true if `x` is an object created from a class which extends `Construct`. +func KubeValidatingWebhookConfigurationList_IsConstruct(x interface{}) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "k8s.KubeValidatingWebhookConfigurationList", + "isConstruct", + []interface{}{x}, + &returns, + ) + + return returns +} + +// Renders a Kubernetes manifest for "io.k8s.api.admissionregistration.v1.ValidatingWebhookConfigurationList". +// +// This can be used to inline resource manifests inside other objects (e.g. as templates). +func KubeValidatingWebhookConfigurationList_Manifest(props *KubeValidatingWebhookConfigurationListProps) interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "k8s.KubeValidatingWebhookConfigurationList", + "manifest", + []interface{}{props}, + &returns, + ) + + return returns +} + +// Returns the `ApiObject` named `Resource` which is a child of the given construct. +// +// If `c` is an `ApiObject`, it is returned directly. Throws an +// exception if the construct does not have a child named `Default` _or_ if +// this child is not an `ApiObject`. +func KubeValidatingWebhookConfigurationList_Of(c constructs.IConstruct) cdk8s.ApiObject { + _init_.Initialize() + + var returns cdk8s.ApiObject + + _jsii_.StaticInvoke( + "k8s.KubeValidatingWebhookConfigurationList", + "of", + []interface{}{c}, + &returns, + ) + + return returns +} + +func KubeValidatingWebhookConfigurationList_GVK() *cdk8s.GroupVersionKind { + _init_.Initialize() + var returns *cdk8s.GroupVersionKind + _jsii_.StaticGet( + "k8s.KubeValidatingWebhookConfigurationList", + "GVK", + &returns, + ) + return returns +} + +func (k *jsiiProxy_KubeValidatingWebhookConfigurationList) AddDependency(dependencies ...constructs.IConstruct) { + args := []interface{}{} + for _, a := range dependencies { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addDependency", + args, + ) +} + +func (k *jsiiProxy_KubeValidatingWebhookConfigurationList) AddJsonPatch(ops ...cdk8s.JsonPatch) { + args := []interface{}{} + for _, a := range ops { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addJsonPatch", + args, + ) +} + +func (k *jsiiProxy_KubeValidatingWebhookConfigurationList) ToJson() interface{} { + var returns interface{} + + _jsii_.Invoke( + k, + "toJson", + nil, // no parameters + &returns, + ) + + return returns +} + +func (k *jsiiProxy_KubeValidatingWebhookConfigurationList) ToString() *string { + var returns *string + + _jsii_.Invoke( + k, + "toString", + nil, // no parameters + &returns, + ) + + return returns +} + +// ValidatingWebhookConfigurationList is a list of ValidatingWebhookConfiguration. +type KubeValidatingWebhookConfigurationListProps struct { + // List of ValidatingWebhookConfiguration. + Items *[]*KubeValidatingWebhookConfigurationProps `field:"required" json:"items" yaml:"items"` + // Standard list metadata. + // + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + Metadata *ListMeta `field:"optional" json:"metadata" yaml:"metadata"` +} + +// ValidatingWebhookConfiguration describes the configuration of and admission webhook that accept or reject and object without changing it. +type KubeValidatingWebhookConfigurationProps struct { + // Standard object metadata; + // + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata. + Metadata *ObjectMeta `field:"optional" json:"metadata" yaml:"metadata"` + // Webhooks is a list of webhooks and the affected resources and operations. + Webhooks *[]*ValidatingWebhook `field:"optional" json:"webhooks" yaml:"webhooks"` +} + +// VolumeAttachment captures the intent to attach or detach the specified volume to/from the specified node. +// +// VolumeAttachment objects are non-namespaced. +type KubeVolumeAttachment interface { + cdk8s.ApiObject + // The group portion of the API version (e.g. `authorization.k8s.io`). + ApiGroup() *string + // The object's API version (e.g. `authorization.k8s.io/v1`). + ApiVersion() *string + // The chart in which this object is defined. + Chart() cdk8s.Chart + // The object kind. + Kind() *string + // Metadata associated with this API object. + Metadata() cdk8s.ApiObjectMetadataDefinition + // The name of the API object. + // + // If a name is specified in `metadata.name` this will be the name returned. + // Otherwise, a name will be generated by calling + // `AddHelm.of(this).generatedObjectName(this)`, which by default uses the + // construct path to generate a DNS-compatible name for the resource. + Name() *string + // The tree node. + Node() constructs.Node + // Create a dependency between this ApiObject and other constructs. + // + // These can be other ApiObjects, Charts, or custom. + AddDependency(dependencies ...constructs.IConstruct) + // Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. + // + // Example: + // kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true)); + // + AddJsonPatch(ops ...cdk8s.JsonPatch) + // Renders the object to Kubernetes JSON. + ToJson() interface{} + // Returns a string representation of this construct. + ToString() *string +} + +// The jsii proxy struct for KubeVolumeAttachment +type jsiiProxy_KubeVolumeAttachment struct { + internal.Type__cdk8sApiObject +} + +func (j *jsiiProxy_KubeVolumeAttachment) ApiGroup() *string { + var returns *string + _jsii_.Get( + j, + "apiGroup", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeVolumeAttachment) ApiVersion() *string { + var returns *string + _jsii_.Get( + j, + "apiVersion", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeVolumeAttachment) Chart() cdk8s.Chart { + var returns cdk8s.Chart + _jsii_.Get( + j, + "chart", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeVolumeAttachment) Kind() *string { + var returns *string + _jsii_.Get( + j, + "kind", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeVolumeAttachment) Metadata() cdk8s.ApiObjectMetadataDefinition { + var returns cdk8s.ApiObjectMetadataDefinition + _jsii_.Get( + j, + "metadata", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeVolumeAttachment) Name() *string { + var returns *string + _jsii_.Get( + j, + "name", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeVolumeAttachment) Node() constructs.Node { + var returns constructs.Node + _jsii_.Get( + j, + "node", + &returns, + ) + return returns +} + +// Defines a "io.k8s.api.storage.v1.VolumeAttachment" API object. +func NewKubeVolumeAttachment(scope constructs.Construct, id *string, props *KubeVolumeAttachmentProps) KubeVolumeAttachment { + _init_.Initialize() + + j := jsiiProxy_KubeVolumeAttachment{} + + _jsii_.Create( + "k8s.KubeVolumeAttachment", + []interface{}{scope, id, props}, + &j, + ) + + return &j +} + +// Defines a "io.k8s.api.storage.v1.VolumeAttachment" API object. +func NewKubeVolumeAttachment_Override(k KubeVolumeAttachment, scope constructs.Construct, id *string, props *KubeVolumeAttachmentProps) { + _init_.Initialize() + + _jsii_.Create( + "k8s.KubeVolumeAttachment", + []interface{}{scope, id, props}, + k, + ) +} + +// Checks if `x` is a construct. +// +// Use this method instead of `instanceof` to properly detect `Construct` +// instances, even when the construct library is symlinked. +// +// Explanation: in JavaScript, multiple copies of the `constructs` library on +// disk are seen as independent, completely different libraries. As a +// consequence, the class `Construct` in each copy of the `constructs` library +// is seen as a different class, and an instance of one class will not test as +// `instanceof` the other class. `npm install` will not create installations +// like this, but users may manually symlink construct libraries together or +// use a monorepo tool: in those cases, multiple copies of the `constructs` +// library can be accidentally installed, and `instanceof` will behave +// unpredictably. It is safest to avoid using `instanceof`, and using +// this type-testing method instead. +// +// Returns: true if `x` is an object created from a class which extends `Construct`. +func KubeVolumeAttachment_IsConstruct(x interface{}) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "k8s.KubeVolumeAttachment", + "isConstruct", + []interface{}{x}, + &returns, + ) + + return returns +} + +// Renders a Kubernetes manifest for "io.k8s.api.storage.v1.VolumeAttachment". +// +// This can be used to inline resource manifests inside other objects (e.g. as templates). +func KubeVolumeAttachment_Manifest(props *KubeVolumeAttachmentProps) interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "k8s.KubeVolumeAttachment", + "manifest", + []interface{}{props}, + &returns, + ) + + return returns +} + +// Returns the `ApiObject` named `Resource` which is a child of the given construct. +// +// If `c` is an `ApiObject`, it is returned directly. Throws an +// exception if the construct does not have a child named `Default` _or_ if +// this child is not an `ApiObject`. +func KubeVolumeAttachment_Of(c constructs.IConstruct) cdk8s.ApiObject { + _init_.Initialize() + + var returns cdk8s.ApiObject + + _jsii_.StaticInvoke( + "k8s.KubeVolumeAttachment", + "of", + []interface{}{c}, + &returns, + ) + + return returns +} + +func KubeVolumeAttachment_GVK() *cdk8s.GroupVersionKind { + _init_.Initialize() + var returns *cdk8s.GroupVersionKind + _jsii_.StaticGet( + "k8s.KubeVolumeAttachment", + "GVK", + &returns, + ) + return returns +} + +func (k *jsiiProxy_KubeVolumeAttachment) AddDependency(dependencies ...constructs.IConstruct) { + args := []interface{}{} + for _, a := range dependencies { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addDependency", + args, + ) +} + +func (k *jsiiProxy_KubeVolumeAttachment) AddJsonPatch(ops ...cdk8s.JsonPatch) { + args := []interface{}{} + for _, a := range ops { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addJsonPatch", + args, + ) +} + +func (k *jsiiProxy_KubeVolumeAttachment) ToJson() interface{} { + var returns interface{} + + _jsii_.Invoke( + k, + "toJson", + nil, // no parameters + &returns, + ) + + return returns +} + +func (k *jsiiProxy_KubeVolumeAttachment) ToString() *string { + var returns *string + + _jsii_.Invoke( + k, + "toString", + nil, // no parameters + &returns, + ) + + return returns +} + +// VolumeAttachmentList is a collection of VolumeAttachment objects. +type KubeVolumeAttachmentList interface { + cdk8s.ApiObject + // The group portion of the API version (e.g. `authorization.k8s.io`). + ApiGroup() *string + // The object's API version (e.g. `authorization.k8s.io/v1`). + ApiVersion() *string + // The chart in which this object is defined. + Chart() cdk8s.Chart + // The object kind. + Kind() *string + // Metadata associated with this API object. + Metadata() cdk8s.ApiObjectMetadataDefinition + // The name of the API object. + // + // If a name is specified in `metadata.name` this will be the name returned. + // Otherwise, a name will be generated by calling + // `AddHelm.of(this).generatedObjectName(this)`, which by default uses the + // construct path to generate a DNS-compatible name for the resource. + Name() *string + // The tree node. + Node() constructs.Node + // Create a dependency between this ApiObject and other constructs. + // + // These can be other ApiObjects, Charts, or custom. + AddDependency(dependencies ...constructs.IConstruct) + // Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. + // + // Example: + // kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true)); + // + AddJsonPatch(ops ...cdk8s.JsonPatch) + // Renders the object to Kubernetes JSON. + ToJson() interface{} + // Returns a string representation of this construct. + ToString() *string +} + +// The jsii proxy struct for KubeVolumeAttachmentList +type jsiiProxy_KubeVolumeAttachmentList struct { + internal.Type__cdk8sApiObject +} + +func (j *jsiiProxy_KubeVolumeAttachmentList) ApiGroup() *string { + var returns *string + _jsii_.Get( + j, + "apiGroup", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeVolumeAttachmentList) ApiVersion() *string { + var returns *string + _jsii_.Get( + j, + "apiVersion", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeVolumeAttachmentList) Chart() cdk8s.Chart { + var returns cdk8s.Chart + _jsii_.Get( + j, + "chart", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeVolumeAttachmentList) Kind() *string { + var returns *string + _jsii_.Get( + j, + "kind", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeVolumeAttachmentList) Metadata() cdk8s.ApiObjectMetadataDefinition { + var returns cdk8s.ApiObjectMetadataDefinition + _jsii_.Get( + j, + "metadata", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeVolumeAttachmentList) Name() *string { + var returns *string + _jsii_.Get( + j, + "name", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeVolumeAttachmentList) Node() constructs.Node { + var returns constructs.Node + _jsii_.Get( + j, + "node", + &returns, + ) + return returns +} + +// Defines a "io.k8s.api.storage.v1.VolumeAttachmentList" API object. +func NewKubeVolumeAttachmentList(scope constructs.Construct, id *string, props *KubeVolumeAttachmentListProps) KubeVolumeAttachmentList { + _init_.Initialize() + + j := jsiiProxy_KubeVolumeAttachmentList{} + + _jsii_.Create( + "k8s.KubeVolumeAttachmentList", + []interface{}{scope, id, props}, + &j, + ) + + return &j +} + +// Defines a "io.k8s.api.storage.v1.VolumeAttachmentList" API object. +func NewKubeVolumeAttachmentList_Override(k KubeVolumeAttachmentList, scope constructs.Construct, id *string, props *KubeVolumeAttachmentListProps) { + _init_.Initialize() + + _jsii_.Create( + "k8s.KubeVolumeAttachmentList", + []interface{}{scope, id, props}, + k, + ) +} + +// Checks if `x` is a construct. +// +// Use this method instead of `instanceof` to properly detect `Construct` +// instances, even when the construct library is symlinked. +// +// Explanation: in JavaScript, multiple copies of the `constructs` library on +// disk are seen as independent, completely different libraries. As a +// consequence, the class `Construct` in each copy of the `constructs` library +// is seen as a different class, and an instance of one class will not test as +// `instanceof` the other class. `npm install` will not create installations +// like this, but users may manually symlink construct libraries together or +// use a monorepo tool: in those cases, multiple copies of the `constructs` +// library can be accidentally installed, and `instanceof` will behave +// unpredictably. It is safest to avoid using `instanceof`, and using +// this type-testing method instead. +// +// Returns: true if `x` is an object created from a class which extends `Construct`. +func KubeVolumeAttachmentList_IsConstruct(x interface{}) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "k8s.KubeVolumeAttachmentList", + "isConstruct", + []interface{}{x}, + &returns, + ) + + return returns +} + +// Renders a Kubernetes manifest for "io.k8s.api.storage.v1.VolumeAttachmentList". +// +// This can be used to inline resource manifests inside other objects (e.g. as templates). +func KubeVolumeAttachmentList_Manifest(props *KubeVolumeAttachmentListProps) interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "k8s.KubeVolumeAttachmentList", + "manifest", + []interface{}{props}, + &returns, + ) + + return returns +} + +// Returns the `ApiObject` named `Resource` which is a child of the given construct. +// +// If `c` is an `ApiObject`, it is returned directly. Throws an +// exception if the construct does not have a child named `Default` _or_ if +// this child is not an `ApiObject`. +func KubeVolumeAttachmentList_Of(c constructs.IConstruct) cdk8s.ApiObject { + _init_.Initialize() + + var returns cdk8s.ApiObject + + _jsii_.StaticInvoke( + "k8s.KubeVolumeAttachmentList", + "of", + []interface{}{c}, + &returns, + ) + + return returns +} + +func KubeVolumeAttachmentList_GVK() *cdk8s.GroupVersionKind { + _init_.Initialize() + var returns *cdk8s.GroupVersionKind + _jsii_.StaticGet( + "k8s.KubeVolumeAttachmentList", + "GVK", + &returns, + ) + return returns +} + +func (k *jsiiProxy_KubeVolumeAttachmentList) AddDependency(dependencies ...constructs.IConstruct) { + args := []interface{}{} + for _, a := range dependencies { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addDependency", + args, + ) +} + +func (k *jsiiProxy_KubeVolumeAttachmentList) AddJsonPatch(ops ...cdk8s.JsonPatch) { + args := []interface{}{} + for _, a := range ops { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addJsonPatch", + args, + ) +} + +func (k *jsiiProxy_KubeVolumeAttachmentList) ToJson() interface{} { + var returns interface{} + + _jsii_.Invoke( + k, + "toJson", + nil, // no parameters + &returns, + ) + + return returns +} + +func (k *jsiiProxy_KubeVolumeAttachmentList) ToString() *string { + var returns *string + + _jsii_.Invoke( + k, + "toString", + nil, // no parameters + &returns, + ) + + return returns +} + +// VolumeAttachmentList is a collection of VolumeAttachment objects. +type KubeVolumeAttachmentListProps struct { + // Items is the list of VolumeAttachments. + Items *[]*KubeVolumeAttachmentProps `field:"required" json:"items" yaml:"items"` + // Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata. + Metadata *ListMeta `field:"optional" json:"metadata" yaml:"metadata"` +} + +// VolumeAttachmentList is a collection of VolumeAttachment objects. +type KubeVolumeAttachmentListV1Alpha1 interface { + cdk8s.ApiObject + // The group portion of the API version (e.g. `authorization.k8s.io`). + ApiGroup() *string + // The object's API version (e.g. `authorization.k8s.io/v1`). + ApiVersion() *string + // The chart in which this object is defined. + Chart() cdk8s.Chart + // The object kind. + Kind() *string + // Metadata associated with this API object. + Metadata() cdk8s.ApiObjectMetadataDefinition + // The name of the API object. + // + // If a name is specified in `metadata.name` this will be the name returned. + // Otherwise, a name will be generated by calling + // `AddHelm.of(this).generatedObjectName(this)`, which by default uses the + // construct path to generate a DNS-compatible name for the resource. + Name() *string + // The tree node. + Node() constructs.Node + // Create a dependency between this ApiObject and other constructs. + // + // These can be other ApiObjects, Charts, or custom. + AddDependency(dependencies ...constructs.IConstruct) + // Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. + // + // Example: + // kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true)); + // + AddJsonPatch(ops ...cdk8s.JsonPatch) + // Renders the object to Kubernetes JSON. + ToJson() interface{} + // Returns a string representation of this construct. + ToString() *string +} + +// The jsii proxy struct for KubeVolumeAttachmentListV1Alpha1 +type jsiiProxy_KubeVolumeAttachmentListV1Alpha1 struct { + internal.Type__cdk8sApiObject +} + +func (j *jsiiProxy_KubeVolumeAttachmentListV1Alpha1) ApiGroup() *string { + var returns *string + _jsii_.Get( + j, + "apiGroup", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeVolumeAttachmentListV1Alpha1) ApiVersion() *string { + var returns *string + _jsii_.Get( + j, + "apiVersion", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeVolumeAttachmentListV1Alpha1) Chart() cdk8s.Chart { + var returns cdk8s.Chart + _jsii_.Get( + j, + "chart", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeVolumeAttachmentListV1Alpha1) Kind() *string { + var returns *string + _jsii_.Get( + j, + "kind", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeVolumeAttachmentListV1Alpha1) Metadata() cdk8s.ApiObjectMetadataDefinition { + var returns cdk8s.ApiObjectMetadataDefinition + _jsii_.Get( + j, + "metadata", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeVolumeAttachmentListV1Alpha1) Name() *string { + var returns *string + _jsii_.Get( + j, + "name", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeVolumeAttachmentListV1Alpha1) Node() constructs.Node { + var returns constructs.Node + _jsii_.Get( + j, + "node", + &returns, + ) + return returns +} + +// Defines a "io.k8s.api.storage.v1alpha1.VolumeAttachmentList" API object. +func NewKubeVolumeAttachmentListV1Alpha1(scope constructs.Construct, id *string, props *KubeVolumeAttachmentListV1Alpha1Props) KubeVolumeAttachmentListV1Alpha1 { + _init_.Initialize() + + j := jsiiProxy_KubeVolumeAttachmentListV1Alpha1{} + + _jsii_.Create( + "k8s.KubeVolumeAttachmentListV1Alpha1", + []interface{}{scope, id, props}, + &j, + ) + + return &j +} + +// Defines a "io.k8s.api.storage.v1alpha1.VolumeAttachmentList" API object. +func NewKubeVolumeAttachmentListV1Alpha1_Override(k KubeVolumeAttachmentListV1Alpha1, scope constructs.Construct, id *string, props *KubeVolumeAttachmentListV1Alpha1Props) { + _init_.Initialize() + + _jsii_.Create( + "k8s.KubeVolumeAttachmentListV1Alpha1", + []interface{}{scope, id, props}, + k, + ) +} + +// Checks if `x` is a construct. +// +// Use this method instead of `instanceof` to properly detect `Construct` +// instances, even when the construct library is symlinked. +// +// Explanation: in JavaScript, multiple copies of the `constructs` library on +// disk are seen as independent, completely different libraries. As a +// consequence, the class `Construct` in each copy of the `constructs` library +// is seen as a different class, and an instance of one class will not test as +// `instanceof` the other class. `npm install` will not create installations +// like this, but users may manually symlink construct libraries together or +// use a monorepo tool: in those cases, multiple copies of the `constructs` +// library can be accidentally installed, and `instanceof` will behave +// unpredictably. It is safest to avoid using `instanceof`, and using +// this type-testing method instead. +// +// Returns: true if `x` is an object created from a class which extends `Construct`. +func KubeVolumeAttachmentListV1Alpha1_IsConstruct(x interface{}) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "k8s.KubeVolumeAttachmentListV1Alpha1", + "isConstruct", + []interface{}{x}, + &returns, + ) + + return returns +} + +// Renders a Kubernetes manifest for "io.k8s.api.storage.v1alpha1.VolumeAttachmentList". +// +// This can be used to inline resource manifests inside other objects (e.g. as templates). +func KubeVolumeAttachmentListV1Alpha1_Manifest(props *KubeVolumeAttachmentListV1Alpha1Props) interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "k8s.KubeVolumeAttachmentListV1Alpha1", + "manifest", + []interface{}{props}, + &returns, + ) + + return returns +} + +// Returns the `ApiObject` named `Resource` which is a child of the given construct. +// +// If `c` is an `ApiObject`, it is returned directly. Throws an +// exception if the construct does not have a child named `Default` _or_ if +// this child is not an `ApiObject`. +func KubeVolumeAttachmentListV1Alpha1_Of(c constructs.IConstruct) cdk8s.ApiObject { + _init_.Initialize() + + var returns cdk8s.ApiObject + + _jsii_.StaticInvoke( + "k8s.KubeVolumeAttachmentListV1Alpha1", + "of", + []interface{}{c}, + &returns, + ) + + return returns +} + +func KubeVolumeAttachmentListV1Alpha1_GVK() *cdk8s.GroupVersionKind { + _init_.Initialize() + var returns *cdk8s.GroupVersionKind + _jsii_.StaticGet( + "k8s.KubeVolumeAttachmentListV1Alpha1", + "GVK", + &returns, + ) + return returns +} + +func (k *jsiiProxy_KubeVolumeAttachmentListV1Alpha1) AddDependency(dependencies ...constructs.IConstruct) { + args := []interface{}{} + for _, a := range dependencies { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addDependency", + args, + ) +} + +func (k *jsiiProxy_KubeVolumeAttachmentListV1Alpha1) AddJsonPatch(ops ...cdk8s.JsonPatch) { + args := []interface{}{} + for _, a := range ops { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addJsonPatch", + args, + ) +} + +func (k *jsiiProxy_KubeVolumeAttachmentListV1Alpha1) ToJson() interface{} { + var returns interface{} + + _jsii_.Invoke( + k, + "toJson", + nil, // no parameters + &returns, + ) + + return returns +} + +func (k *jsiiProxy_KubeVolumeAttachmentListV1Alpha1) ToString() *string { + var returns *string + + _jsii_.Invoke( + k, + "toString", + nil, // no parameters + &returns, + ) + + return returns +} + +// VolumeAttachmentList is a collection of VolumeAttachment objects. +type KubeVolumeAttachmentListV1Alpha1Props struct { + // Items is the list of VolumeAttachments. + Items *[]*KubeVolumeAttachmentV1Alpha1Props `field:"required" json:"items" yaml:"items"` + // Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata. + Metadata *ListMeta `field:"optional" json:"metadata" yaml:"metadata"` +} + +// VolumeAttachment captures the intent to attach or detach the specified volume to/from the specified node. +// +// VolumeAttachment objects are non-namespaced. +type KubeVolumeAttachmentProps struct { + // Specification of the desired attach/detach volume behavior. + // + // Populated by the Kubernetes system. + Spec *VolumeAttachmentSpec `field:"required" json:"spec" yaml:"spec"` + // Standard object metadata. + // + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + Metadata *ObjectMeta `field:"optional" json:"metadata" yaml:"metadata"` +} + +// VolumeAttachment captures the intent to attach or detach the specified volume to/from the specified node. +// +// VolumeAttachment objects are non-namespaced. +type KubeVolumeAttachmentV1Alpha1 interface { + cdk8s.ApiObject + // The group portion of the API version (e.g. `authorization.k8s.io`). + ApiGroup() *string + // The object's API version (e.g. `authorization.k8s.io/v1`). + ApiVersion() *string + // The chart in which this object is defined. + Chart() cdk8s.Chart + // The object kind. + Kind() *string + // Metadata associated with this API object. + Metadata() cdk8s.ApiObjectMetadataDefinition + // The name of the API object. + // + // If a name is specified in `metadata.name` this will be the name returned. + // Otherwise, a name will be generated by calling + // `AddHelm.of(this).generatedObjectName(this)`, which by default uses the + // construct path to generate a DNS-compatible name for the resource. + Name() *string + // The tree node. + Node() constructs.Node + // Create a dependency between this ApiObject and other constructs. + // + // These can be other ApiObjects, Charts, or custom. + AddDependency(dependencies ...constructs.IConstruct) + // Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. + // + // Example: + // kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true)); + // + AddJsonPatch(ops ...cdk8s.JsonPatch) + // Renders the object to Kubernetes JSON. + ToJson() interface{} + // Returns a string representation of this construct. + ToString() *string +} + +// The jsii proxy struct for KubeVolumeAttachmentV1Alpha1 +type jsiiProxy_KubeVolumeAttachmentV1Alpha1 struct { + internal.Type__cdk8sApiObject +} + +func (j *jsiiProxy_KubeVolumeAttachmentV1Alpha1) ApiGroup() *string { + var returns *string + _jsii_.Get( + j, + "apiGroup", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeVolumeAttachmentV1Alpha1) ApiVersion() *string { + var returns *string + _jsii_.Get( + j, + "apiVersion", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeVolumeAttachmentV1Alpha1) Chart() cdk8s.Chart { + var returns cdk8s.Chart + _jsii_.Get( + j, + "chart", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeVolumeAttachmentV1Alpha1) Kind() *string { + var returns *string + _jsii_.Get( + j, + "kind", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeVolumeAttachmentV1Alpha1) Metadata() cdk8s.ApiObjectMetadataDefinition { + var returns cdk8s.ApiObjectMetadataDefinition + _jsii_.Get( + j, + "metadata", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeVolumeAttachmentV1Alpha1) Name() *string { + var returns *string + _jsii_.Get( + j, + "name", + &returns, + ) + return returns +} + +func (j *jsiiProxy_KubeVolumeAttachmentV1Alpha1) Node() constructs.Node { + var returns constructs.Node + _jsii_.Get( + j, + "node", + &returns, + ) + return returns +} + +// Defines a "io.k8s.api.storage.v1alpha1.VolumeAttachment" API object. +func NewKubeVolumeAttachmentV1Alpha1(scope constructs.Construct, id *string, props *KubeVolumeAttachmentV1Alpha1Props) KubeVolumeAttachmentV1Alpha1 { + _init_.Initialize() + + j := jsiiProxy_KubeVolumeAttachmentV1Alpha1{} + + _jsii_.Create( + "k8s.KubeVolumeAttachmentV1Alpha1", + []interface{}{scope, id, props}, + &j, + ) + + return &j +} + +// Defines a "io.k8s.api.storage.v1alpha1.VolumeAttachment" API object. +func NewKubeVolumeAttachmentV1Alpha1_Override(k KubeVolumeAttachmentV1Alpha1, scope constructs.Construct, id *string, props *KubeVolumeAttachmentV1Alpha1Props) { + _init_.Initialize() + + _jsii_.Create( + "k8s.KubeVolumeAttachmentV1Alpha1", + []interface{}{scope, id, props}, + k, + ) +} + +// Checks if `x` is a construct. +// +// Use this method instead of `instanceof` to properly detect `Construct` +// instances, even when the construct library is symlinked. +// +// Explanation: in JavaScript, multiple copies of the `constructs` library on +// disk are seen as independent, completely different libraries. As a +// consequence, the class `Construct` in each copy of the `constructs` library +// is seen as a different class, and an instance of one class will not test as +// `instanceof` the other class. `npm install` will not create installations +// like this, but users may manually symlink construct libraries together or +// use a monorepo tool: in those cases, multiple copies of the `constructs` +// library can be accidentally installed, and `instanceof` will behave +// unpredictably. It is safest to avoid using `instanceof`, and using +// this type-testing method instead. +// +// Returns: true if `x` is an object created from a class which extends `Construct`. +func KubeVolumeAttachmentV1Alpha1_IsConstruct(x interface{}) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "k8s.KubeVolumeAttachmentV1Alpha1", + "isConstruct", + []interface{}{x}, + &returns, + ) + + return returns +} + +// Renders a Kubernetes manifest for "io.k8s.api.storage.v1alpha1.VolumeAttachment". +// +// This can be used to inline resource manifests inside other objects (e.g. as templates). +func KubeVolumeAttachmentV1Alpha1_Manifest(props *KubeVolumeAttachmentV1Alpha1Props) interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "k8s.KubeVolumeAttachmentV1Alpha1", + "manifest", + []interface{}{props}, + &returns, + ) + + return returns +} + +// Returns the `ApiObject` named `Resource` which is a child of the given construct. +// +// If `c` is an `ApiObject`, it is returned directly. Throws an +// exception if the construct does not have a child named `Default` _or_ if +// this child is not an `ApiObject`. +func KubeVolumeAttachmentV1Alpha1_Of(c constructs.IConstruct) cdk8s.ApiObject { + _init_.Initialize() + + var returns cdk8s.ApiObject + + _jsii_.StaticInvoke( + "k8s.KubeVolumeAttachmentV1Alpha1", + "of", + []interface{}{c}, + &returns, + ) + + return returns +} + +func KubeVolumeAttachmentV1Alpha1_GVK() *cdk8s.GroupVersionKind { + _init_.Initialize() + var returns *cdk8s.GroupVersionKind + _jsii_.StaticGet( + "k8s.KubeVolumeAttachmentV1Alpha1", + "GVK", + &returns, + ) + return returns +} + +func (k *jsiiProxy_KubeVolumeAttachmentV1Alpha1) AddDependency(dependencies ...constructs.IConstruct) { + args := []interface{}{} + for _, a := range dependencies { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addDependency", + args, + ) +} + +func (k *jsiiProxy_KubeVolumeAttachmentV1Alpha1) AddJsonPatch(ops ...cdk8s.JsonPatch) { + args := []interface{}{} + for _, a := range ops { + args = append(args, a) + } + + _jsii_.InvokeVoid( + k, + "addJsonPatch", + args, + ) +} + +func (k *jsiiProxy_KubeVolumeAttachmentV1Alpha1) ToJson() interface{} { + var returns interface{} + + _jsii_.Invoke( + k, + "toJson", + nil, // no parameters + &returns, + ) + + return returns +} + +func (k *jsiiProxy_KubeVolumeAttachmentV1Alpha1) ToString() *string { + var returns *string + + _jsii_.Invoke( + k, + "toString", + nil, // no parameters + &returns, + ) + + return returns +} + +// VolumeAttachment captures the intent to attach or detach the specified volume to/from the specified node. +// +// VolumeAttachment objects are non-namespaced. +type KubeVolumeAttachmentV1Alpha1Props struct { + // Specification of the desired attach/detach volume behavior. + // + // Populated by the Kubernetes system. + Spec *VolumeAttachmentSpecV1Alpha1 `field:"required" json:"spec" yaml:"spec"` + // Standard object metadata. + // + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + Metadata *ObjectMeta `field:"optional" json:"metadata" yaml:"metadata"` +} + +// 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. +type LabelSelector struct { + // matchExpressions is a list of label selector requirements. + // + // The requirements are ANDed. + MatchExpressions *[]*LabelSelectorRequirement `field:"optional" json:"matchExpressions" yaml:"matchExpressions"` + // 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. + MatchLabels *map[string]*string `field:"optional" json:"matchLabels" yaml:"matchLabels"` +} + +// A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. +type LabelSelectorRequirement struct { + // key is the label key that the selector applies to. + Key *string `field:"required" json:"key" yaml:"key"` + // operator represents a key's relationship to a set of values. + // + // Valid operators are In, NotIn, Exists and DoesNotExist. + Operator *string `field:"required" json:"operator" yaml:"operator"` + // 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. + Values *[]*string `field:"optional" json:"values" yaml:"values"` +} + +// LeaseSpec is a specification of a Lease. +type LeaseSpec struct { + // acquireTime is a time when the current lease was acquired. + AcquireTime *time.Time `field:"optional" json:"acquireTime" yaml:"acquireTime"` + // holderIdentity contains the identity of the holder of a current lease. + HolderIdentity *string `field:"optional" json:"holderIdentity" yaml:"holderIdentity"` + // leaseDurationSeconds is a duration that candidates for a lease need to wait to force acquire it. + // + // This is measure against time of last observed RenewTime. + LeaseDurationSeconds *float64 `field:"optional" json:"leaseDurationSeconds" yaml:"leaseDurationSeconds"` + // leaseTransitions is the number of transitions of a lease between holders. + LeaseTransitions *float64 `field:"optional" json:"leaseTransitions" yaml:"leaseTransitions"` + // renewTime is a time when the current holder of a lease has last updated the lease. + RenewTime *time.Time `field:"optional" json:"renewTime" yaml:"renewTime"` +} + +// Lifecycle describes actions that the management system should take in response to container lifecycle events. +// +// For the PostStart and PreStop lifecycle handlers, management of the container blocks until the action is complete, unless the container process fails, in which case the handler is aborted. +type Lifecycle struct { + // PostStart is called immediately after a container is created. + // + // If the handler fails, the container is terminated and restarted according to its restart policy. Other management of the container blocks until the hook completes. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks + PostStart *Handler `field:"optional" json:"postStart" yaml:"postStart"` + // PreStop is called immediately before a container is terminated due to an API request or management event such as liveness/startup probe failure, preemption, resource contention, etc. + // + // The handler is not called if the container crashes or exits. The reason for termination is passed to the handler. The Pod's termination grace period countdown begins before the PreStop hooked is executed. Regardless of the outcome of the handler, the container will eventually terminate within the Pod's termination grace period. Other management of the container blocks until the hook completes or until the termination grace period is reached. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks + PreStop *Handler `field:"optional" json:"preStop" yaml:"preStop"` +} + +// LimitRangeItem defines a min/max usage limit for any resource that matches on kind. +type LimitRangeItem struct { + // Type of resource that this limit applies to. + Type *string `field:"required" json:"type" yaml:"type"` + // Default resource requirement limit value by resource name if resource limit is omitted. + Default *map[string]Quantity `field:"optional" json:"default" yaml:"default"` + // DefaultRequest is the default resource requirement request value by resource name if resource request is omitted. + DefaultRequest *map[string]Quantity `field:"optional" json:"defaultRequest" yaml:"defaultRequest"` + // Max usage constraints on this kind by resource name. + Max *map[string]Quantity `field:"optional" json:"max" yaml:"max"` + // MaxLimitRequestRatio if specified, the named resource must have a request and limit that are both non-zero where limit divided by request is less than or equal to the enumerated value; + // + // this represents the max burst for the named resource. + MaxLimitRequestRatio *map[string]Quantity `field:"optional" json:"maxLimitRequestRatio" yaml:"maxLimitRequestRatio"` + // Min usage constraints on this kind by resource name. + Min *map[string]Quantity `field:"optional" json:"min" yaml:"min"` +} + +// LimitRangeSpec defines a min/max usage limit for resources that match on kind. +type LimitRangeSpec struct { + // Limits is the list of LimitRangeItem objects that are enforced. + Limits *[]*LimitRangeItem `field:"required" json:"limits" yaml:"limits"` +} + +// LimitResponse defines how to handle requests that can not be executed right now. +type LimitResponseV1Beta1 struct { + // `type` is "Queue" or "Reject". + // + // "Queue" means that requests that can not be executed upon arrival are held in a queue until they can be executed or a queuing limit is reached. "Reject" means that requests that can not be executed upon arrival are rejected. Required. + Type *string `field:"required" json:"type" yaml:"type"` + // `queuing` holds the configuration parameters for queuing. + // + // This field may be non-empty only if `type` is `"Queue"`. + Queuing *QueuingConfigurationV1Beta1 `field:"optional" json:"queuing" yaml:"queuing"` +} + +// LimitedPriorityLevelConfiguration specifies how to handle requests that are subject to limits. +// +// It addresses two issues: +// * How are requests for this priority level limited? +// * What should be done with requests that exceed the limit? +type LimitedPriorityLevelConfigurationV1Beta1 struct { + // `assuredConcurrencyShares` (ACS) configures the execution limit, which is a limit on the number of requests of this priority level that may be exeucting at a given time. + // + // ACS must be a positive number. The server's concurrency limit (SCL) is divided among the concurrency-controlled priority levels in proportion to their assured concurrency shares. This produces the assured concurrency value (ACV) --- the number of requests that may be executing at a time --- for each such priority level: + // + // ACV(l) = ceil( SCL * ACS(l) / ( sum[priority levels k] ACS(k) ) ) + // + // bigger numbers of ACS mean more reserved concurrent requests (at the expense of every other PL). This field has a default value of 30. + AssuredConcurrencyShares *float64 `field:"optional" json:"assuredConcurrencyShares" yaml:"assuredConcurrencyShares"` + // `limitResponse` indicates what to do with requests that can not be executed right now. + LimitResponse *LimitResponseV1Beta1 `field:"optional" json:"limitResponse" yaml:"limitResponse"` +} + +// ListMeta describes metadata that synthetic resources must have, including lists and various status objects. +// +// A resource may have only one of {ObjectMeta, ListMeta}. +type ListMeta struct { + // continue may be set if the user set a limit on the number of items returned, and indicates that the server has more data available. + // + // The value is opaque and may be used to issue another request to the endpoint that served this list to retrieve the next set of available objects. Continuing a consistent list may not be possible if the server configuration has changed or more than a few minutes have passed. The resourceVersion field returned when using this continue value will be identical to the value in the first response, unless you have received this token from an error message. + Continue *string `field:"optional" json:"continue" yaml:"continue"` + // remainingItemCount is the number of subsequent items in the list which are not included in this list response. + // + // If the list request contained label or field selectors, then the number of remaining items is unknown and the field will be left unset and omitted during serialization. If the list is complete (either because it is not chunking or because this is the last chunk), then there are no more remaining items and this field will be left unset and omitted during serialization. Servers older than v1.15 do not set this field. The intended use of the remainingItemCount is *estimating* the size of a collection. Clients should not rely on the remainingItemCount to be set or to be exact. + RemainingItemCount *float64 `field:"optional" json:"remainingItemCount" yaml:"remainingItemCount"` + // String that identifies the server's internal version of this object that can be used by clients to determine when objects have changed. + // + // Value must be treated as opaque by clients and passed unmodified back to the server. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency + ResourceVersion *string `field:"optional" json:"resourceVersion" yaml:"resourceVersion"` + // selfLink is a URL representing this object. Populated by the system. Read-only. + // + // DEPRECATED Kubernetes will stop propagating this field in 1.20 release and the field is planned to be removed in 1.21 release. + SelfLink *string `field:"optional" json:"selfLink" yaml:"selfLink"` +} + +// LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. +type LocalObjectReference struct { + // Name of the referent. + // + // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + Name *string `field:"optional" json:"name" yaml:"name"` +} + +// Local represents directly-attached storage with node affinity (Beta feature). +type LocalVolumeSource struct { + // The full path to the volume on the node. + // + // It can be either a directory or block device (disk, partition, ...). + Path *string `field:"required" json:"path" yaml:"path"` + // Filesystem type to mount. + // + // It applies only when the Path is a block device. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". The default value is to auto-select a fileystem if unspecified. + FsType *string `field:"optional" json:"fsType" yaml:"fsType"` +} + +// ManagedFieldsEntry is a workflow-id, a FieldSet and the group version of the resource that the fieldset applies to. +type ManagedFieldsEntry struct { + // APIVersion defines the version of this resource that this field set applies to. + // + // The format is "group/version" just like the top-level APIVersion field. It is necessary to track the version of a field set because it cannot be automatically converted. + ApiVersion *string `field:"optional" json:"apiVersion" yaml:"apiVersion"` + // FieldsType is the discriminator for the different fields format and version. + // + // There is currently only one possible value: "FieldsV1". + FieldsType *string `field:"optional" json:"fieldsType" yaml:"fieldsType"` + // FieldsV1 holds the first JSON version format as described in the "FieldsV1" type. + FieldsV1 interface{} `field:"optional" json:"fieldsV1" yaml:"fieldsV1"` + // Manager is an identifier of the workflow managing these fields. + Manager *string `field:"optional" json:"manager" yaml:"manager"` + // Operation is the type of operation which lead to this ManagedFieldsEntry being created. + // + // The only valid values for this field are 'Apply' and 'Update'. + Operation *string `field:"optional" json:"operation" yaml:"operation"` + // Subresource is the name of the subresource used to update that object, or empty string if the object was updated through the main resource. + // + // The value of this field is used to distinguish between managers, even if they share the same name. For example, a status update will be distinct from a regular update using the same manager name. Note that the APIVersion field is not related to the Subresource field and it always corresponds to the version of the main resource. + Subresource *string `field:"optional" json:"subresource" yaml:"subresource"` + // Time is timestamp of when these fields were set. + // + // It should always be empty if Operation is 'Apply'. + Time *time.Time `field:"optional" json:"time" yaml:"time"` +} + +// MetricIdentifier defines the name and optionally selector for a metric. +type MetricIdentifierV2Beta2 struct { + // name is the name of the given metric. + Name *string `field:"required" json:"name" yaml:"name"` + // selector is the string-encoded form of a standard kubernetes label selector for the given metric When set, it is passed as an additional parameter to the metrics server for more specific metrics scoping. + // + // When unset, just the metricName will be used to gather metrics. + Selector *LabelSelector `field:"optional" json:"selector" yaml:"selector"` +} + +// MetricSpec specifies how to scale based on a single metric (only `type` and one other matching field should be set at once). +type MetricSpecV2Beta1 struct { + // type is the type of metric source. + // + // It should be one of "ContainerResource", "External", "Object", "Pods" or "Resource", each mapping to a matching field in the object. Note: "ContainerResource" type is available on when the feature-gate HPAContainerMetrics is enabled + Type *string `field:"required" json:"type" yaml:"type"` + // container resource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing a single container in each pod of the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the "pods" source. This is an alpha feature and can be enabled by the HPAContainerMetrics feature flag. + ContainerResource *ContainerResourceMetricSourceV2Beta1 `field:"optional" json:"containerResource" yaml:"containerResource"` + // external refers to a global metric that is not associated with any Kubernetes object. + // + // It allows autoscaling based on information coming from components running outside of cluster (for example length of queue in cloud messaging service, or QPS from loadbalancer running outside of cluster). + External *ExternalMetricSourceV2Beta1 `field:"optional" json:"external" yaml:"external"` + // object refers to a metric describing a single kubernetes object (for example, hits-per-second on an Ingress object). + Object *ObjectMetricSourceV2Beta1 `field:"optional" json:"object" yaml:"object"` + // pods refers to a metric describing each pod in the current scale target (for example, transactions-processed-per-second). + // + // The values will be averaged together before being compared to the target value. + Pods *PodsMetricSourceV2Beta1 `field:"optional" json:"pods" yaml:"pods"` + // resource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the "pods" source. + Resource *ResourceMetricSourceV2Beta1 `field:"optional" json:"resource" yaml:"resource"` +} + +// MetricSpec specifies how to scale based on a single metric (only `type` and one other matching field should be set at once). +type MetricSpecV2Beta2 struct { + // type is the type of metric source. + // + // It should be one of "ContainerResource", "External", "Object", "Pods" or "Resource", each mapping to a matching field in the object. Note: "ContainerResource" type is available on when the feature-gate HPAContainerMetrics is enabled + Type *string `field:"required" json:"type" yaml:"type"` + // container resource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing a single container in each pod of the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the "pods" source. This is an alpha feature and can be enabled by the HPAContainerMetrics feature flag. + ContainerResource *ContainerResourceMetricSourceV2Beta2 `field:"optional" json:"containerResource" yaml:"containerResource"` + // external refers to a global metric that is not associated with any Kubernetes object. + // + // It allows autoscaling based on information coming from components running outside of cluster (for example length of queue in cloud messaging service, or QPS from loadbalancer running outside of cluster). + External *ExternalMetricSourceV2Beta2 `field:"optional" json:"external" yaml:"external"` + // object refers to a metric describing a single kubernetes object (for example, hits-per-second on an Ingress object). + Object *ObjectMetricSourceV2Beta2 `field:"optional" json:"object" yaml:"object"` + // pods refers to a metric describing each pod in the current scale target (for example, transactions-processed-per-second). + // + // The values will be averaged together before being compared to the target value. + Pods *PodsMetricSourceV2Beta2 `field:"optional" json:"pods" yaml:"pods"` + // resource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the "pods" source. + Resource *ResourceMetricSourceV2Beta2 `field:"optional" json:"resource" yaml:"resource"` +} + +// MetricTarget defines the target value, average value, or average utilization of a specific metric. +type MetricTargetV2Beta2 struct { + // type represents whether the metric type is Utilization, Value, or AverageValue. + Type *string `field:"required" json:"type" yaml:"type"` + // averageUtilization is the target value of the average of the resource metric across all relevant pods, represented as a percentage of the requested value of the resource for the pods. + // + // Currently only valid for Resource metric source type. + AverageUtilization *float64 `field:"optional" json:"averageUtilization" yaml:"averageUtilization"` + // averageValue is the target value of the average of the metric across all relevant pods (as a quantity). + AverageValue Quantity `field:"optional" json:"averageValue" yaml:"averageValue"` + // value is the target value of the metric (as a quantity). + Value Quantity `field:"optional" json:"value" yaml:"value"` +} + +// MutatingWebhook describes an admission webhook and the resources and operations it applies to. +type MutatingWebhook struct { + // AdmissionReviewVersions is an ordered list of preferred `AdmissionReview` versions the Webhook expects. + // + // API server will try to use first version in the list which it supports. If none of the versions specified in this list supported by API server, validation will fail for this object. If a persisted webhook configuration specifies allowed versions and does not include any versions known to the API Server, calls to the webhook will fail and be subject to the failure policy. + AdmissionReviewVersions *[]*string `field:"required" json:"admissionReviewVersions" yaml:"admissionReviewVersions"` + // ClientConfig defines how to communicate with the hook. + // + // Required. + ClientConfig *WebhookClientConfig `field:"required" json:"clientConfig" yaml:"clientConfig"` + // The name of the admission webhook. + // + // Name should be fully qualified, e.g., imagepolicy.kubernetes.io, where "imagepolicy" is the name of the webhook, and kubernetes.io is the name of the organization. Required. + Name *string `field:"required" json:"name" yaml:"name"` + // SideEffects states whether this webhook has side effects. + // + // Acceptable values are: None, NoneOnDryRun (webhooks created via v1beta1 may also specify Some or Unknown). Webhooks with side effects MUST implement a reconciliation system, since a request may be rejected by a future step in the admission chain and the side effects therefore need to be undone. Requests with the dryRun attribute will be auto-rejected if they match a webhook with sideEffects == Unknown or Some. + SideEffects *string `field:"required" json:"sideEffects" yaml:"sideEffects"` + // FailurePolicy defines how unrecognized errors from the admission endpoint are handled - allowed values are Ignore or Fail. + // + // Defaults to Fail. + FailurePolicy *string `field:"optional" json:"failurePolicy" yaml:"failurePolicy"` + // matchPolicy defines how the "rules" list is used to match incoming requests. Allowed values are "Exact" or "Equivalent". + // + // - Exact: match a request only if it exactly matches a specified rule. For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, but "rules" only included `apiGroups:["apps"], apiVersions:["v1"], resources: ["deployments"]`, a request to apps/v1beta1 or extensions/v1beta1 would not be sent to the webhook. + // + // - Equivalent: match a request if modifies a resource listed in rules, even via another API group or version. For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, and "rules" only included `apiGroups:["apps"], apiVersions:["v1"], resources: ["deployments"]`, a request to apps/v1beta1 or extensions/v1beta1 would be converted to apps/v1 and sent to the webhook. + // + // Defaults to "Equivalent". + MatchPolicy *string `field:"optional" json:"matchPolicy" yaml:"matchPolicy"` + // NamespaceSelector decides whether to run the webhook on an object based on whether the namespace for that object matches the selector. + // + // If the object itself is a namespace, the matching is performed on object.metadata.labels. If the object is another cluster scoped resource, it never skips the webhook. + // + // For example, to run the webhook on any objects whose namespace is not associated with "runlevel" of "0" or "1"; you will set the selector as follows: "namespaceSelector": { + // "matchExpressions": [ + // { + // "key": "runlevel", + // "operator": "NotIn", + // "values": [ + // "0", + // "1" + // ] + // } + // ] + // } + // + // If instead you want to only run the webhook on any objects whose namespace is associated with the "environment" of "prod" or "staging"; you will set the selector as follows: "namespaceSelector": { + // "matchExpressions": [ + // { + // "key": "environment", + // "operator": "In", + // "values": [ + // "prod", + // "staging" + // ] + // } + // ] + // } + // + // See https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ for more examples of label selectors. + // + // Default to the empty LabelSelector, which matches everything. + NamespaceSelector *LabelSelector `field:"optional" json:"namespaceSelector" yaml:"namespaceSelector"` + // ObjectSelector decides whether to run the webhook based on if the object has matching labels. + // + // objectSelector is evaluated against both the oldObject and newObject that would be sent to the webhook, and is considered to match if either object matches the selector. A null object (oldObject in the case of create, or newObject in the case of delete) or an object that cannot have labels (like a DeploymentRollback or a PodProxyOptions object) is not considered to match. Use the object selector only if the webhook is opt-in, because end users may skip the admission webhook by setting the labels. Default to the empty LabelSelector, which matches everything. + ObjectSelector *LabelSelector `field:"optional" json:"objectSelector" yaml:"objectSelector"` + // reinvocationPolicy indicates whether this webhook should be called multiple times as part of a single admission evaluation. + // + // Allowed values are "Never" and "IfNeeded". + // + // Never: the webhook will not be called more than once in a single admission evaluation. + // + // IfNeeded: the webhook will be called at least one additional time as part of the admission evaluation if the object being admitted is modified by other admission plugins after the initial webhook call. Webhooks that specify this option *must* be idempotent, able to process objects they previously admitted. Note: * the number of additional invocations is not guaranteed to be exactly one. * if additional invocations result in further modifications to the object, webhooks are not guaranteed to be invoked again. * webhooks that use this option may be reordered to minimize the number of additional invocations. * to validate an object after all mutations are guaranteed complete, use a validating admission webhook instead. + // + // Defaults to "Never". + ReinvocationPolicy *string `field:"optional" json:"reinvocationPolicy" yaml:"reinvocationPolicy"` + // Rules describes what operations on what resources/subresources the webhook cares about. + // + // The webhook cares about an operation if it matches _any_ Rule. However, in order to prevent ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks from putting the cluster in a state which cannot be recovered from without completely disabling the plugin, ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks are never called on admission requests for ValidatingWebhookConfiguration and MutatingWebhookConfiguration objects. + Rules *[]*RuleWithOperations `field:"optional" json:"rules" yaml:"rules"` + // TimeoutSeconds specifies the timeout for this webhook. + // + // After the timeout passes, the webhook call will be ignored or the API call will fail based on the failure policy. The timeout value must be between 1 and 30 seconds. Default to 10 seconds. + TimeoutSeconds *float64 `field:"optional" json:"timeoutSeconds" yaml:"timeoutSeconds"` +} + +// NamespaceSpec describes the attributes on a Namespace. +type NamespaceSpec struct { + // Finalizers is an opaque list of values that must be empty to permanently remove object from storage. + // + // More info: https://kubernetes.io/docs/tasks/administer-cluster/namespaces/ + Finalizers *[]*string `field:"optional" json:"finalizers" yaml:"finalizers"` +} + +// NetworkPolicyEgressRule describes a particular set of traffic that is allowed out of pods matched by a NetworkPolicySpec's podSelector. +// +// The traffic must match both ports and to. This type is beta-level in 1.8 +type NetworkPolicyEgressRule struct { + // List of destination ports for outgoing traffic. + // + // Each item in this list is combined using a logical OR. If this field is empty or missing, this rule matches all ports (traffic not restricted by port). If this field is present and contains at least one item, then this rule allows traffic only if the traffic matches at least one port in the list. + Ports *[]*NetworkPolicyPort `field:"optional" json:"ports" yaml:"ports"` + // List of destinations for outgoing traffic of pods selected for this rule. + // + // Items in this list are combined using a logical OR operation. If this field is empty or missing, this rule matches all destinations (traffic not restricted by destination). If this field is present and contains at least one item, this rule allows traffic only if the traffic matches at least one item in the to list. + To *[]*NetworkPolicyPeer `field:"optional" json:"to" yaml:"to"` +} + +// NetworkPolicyIngressRule describes a particular set of traffic that is allowed to the pods matched by a NetworkPolicySpec's podSelector. +// +// The traffic must match both ports and from. +type NetworkPolicyIngressRule struct { + // List of sources which should be able to access the pods selected for this rule. + // + // Items in this list are combined using a logical OR operation. If this field is empty or missing, this rule matches all sources (traffic not restricted by source). If this field is present and contains at least one item, this rule allows traffic only if the traffic matches at least one item in the from list. + From *[]*NetworkPolicyPeer `field:"optional" json:"from" yaml:"from"` + // List of ports which should be made accessible on the pods selected for this rule. + // + // Each item in this list is combined using a logical OR. If this field is empty or missing, this rule matches all ports (traffic not restricted by port). If this field is present and contains at least one item, then this rule allows traffic only if the traffic matches at least one port in the list. + Ports *[]*NetworkPolicyPort `field:"optional" json:"ports" yaml:"ports"` +} + +// NetworkPolicyPeer describes a peer to allow traffic to/from. +// +// Only certain combinations of fields are allowed. +type NetworkPolicyPeer struct { + // IPBlock defines policy on a particular IPBlock. + // + // If this field is set then neither of the other fields can be. + IpBlock *IpBlock `field:"optional" json:"ipBlock" yaml:"ipBlock"` + // Selects Namespaces using cluster-scoped labels. + // + // This field follows standard label selector semantics; if present but empty, it selects all namespaces. + // + // If PodSelector is also set, then the NetworkPolicyPeer as a whole selects the Pods matching PodSelector in the Namespaces selected by NamespaceSelector. Otherwise it selects all Pods in the Namespaces selected by NamespaceSelector. + NamespaceSelector *LabelSelector `field:"optional" json:"namespaceSelector" yaml:"namespaceSelector"` + // This is a label selector which selects Pods. + // + // This field follows standard label selector semantics; if present but empty, it selects all pods. + // + // If NamespaceSelector is also set, then the NetworkPolicyPeer as a whole selects the Pods matching PodSelector in the Namespaces selected by NamespaceSelector. Otherwise it selects the Pods matching PodSelector in the policy's own Namespace. + PodSelector *LabelSelector `field:"optional" json:"podSelector" yaml:"podSelector"` +} + +// NetworkPolicyPort describes a port to allow traffic on. +type NetworkPolicyPort struct { + // If set, indicates that the range of ports from port to endPort, inclusive, should be allowed by the policy. + // + // This field cannot be defined if the port field is not defined or if the port field is defined as a named (string) port. The endPort must be equal or greater than port. This feature is in Beta state and is enabled by default. It can be disabled using the Feature Gate "NetworkPolicyEndPort". + EndPort *float64 `field:"optional" json:"endPort" yaml:"endPort"` + // The port on the given protocol. + // + // This can either be a numerical or named port on a pod. If this field is not provided, this matches all port names and numbers. If present, only traffic on the specified protocol AND port will be matched. + Port IntOrString `field:"optional" json:"port" yaml:"port"` + // The protocol (TCP, UDP, or SCTP) which traffic must match. + // + // If not specified, this field defaults to TCP. + Protocol *string `field:"optional" json:"protocol" yaml:"protocol"` +} + +// NetworkPolicySpec provides the specification of a NetworkPolicy. +type NetworkPolicySpec struct { + // Selects the pods to which this NetworkPolicy object applies. + // + // The array of ingress rules is applied to any pods selected by this field. Multiple network policies can select the same set of pods. In this case, the ingress rules for each are combined additively. This field is NOT optional and follows standard label selector semantics. An empty podSelector matches all pods in this namespace. + PodSelector *LabelSelector `field:"required" json:"podSelector" yaml:"podSelector"` + // List of egress rules to be applied to the selected pods. + // + // Outgoing traffic is allowed if there are no NetworkPolicies selecting the pod (and cluster policy otherwise allows the traffic), OR if the traffic matches at least one egress rule across all of the NetworkPolicy objects whose podSelector matches the pod. If this field is empty then this NetworkPolicy limits all outgoing traffic (and serves solely to ensure that the pods it selects are isolated by default). This field is beta-level in 1.8 + Egress *[]*NetworkPolicyEgressRule `field:"optional" json:"egress" yaml:"egress"` + // List of ingress rules to be applied to the selected pods. + // + // Traffic is allowed to a pod if there are no NetworkPolicies selecting the pod (and cluster policy otherwise allows the traffic), OR if the traffic source is the pod's local node, OR if the traffic matches at least one ingress rule across all of the NetworkPolicy objects whose podSelector matches the pod. If this field is empty then this NetworkPolicy does not allow any traffic (and serves solely to ensure that the pods it selects are isolated by default) + Ingress *[]*NetworkPolicyIngressRule `field:"optional" json:"ingress" yaml:"ingress"` + // List of rule types that the NetworkPolicy relates to. + // + // Valid options are ["Ingress"], ["Egress"], or ["Ingress", "Egress"]. If this field is not specified, it will default based on the existence of Ingress or Egress rules; policies that contain an Egress section are assumed to affect Egress, and all policies (whether or not they contain an Ingress section) are assumed to affect Ingress. If you want to write an egress-only policy, you must explicitly specify policyTypes [ "Egress" ]. Likewise, if you want to write a policy that specifies that no egress is allowed, you must specify a policyTypes value that include "Egress" (since such a policy would not include an Egress section and would otherwise default to just [ "Ingress" ]). This field is beta-level in 1.8 + PolicyTypes *[]*string `field:"optional" json:"policyTypes" yaml:"policyTypes"` +} + +// Represents an NFS mount that lasts the lifetime of a pod. +// +// NFS volumes do not support ownership management or SELinux relabeling. +type NfsVolumeSource struct { + // Path that is exported by the NFS server. + // + // More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs + Path *string `field:"required" json:"path" yaml:"path"` + // Server is the hostname or IP address of the NFS server. + // + // More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs + Server *string `field:"required" json:"server" yaml:"server"` + // ReadOnly here will force the NFS export to be mounted with read-only permissions. + // + // Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs + ReadOnly *bool `field:"optional" json:"readOnly" yaml:"readOnly"` +} + +// Node affinity is a group of node affinity scheduling rules. +type NodeAffinity struct { + // The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. + // + // The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node matches the corresponding matchExpressions; the node(s) with the highest sum are the most preferred. + PreferredDuringSchedulingIgnoredDuringExecution *[]*PreferredSchedulingTerm `field:"optional" json:"preferredDuringSchedulingIgnoredDuringExecution" yaml:"preferredDuringSchedulingIgnoredDuringExecution"` + // If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. + // + // If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to an update), the system may or may not try to eventually evict the pod from its node. + RequiredDuringSchedulingIgnoredDuringExecution *NodeSelector `field:"optional" json:"requiredDuringSchedulingIgnoredDuringExecution" yaml:"requiredDuringSchedulingIgnoredDuringExecution"` +} + +// NodeConfigSource specifies a source of node configuration. +// +// Exactly one subfield (excluding metadata) must be non-nil. This API is deprecated since 1.22 +type NodeConfigSource struct { + // ConfigMap is a reference to a Node's ConfigMap. + ConfigMap *ConfigMapNodeConfigSource `field:"optional" json:"configMap" yaml:"configMap"` +} + +// A node selector represents the union of the results of one or more label queries over a set of nodes; +// +// that is, it represents the OR of the selectors represented by the node selector terms. +type NodeSelector struct { + // Required. + // + // A list of node selector terms. The terms are ORed. + NodeSelectorTerms *[]*NodeSelectorTerm `field:"required" json:"nodeSelectorTerms" yaml:"nodeSelectorTerms"` +} + +// A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values. +type NodeSelectorRequirement struct { + // The label key that the selector applies to. + Key *string `field:"required" json:"key" yaml:"key"` + // Represents a key's relationship to a set of values. + // + // Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. + Operator *string `field:"required" json:"operator" yaml:"operator"` + // 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. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch. + Values *[]*string `field:"optional" json:"values" yaml:"values"` +} + +// A null or empty node selector term matches no objects. +// +// The requirements of them are ANDed. The TopologySelectorTerm type implements a subset of the NodeSelectorTerm. +type NodeSelectorTerm struct { + // A list of node selector requirements by node's labels. + MatchExpressions *[]*NodeSelectorRequirement `field:"optional" json:"matchExpressions" yaml:"matchExpressions"` + // A list of node selector requirements by node's fields. + MatchFields *[]*NodeSelectorRequirement `field:"optional" json:"matchFields" yaml:"matchFields"` +} + +// NodeSpec describes the attributes that a node is created with. +type NodeSpec struct { + // Deprecated. + // + // If specified, the source of the node's configuration. The DynamicKubeletConfig feature gate must be enabled for the Kubelet to use this field. This field is deprecated as of 1.22: https://git.k8s.io/enhancements/keps/sig-node/281-dynamic-kubelet-configuration + ConfigSource *NodeConfigSource `field:"optional" json:"configSource" yaml:"configSource"` + // Deprecated. + // + // Not all kubelets will set this field. Remove field after 1.13. see: https://issues.k8s.io/61966 + ExternalId *string `field:"optional" json:"externalId" yaml:"externalId"` + // PodCIDR represents the pod IP range assigned to the node. + PodCidr *string `field:"optional" json:"podCidr" yaml:"podCidr"` + // podCIDRs represents the IP ranges assigned to the node for usage by Pods on that node. + // + // If this field is specified, the 0th entry must match the podCIDR field. It may contain at most 1 value for each of IPv4 and IPv6. + PodCidRs *[]*string `field:"optional" json:"podCidRs" yaml:"podCidRs"` + // ID of the node assigned by the cloud provider in the format: ://. + ProviderId *string `field:"optional" json:"providerId" yaml:"providerId"` + // If specified, the node's taints. + Taints *[]*Taint `field:"optional" json:"taints" yaml:"taints"` + // Unschedulable controls node schedulability of new pods. + // + // By default, node is schedulable. More info: https://kubernetes.io/docs/concepts/nodes/node/#manual-node-administration + Unschedulable *bool `field:"optional" json:"unschedulable" yaml:"unschedulable"` +} + +// NonResourceAttributes includes the authorization attributes available for non-resource requests to the Authorizer interface. +type NonResourceAttributes struct { + // Path is the URL path of the request. + Path *string `field:"optional" json:"path" yaml:"path"` + // Verb is the standard HTTP verb. + Verb *string `field:"optional" json:"verb" yaml:"verb"` +} + +// NonResourcePolicyRule is a predicate that matches non-resource requests according to their verb and the target non-resource URL. +// +// A NonResourcePolicyRule matches a request if and only if both (a) at least one member of verbs matches the request and (b) at least one member of nonResourceURLs matches the request. +type NonResourcePolicyRuleV1Beta1 struct { + // `nonResourceURLs` is a set of url prefixes that a user should have access to and may not be empty. + // + // For example: + // - "/healthz" is legal + // - "/hea*" is illegal + // - "/hea" is legal but matches nothing + // - "/hea/*" also matches nothing + // - "/healthz/*" matches all per-component health checks. + // "*" matches all non-resource urls. if it is present, it must be the only entry. Required. + NonResourceUrLs *[]*string `field:"required" json:"nonResourceUrLs" yaml:"nonResourceUrLs"` + // `verbs` is a list of matching verbs and may not be empty. + // + // "*" matches all verbs. If it is present, it must be the only entry. Required. + Verbs *[]*string `field:"required" json:"verbs" yaml:"verbs"` +} + +// ObjectFieldSelector selects an APIVersioned field of an object. +type ObjectFieldSelector struct { + // Path of the field to select in the specified API version. + FieldPath *string `field:"required" json:"fieldPath" yaml:"fieldPath"` + // Version of the schema the FieldPath is written in terms of, defaults to "v1". + ApiVersion *string `field:"optional" json:"apiVersion" yaml:"apiVersion"` +} + +// ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create. +type ObjectMeta struct { + // Annotations is an unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. + // + // They are not queryable and should be preserved when modifying objects. More info: http://kubernetes.io/docs/user-guide/annotations + Annotations *map[string]*string `field:"optional" json:"annotations" yaml:"annotations"` + // The name of the cluster which the object belongs to. + // + // This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request. + ClusterName *string `field:"optional" json:"clusterName" yaml:"clusterName"` + // CreationTimestamp is a timestamp representing the server time when this object was created. + // + // It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC. + // + // Populated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + CreationTimestamp *time.Time `field:"optional" json:"creationTimestamp" yaml:"creationTimestamp"` + // Number of seconds allowed for this object to gracefully terminate before it will be removed from the system. + // + // Only set when deletionTimestamp is also set. May only be shortened. Read-only. + DeletionGracePeriodSeconds *float64 `field:"optional" json:"deletionGracePeriodSeconds" yaml:"deletionGracePeriodSeconds"` + // DeletionTimestamp is RFC 3339 date and time at which this resource will be deleted. + // + // This field is set by the server when a graceful deletion is requested by the user, and is not directly settable by a client. The resource is expected to be deleted (no longer visible from resource lists, and not reachable by name) after the time in this field, once the finalizers list is empty. As long as the finalizers list contains items, deletion is blocked. Once the deletionTimestamp is set, this value may not be unset or be set further into the future, although it may be shortened or the resource may be deleted prior to this time. For example, a user may request that a pod is deleted in 30 seconds. The Kubelet will react by sending a graceful termination signal to the containers in the pod. After that 30 seconds, the Kubelet will send a hard termination signal (SIGKILL) to the container and after cleanup, remove the pod from the API. In the presence of network partitions, this object may still exist after this timestamp, until an administrator or automated process can determine the resource is fully terminated. If not set, graceful deletion of the object has not been requested. + // + // Populated by the system when a graceful deletion is requested. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + DeletionTimestamp *time.Time `field:"optional" json:"deletionTimestamp" yaml:"deletionTimestamp"` + // Must be empty before the object is deleted from the registry. + // + // Each entry is an identifier for the responsible component that will remove the entry from the list. If the deletionTimestamp of the object is non-nil, entries in this list can only be removed. Finalizers may be processed and removed in any order. Order is NOT enforced because it introduces significant risk of stuck finalizers. finalizers is a shared field, any actor with permission can reorder it. If the finalizer list is processed in order, then this can lead to a situation in which the component responsible for the first finalizer in the list is waiting for a signal (field value, external system, or other) produced by a component responsible for a finalizer later in the list, resulting in a deadlock. Without enforced ordering finalizers are free to order amongst themselves and are not vulnerable to ordering changes in the list. + Finalizers *[]*string `field:"optional" json:"finalizers" yaml:"finalizers"` + // GenerateName is an optional prefix, used by the server, to generate a unique name ONLY IF the Name field has not been provided. + // + // If this field is used, the name returned to the client will be different than the name passed. This value will also be combined with a unique suffix. The provided value has the same validation rules as the Name field, and may be truncated by the length of the suffix required to make the value unique on the server. + // + // If this field is specified and the generated name exists, the server will NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header). + // + // Applied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#idempotency + GenerateName *string `field:"optional" json:"generateName" yaml:"generateName"` + // A sequence number representing a specific generation of the desired state. + // + // Populated by the system. Read-only. + Generation *float64 `field:"optional" json:"generation" yaml:"generation"` + // Map of string keys and values that can be used to organize and categorize (scope and select) objects. + // + // May match selectors of replication controllers and services. More info: http://kubernetes.io/docs/user-guide/labels + Labels *map[string]*string `field:"optional" json:"labels" yaml:"labels"` + // ManagedFields maps workflow-id and version to the set of fields that are managed by that workflow. + // + // This is mostly for internal housekeeping, and users typically shouldn't need to set or understand this field. A workflow can be the user's name, a controller's name, or the name of a specific apply path like "ci-cd". The set of fields is always in the version that the workflow used when modifying the object. + ManagedFields *[]*ManagedFieldsEntry `field:"optional" json:"managedFields" yaml:"managedFields"` + // Name must be unique within a namespace. + // + // Is required when creating resources, although some resources may allow a client to request the generation of an appropriate name automatically. Name is primarily intended for creation idempotence and configuration definition. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/identifiers#names + Name *string `field:"optional" json:"name" yaml:"name"` + // Namespace defines the space within which each name must be unique. + // + // An empty namespace is equivalent to the "default" namespace, but "default" is the canonical representation. Not all objects are required to be scoped to a namespace - the value of this field for those objects will be empty. + // + // Must be a DNS_LABEL. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/namespaces + Namespace *string `field:"optional" json:"namespace" yaml:"namespace"` + // List of objects depended by this object. + // + // If ALL objects in the list have been deleted, this object will be garbage collected. If this object is managed by a controller, then an entry in this list will point to this controller, with the controller field set to true. There cannot be more than one managing controller. + OwnerReferences *[]*OwnerReference `field:"optional" json:"ownerReferences" yaml:"ownerReferences"` + // An opaque value that represents the internal version of this object that can be used by clients to determine when objects have changed. + // + // May be used for optimistic concurrency, change detection, and the watch operation on a resource or set of resources. Clients must treat these values as opaque and passed unmodified back to the server. They may only be valid for a particular resource or set of resources. + // + // Populated by the system. Read-only. Value must be treated as opaque by clients and . More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency + ResourceVersion *string `field:"optional" json:"resourceVersion" yaml:"resourceVersion"` + // SelfLink is a URL representing this object. Populated by the system. Read-only. + // + // DEPRECATED Kubernetes will stop propagating this field in 1.20 release and the field is planned to be removed in 1.21 release. + SelfLink *string `field:"optional" json:"selfLink" yaml:"selfLink"` + // UID is the unique in time and space value for this object. + // + // It is typically generated by the server on successful creation of a resource and is not allowed to change on PUT operations. + // + // Populated by the system. Read-only. More info: http://kubernetes.io/docs/user-guide/identifiers#uids + Uid *string `field:"optional" json:"uid" yaml:"uid"` +} + +// ObjectMetricSource indicates how to scale on a metric describing a kubernetes object (for example, hits-per-second on an Ingress object). +type ObjectMetricSourceV2Beta1 struct { + // metricName is the name of the metric in question. + MetricName *string `field:"required" json:"metricName" yaml:"metricName"` + // target is the described Kubernetes object. + Target *CrossVersionObjectReferenceV2Beta1 `field:"required" json:"target" yaml:"target"` + // targetValue is the target value of the metric (as a quantity). + TargetValue Quantity `field:"required" json:"targetValue" yaml:"targetValue"` + // averageValue is the target value of the average of the metric across all relevant pods (as a quantity). + AverageValue Quantity `field:"optional" json:"averageValue" yaml:"averageValue"` + // selector is the string-encoded form of a standard kubernetes label selector for the given metric When set, it is passed as an additional parameter to the metrics server for more specific metrics scoping When unset, just the metricName will be used to gather metrics. + Selector *LabelSelector `field:"optional" json:"selector" yaml:"selector"` +} + +// ObjectMetricSource indicates how to scale on a metric describing a kubernetes object (for example, hits-per-second on an Ingress object). +type ObjectMetricSourceV2Beta2 struct { + DescribedObject *CrossVersionObjectReferenceV2Beta2 `field:"required" json:"describedObject" yaml:"describedObject"` + // metric identifies the target metric by name and selector. + Metric *MetricIdentifierV2Beta2 `field:"required" json:"metric" yaml:"metric"` + // target specifies the target value for the given metric. + Target *MetricTargetV2Beta2 `field:"required" json:"target" yaml:"target"` +} + +// ObjectReference contains enough information to let you inspect or modify_helm the referred object. +type ObjectReference struct { + // API version of the referent. + ApiVersion *string `field:"optional" json:"apiVersion" yaml:"apiVersion"` + // If referring to a piece of an object instead of an entire object, this string should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. For example, if the object reference is to a container within a pod, this would take on a value like: "spec.containers{name}" (where "name" refers to the name of the container that triggered the event) or if no container name is specified "spec.containers[2]" (container with index 2 in this pod). This syntax is chosen only to have some well-defined way of referencing a part of an object. + FieldPath *string `field:"optional" json:"fieldPath" yaml:"fieldPath"` + // Kind of the referent. + // + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + Kind *string `field:"optional" json:"kind" yaml:"kind"` + // Name of the referent. + // + // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + Name *string `field:"optional" json:"name" yaml:"name"` + // Namespace of the referent. + // + // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ + Namespace *string `field:"optional" json:"namespace" yaml:"namespace"` + // Specific resourceVersion to which this reference is made, if any. + // + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency + ResourceVersion *string `field:"optional" json:"resourceVersion" yaml:"resourceVersion"` + // UID of the referent. + // + // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids + Uid *string `field:"optional" json:"uid" yaml:"uid"` +} + +// Overhead structure represents the resource overhead associated with running a pod. +type Overhead struct { + // PodFixed represents the fixed resource overhead associated with running a pod. + PodFixed *map[string]Quantity `field:"optional" json:"podFixed" yaml:"podFixed"` +} + +// Overhead structure represents the resource overhead associated with running a pod. +type OverheadV1Alpha1 struct { + // PodFixed represents the fixed resource overhead associated with running a pod. + PodFixed *map[string]Quantity `field:"optional" json:"podFixed" yaml:"podFixed"` +} + +// Overhead structure represents the resource overhead associated with running a pod. +type OverheadV1Beta1 struct { + // PodFixed represents the fixed resource overhead associated with running a pod. + PodFixed *map[string]Quantity `field:"optional" json:"podFixed" yaml:"podFixed"` +} + +// OwnerReference contains enough information to let you identify an owning object. +// +// An owning object must be in the same namespace as the dependent, or be cluster-scoped, so there is no namespace field. +type OwnerReference struct { + // API version of the referent. + ApiVersion *string `field:"required" json:"apiVersion" yaml:"apiVersion"` + // Kind of the referent. + // + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + Kind *string `field:"required" json:"kind" yaml:"kind"` + // Name of the referent. + // + // More info: http://kubernetes.io/docs/user-guide/identifiers#names + Name *string `field:"required" json:"name" yaml:"name"` + // UID of the referent. + // + // More info: http://kubernetes.io/docs/user-guide/identifiers#uids + Uid *string `field:"required" json:"uid" yaml:"uid"` + // If true, AND if the owner has the "foregroundDeletion" finalizer, then the owner cannot be deleted from the key-value store until this reference is removed. + // + // Defaults to false. To set this field, a user needs "delete" permission of the owner, otherwise 422 (Unprocessable Entity) will be returned. + BlockOwnerDeletion *bool `field:"optional" json:"blockOwnerDeletion" yaml:"blockOwnerDeletion"` + // If true, this reference points to the managing controller. + Controller *bool `field:"optional" json:"controller" yaml:"controller"` +} + +// PersistentVolumeClaimSpec describes the common attributes of storage devices and allows a Source for provider-specific attributes. +type PersistentVolumeClaimSpec struct { + // AccessModes contains the desired access modes the volume should have. + // + // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1 + AccessModes *[]*string `field:"optional" json:"accessModes" yaml:"accessModes"` + // This field can be used to specify either: * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) * An existing PVC (PersistentVolumeClaim) If the provisioner or an external controller can support the specified data source, it will create a new volume based on the contents of the specified data source. If the AnyVolumeDataSource feature gate is enabled, this field will always have the same contents as the DataSourceRef field. + DataSource *TypedLocalObjectReference `field:"optional" json:"dataSource" yaml:"dataSource"` + // Specifies the object from which to populate the volume with data, if a non-empty volume is desired. + // + // This may be any local object from a non-empty API group (non core object) or a PersistentVolumeClaim object. When this field is specified, volume binding will only succeed if the type of the specified object matches some installed volume populator or dynamic provisioner. This field will replace the functionality of the DataSource field and as such if both fields are non-empty, they must have the same value. For backwards compatibility, both fields (DataSource and DataSourceRef) will be set to the same value automatically if one of them is empty and the other is non-empty. There are two important differences between DataSource and DataSourceRef: * While DataSource only allows two specific types of objects, DataSourceRef + // allows any non-core object, as well as PersistentVolumeClaim objects. + // * While DataSource ignores disallowed values (dropping them), DataSourceRef + // preserves all values, and generates an error if a disallowed value is + // specified. + // (Alpha) Using this field requires the AnyVolumeDataSource feature gate to be enabled. + DataSourceRef *TypedLocalObjectReference `field:"optional" json:"dataSourceRef" yaml:"dataSourceRef"` + // Resources represents the minimum resources the volume should have. + // + // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources + Resources *ResourceRequirements `field:"optional" json:"resources" yaml:"resources"` + // A label query over volumes to consider for binding. + Selector *LabelSelector `field:"optional" json:"selector" yaml:"selector"` + // Name of the StorageClass required by the claim. + // + // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1 + StorageClassName *string `field:"optional" json:"storageClassName" yaml:"storageClassName"` + // volumeMode defines what type of volume is required by the claim. + // + // Value of Filesystem is implied when not included in claim spec. + VolumeMode *string `field:"optional" json:"volumeMode" yaml:"volumeMode"` + // VolumeName is the binding reference to the PersistentVolume backing this claim. + VolumeName *string `field:"optional" json:"volumeName" yaml:"volumeName"` +} + +// PersistentVolumeClaimTemplate is used to produce PersistentVolumeClaim objects as part of an EphemeralVolumeSource. +type PersistentVolumeClaimTemplate struct { + // The specification for the PersistentVolumeClaim. + // + // The entire content is copied unchanged into the PVC that gets created from this template. The same fields as in a PersistentVolumeClaim are also valid here. + Spec *PersistentVolumeClaimSpec `field:"required" json:"spec" yaml:"spec"` + // May contain labels and annotations that will be copied into the PVC when creating it. + // + // No other fields are allowed and will be rejected during validation. + Metadata *ObjectMeta `field:"optional" json:"metadata" yaml:"metadata"` +} + +// PersistentVolumeClaimVolumeSource references the user's PVC in the same namespace. +// +// This volume finds the bound PV and mounts that volume for the pod. A PersistentVolumeClaimVolumeSource is, essentially, a wrapper around another type of volume that is owned by someone else (the system). +type PersistentVolumeClaimVolumeSource struct { + // ClaimName is the name of a PersistentVolumeClaim in the same namespace as the pod using this volume. + // + // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims + ClaimName *string `field:"required" json:"claimName" yaml:"claimName"` + // Will force the ReadOnly setting in VolumeMounts. + // + // Default false. + ReadOnly *bool `field:"optional" json:"readOnly" yaml:"readOnly"` +} + +// PersistentVolumeSpec is the specification of a persistent volume. +type PersistentVolumeSpec struct { + // AccessModes contains all ways the volume can be mounted. + // + // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes + AccessModes *[]*string `field:"optional" json:"accessModes" yaml:"accessModes"` + // AWSElasticBlockStore represents an AWS Disk resource that is attached to a kubelet's host machine and then exposed to the pod. + // + // More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore + AwsElasticBlockStore *AwsElasticBlockStoreVolumeSource `field:"optional" json:"awsElasticBlockStore" yaml:"awsElasticBlockStore"` + // AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod. + AzureDisk *AzureDiskVolumeSource `field:"optional" json:"azureDisk" yaml:"azureDisk"` + // AzureFile represents an Azure File Service mount on the host and bind mount to the pod. + AzureFile *AzureFilePersistentVolumeSource `field:"optional" json:"azureFile" yaml:"azureFile"` + // A description of the persistent volume's resources and capacity. + // + // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#capacity + Capacity *map[string]Quantity `field:"optional" json:"capacity" yaml:"capacity"` + // CephFS represents a Ceph FS mount on the host that shares a pod's lifetime. + Cephfs *CephFsPersistentVolumeSource `field:"optional" json:"cephfs" yaml:"cephfs"` + // Cinder represents a cinder volume attached and mounted on kubelets host machine. + // + // More info: https://examples.k8s.io/mysql-cinder-pd/README.md + Cinder *CinderPersistentVolumeSource `field:"optional" json:"cinder" yaml:"cinder"` + // ClaimRef is part of a bi-directional binding between PersistentVolume and PersistentVolumeClaim. + // + // Expected to be non-nil when bound. claim.VolumeName is the authoritative bind between PV and PVC. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#binding + ClaimRef *ObjectReference `field:"optional" json:"claimRef" yaml:"claimRef"` + // CSI represents storage that is handled by an external CSI driver (Beta feature). + Csi *CsiPersistentVolumeSource `field:"optional" json:"csi" yaml:"csi"` + // FC represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod. + Fc *FcVolumeSource `field:"optional" json:"fc" yaml:"fc"` + // FlexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin. + FlexVolume *FlexPersistentVolumeSource `field:"optional" json:"flexVolume" yaml:"flexVolume"` + // Flocker represents a Flocker volume attached to a kubelet's host machine and exposed to the pod for its usage. + // + // This depends on the Flocker control service being running. + Flocker *FlockerVolumeSource `field:"optional" json:"flocker" yaml:"flocker"` + // GCEPersistentDisk represents a GCE Disk resource that is attached to a kubelet's host machine and then exposed to the pod. + // + // Provisioned by an admin. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk + GcePersistentDisk *GcePersistentDiskVolumeSource `field:"optional" json:"gcePersistentDisk" yaml:"gcePersistentDisk"` + // Glusterfs represents a Glusterfs volume that is attached to a host and exposed to the pod. + // + // Provisioned by an admin. More info: https://examples.k8s.io/volumes/glusterfs/README.md + Glusterfs *GlusterfsPersistentVolumeSource `field:"optional" json:"glusterfs" yaml:"glusterfs"` + // HostPath represents a directory on the host. + // + // Provisioned by a developer or tester. This is useful for single-node development and testing only! On-host storage is not supported in any way and WILL NOT WORK in a multi-node cluster. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath + HostPath *HostPathVolumeSource `field:"optional" json:"hostPath" yaml:"hostPath"` + // ISCSI represents an ISCSI Disk resource that is attached to a kubelet's host machine and then exposed to the pod. + // + // Provisioned by an admin. + Iscsi *IscsiPersistentVolumeSource `field:"optional" json:"iscsi" yaml:"iscsi"` + // Local represents directly-attached storage with node affinity. + Local *LocalVolumeSource `field:"optional" json:"local" yaml:"local"` + // A list of mount options, e.g. ["ro", "soft"]. Not validated - mount will simply fail if one is invalid. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes/#mount-options. + MountOptions *[]*string `field:"optional" json:"mountOptions" yaml:"mountOptions"` + // NFS represents an NFS mount on the host. + // + // Provisioned by an admin. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs + Nfs *NfsVolumeSource `field:"optional" json:"nfs" yaml:"nfs"` + // NodeAffinity defines constraints that limit what nodes this volume can be accessed from. + // + // This field influences the scheduling of pods that use this volume. + NodeAffinity *VolumeNodeAffinity `field:"optional" json:"nodeAffinity" yaml:"nodeAffinity"` + // What happens to a persistent volume when released from its claim. + // + // Valid options are Retain (default for manually created PersistentVolumes), Delete (default for dynamically provisioned PersistentVolumes), and Recycle (deprecated). Recycle must be supported by the volume plugin underlying this PersistentVolume. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#reclaiming + PersistentVolumeReclaimPolicy *string `field:"optional" json:"persistentVolumeReclaimPolicy" yaml:"persistentVolumeReclaimPolicy"` + // PhotonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine. + PhotonPersistentDisk *PhotonPersistentDiskVolumeSource `field:"optional" json:"photonPersistentDisk" yaml:"photonPersistentDisk"` + // PortworxVolume represents a portworx volume attached and mounted on kubelets host machine. + PortworxVolume *PortworxVolumeSource `field:"optional" json:"portworxVolume" yaml:"portworxVolume"` + // Quobyte represents a Quobyte mount on the host that shares a pod's lifetime. + Quobyte *QuobyteVolumeSource `field:"optional" json:"quobyte" yaml:"quobyte"` + // RBD represents a Rados Block Device mount on the host that shares a pod's lifetime. + // + // More info: https://examples.k8s.io/volumes/rbd/README.md + Rbd *RbdPersistentVolumeSource `field:"optional" json:"rbd" yaml:"rbd"` + // ScaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes. + ScaleIo *ScaleIoPersistentVolumeSource `field:"optional" json:"scaleIo" yaml:"scaleIo"` + // Name of StorageClass to which this persistent volume belongs. + // + // Empty value means that this volume does not belong to any StorageClass. + StorageClassName *string `field:"optional" json:"storageClassName" yaml:"storageClassName"` + // StorageOS represents a StorageOS volume that is attached to the kubelet's host machine and mounted into the pod More info: https://examples.k8s.io/volumes/storageos/README.md. + Storageos *StorageOsPersistentVolumeSource `field:"optional" json:"storageos" yaml:"storageos"` + // volumeMode defines if a volume is intended to be used with a formatted filesystem or to remain in raw block state. + // + // Value of Filesystem is implied when not included in spec. + VolumeMode *string `field:"optional" json:"volumeMode" yaml:"volumeMode"` + // VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine. + VsphereVolume *VsphereVirtualDiskVolumeSource `field:"optional" json:"vsphereVolume" yaml:"vsphereVolume"` +} + +// Represents a Photon Controller persistent disk resource. +type PhotonPersistentDiskVolumeSource struct { + // ID that identifies Photon Controller persistent disk. + PdId *string `field:"required" json:"pdId" yaml:"pdId"` + // Filesystem type to mount. + // + // Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + FsType *string `field:"optional" json:"fsType" yaml:"fsType"` +} + +// Pod affinity is a group of inter pod affinity scheduling rules. +type PodAffinity struct { + // The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. + // + // The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. + PreferredDuringSchedulingIgnoredDuringExecution *[]*WeightedPodAffinityTerm `field:"optional" json:"preferredDuringSchedulingIgnoredDuringExecution" yaml:"preferredDuringSchedulingIgnoredDuringExecution"` + // If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. + // + // If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. + RequiredDuringSchedulingIgnoredDuringExecution *[]*PodAffinityTerm `field:"optional" json:"requiredDuringSchedulingIgnoredDuringExecution" yaml:"requiredDuringSchedulingIgnoredDuringExecution"` +} + +// Defines a set of pods (namely those matching the labelSelector relative to the given namespace(s)) that this pod should be co-located (affinity) or not co-located (anti-affinity) with, where co-located is defined as running on a node whose value of the label with key matches that of any node on which a pod of the set of pods is running. +type PodAffinityTerm struct { + // This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the labelSelector in the specified namespaces, where co-located is defined as running on a node whose value of the label with key topologyKey matches that of any node on which any of the selected pods is running. + // + // Empty topologyKey is not allowed. + TopologyKey *string `field:"required" json:"topologyKey" yaml:"topologyKey"` + // A label query over a set of resources, in this case pods. + LabelSelector *LabelSelector `field:"optional" json:"labelSelector" yaml:"labelSelector"` + // namespaces specifies a static list of namespace names that the term applies to. + // + // The term is applied to the union of the namespaces listed in this field and the ones selected by namespaceSelector. null or empty namespaces list and null namespaceSelector means "this pod's namespace" + Namespaces *[]*string `field:"optional" json:"namespaces" yaml:"namespaces"` + // A label query over the set of namespaces that the term applies to. + // + // The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field. null selector and null or empty namespaces list means "this pod's namespace". An empty selector ({}) matches all namespaces. This field is beta-level and is only honored when PodAffinityNamespaceSelector feature is enabled. + NamespaceSelector *LabelSelector `field:"optional" json:"namespaceSelector" yaml:"namespaceSelector"` +} + +// Pod anti affinity is a group of inter pod anti affinity scheduling rules. +type PodAntiAffinity struct { + // The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. + // + // The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. + PreferredDuringSchedulingIgnoredDuringExecution *[]*WeightedPodAffinityTerm `field:"optional" json:"preferredDuringSchedulingIgnoredDuringExecution" yaml:"preferredDuringSchedulingIgnoredDuringExecution"` + // If the anti-affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. + // + // If the anti-affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. + RequiredDuringSchedulingIgnoredDuringExecution *[]*PodAffinityTerm `field:"optional" json:"requiredDuringSchedulingIgnoredDuringExecution" yaml:"requiredDuringSchedulingIgnoredDuringExecution"` +} + +// PodDisruptionBudgetSpec is a description of a PodDisruptionBudget. +type PodDisruptionBudgetSpec struct { + // An eviction is allowed if at most "maxUnavailable" pods selected by "selector" are unavailable after the eviction, i.e. even in absence of the evicted pod. For example, one can prevent all voluntary evictions by specifying 0. This is a mutually exclusive setting with "minAvailable". + MaxUnavailable IntOrString `field:"optional" json:"maxUnavailable" yaml:"maxUnavailable"` + // An eviction is allowed if at least "minAvailable" pods selected by "selector" will still be available after the eviction, i.e. even in the absence of the evicted pod. So for example you can prevent all voluntary evictions by specifying "100%". + MinAvailable IntOrString `field:"optional" json:"minAvailable" yaml:"minAvailable"` + // Label query over pods whose evictions are managed by the disruption budget. + // + // A null selector will match no pods, while an empty ({}) selector will select all pods within the namespace. + Selector *LabelSelector `field:"optional" json:"selector" yaml:"selector"` +} + +// PodDisruptionBudgetSpec is a description of a PodDisruptionBudget. +type PodDisruptionBudgetSpecV1Beta1 struct { + // An eviction is allowed if at most "maxUnavailable" pods selected by "selector" are unavailable after the eviction, i.e. even in absence of the evicted pod. For example, one can prevent all voluntary evictions by specifying 0. This is a mutually exclusive setting with "minAvailable". + MaxUnavailable IntOrString `field:"optional" json:"maxUnavailable" yaml:"maxUnavailable"` + // An eviction is allowed if at least "minAvailable" pods selected by "selector" will still be available after the eviction, i.e. even in the absence of the evicted pod. So for example you can prevent all voluntary evictions by specifying "100%". + MinAvailable IntOrString `field:"optional" json:"minAvailable" yaml:"minAvailable"` + // Label query over pods whose evictions are managed by the disruption budget. + // + // A null selector selects no pods. An empty selector ({}) also selects no pods, which differs from standard behavior of selecting all pods. In policy/v1, an empty selector will select all pods in the namespace. + Selector *LabelSelector `field:"optional" json:"selector" yaml:"selector"` +} + +// PodDNSConfig defines the DNS parameters of a pod in addition to those generated from DNSPolicy. +type PodDnsConfig struct { + // A list of DNS name server IP addresses. + // + // This will be appended to the base nameservers generated from DNSPolicy. Duplicated nameservers will be removed. + Nameservers *[]*string `field:"optional" json:"nameservers" yaml:"nameservers"` + // A list of DNS resolver options. + // + // This will be merged with the base options generated from DNSPolicy. Duplicated entries will be removed. Resolution options given in Options will override those that appear in the base DNSPolicy. + Options *[]*PodDnsConfigOption `field:"optional" json:"options" yaml:"options"` + // A list of DNS search domains for host-name lookup. + // + // This will be appended to the base search paths generated from DNSPolicy. Duplicated search paths will be removed. + Searches *[]*string `field:"optional" json:"searches" yaml:"searches"` +} + +// PodDNSConfigOption defines DNS resolver options of a pod. +type PodDnsConfigOption struct { + // Required. + Name *string `field:"optional" json:"name" yaml:"name"` + Value *string `field:"optional" json:"value" yaml:"value"` +} + +// PodReadinessGate contains the reference to a pod condition. +type PodReadinessGate struct { + // ConditionType refers to a condition in the pod's condition list with matching type. + ConditionType *string `field:"required" json:"conditionType" yaml:"conditionType"` +} + +// PodSecurityContext holds pod-level security attributes and common container settings. +// +// Some fields are also present in container.securityContext. Field values of container.securityContext take precedence over field values of PodSecurityContext. +type PodSecurityContext struct { + // A special supplemental group that applies to all containers in a pod. + // + // Some volume types allow the Kubelet to change the ownership of that volume to be owned by the pod: + // + // 1. The owning GID will be the FSGroup 2. The setgid bit is set (new files created in the volume will be owned by FSGroup) 3. The permission bits are OR'd with rw-rw---- + // + // If unset, the Kubelet will not modify_helm the ownership and permissions of any volume. + FsGroup *float64 `field:"optional" json:"fsGroup" yaml:"fsGroup"` + // fsGroupChangePolicy defines behavior of changing ownership and permission of the volume before being exposed inside Pod. + // + // This field will only apply to volume types which support fsGroup based ownership(and permissions). It will have no effect on ephemeral volume types such as: secret, configmaps and emptydir. Valid values are "OnRootMismatch" and "Always". If not specified, "Always" is used. + FsGroupChangePolicy *string `field:"optional" json:"fsGroupChangePolicy" yaml:"fsGroupChangePolicy"` + // The GID to run the entrypoint of the container process. + // + // Uses runtime default if unset. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container. + RunAsGroup *float64 `field:"optional" json:"runAsGroup" yaml:"runAsGroup"` + // Indicates that the container must run as a non-root user. + // + // If true, the Kubelet will validate the image at runtime to ensure that it does not run as UID 0 (root) and fail to start the container if it does. If unset or false, no such validation will be performed. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. + RunAsNonRoot *bool `field:"optional" json:"runAsNonRoot" yaml:"runAsNonRoot"` + // The UID to run the entrypoint of the container process. + // + // Defaults to user specified in image metadata if unspecified. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container. + RunAsUser *float64 `field:"optional" json:"runAsUser" yaml:"runAsUser"` + // The seccomp options to use by the containers in this pod. + SeccompProfile *SeccompProfile `field:"optional" json:"seccompProfile" yaml:"seccompProfile"` + // The SELinux context to be applied to all containers. + // + // If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container. + SeLinuxOptions *SeLinuxOptions `field:"optional" json:"seLinuxOptions" yaml:"seLinuxOptions"` + // A list of groups applied to the first process run in each container, in addition to the container's primary GID. + // + // If unspecified, no groups will be added to any container. + SupplementalGroups *[]*float64 `field:"optional" json:"supplementalGroups" yaml:"supplementalGroups"` + // Sysctls hold a list of namespaced sysctls used for the pod. + // + // Pods with unsupported sysctls (by the container runtime) might fail to launch. + Sysctls *[]*Sysctl `field:"optional" json:"sysctls" yaml:"sysctls"` + // The Windows specific settings applied to all containers. + // + // If unspecified, the options within a container's SecurityContext will be used. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. + WindowsOptions *WindowsSecurityContextOptions `field:"optional" json:"windowsOptions" yaml:"windowsOptions"` +} + +// PodSecurityPolicySpec defines the policy enforced. +type PodSecurityPolicySpecV1Beta1 struct { + // fsGroup is the strategy that will dictate what fs group is used by the SecurityContext. + FsGroup *FsGroupStrategyOptionsV1Beta1 `field:"required" json:"fsGroup" yaml:"fsGroup"` + // runAsUser is the strategy that will dictate the allowable RunAsUser values that may be set. + RunAsUser *RunAsUserStrategyOptionsV1Beta1 `field:"required" json:"runAsUser" yaml:"runAsUser"` + // seLinux is the strategy that will dictate the allowable labels that may be set. + SeLinux *SeLinuxStrategyOptionsV1Beta1 `field:"required" json:"seLinux" yaml:"seLinux"` + // supplementalGroups is the strategy that will dictate what supplemental groups are used by the SecurityContext. + SupplementalGroups *SupplementalGroupsStrategyOptionsV1Beta1 `field:"required" json:"supplementalGroups" yaml:"supplementalGroups"` + // allowedCapabilities is a list of capabilities that can be requested to add to the container. + // + // Capabilities in this field may be added at the pod author's discretion. You must not list a capability in both allowedCapabilities and requiredDropCapabilities. + AllowedCapabilities *[]*string `field:"optional" json:"allowedCapabilities" yaml:"allowedCapabilities"` + // AllowedCSIDrivers is an allowlist of inline CSI drivers that must be explicitly set to be embedded within a pod spec. + // + // An empty value indicates that any CSI driver can be used for inline ephemeral volumes. This is a beta field, and is only honored if the API server enables the CSIInlineVolume feature gate. + AllowedCsiDrivers *[]*AllowedCsiDriverV1Beta1 `field:"optional" json:"allowedCsiDrivers" yaml:"allowedCsiDrivers"` + // allowedFlexVolumes is an allowlist of Flexvolumes. + // + // Empty or nil indicates that all Flexvolumes may be used. This parameter is effective only when the usage of the Flexvolumes is allowed in the "volumes" field. + AllowedFlexVolumes *[]*AllowedFlexVolumeV1Beta1 `field:"optional" json:"allowedFlexVolumes" yaml:"allowedFlexVolumes"` + // allowedHostPaths is an allowlist of host paths. + // + // Empty indicates that all host paths may be used. + AllowedHostPaths *[]*AllowedHostPathV1Beta1 `field:"optional" json:"allowedHostPaths" yaml:"allowedHostPaths"` + // AllowedProcMountTypes is an allowlist of allowed ProcMountTypes. + // + // Empty or nil indicates that only the DefaultProcMountType may be used. This requires the ProcMountType feature flag to be enabled. + AllowedProcMountTypes *[]*string `field:"optional" json:"allowedProcMountTypes" yaml:"allowedProcMountTypes"` + // allowedUnsafeSysctls is a list of explicitly allowed unsafe sysctls, defaults to none. + // + // Each entry is either a plain sysctl name or ends in "*" in which case it is considered as a prefix of allowed sysctls. Single * means all unsafe sysctls are allowed. Kubelet has to allowlist all allowed unsafe sysctls explicitly to avoid rejection. + // + // Examples: e.g. "foo/*" allows "foo/bar", "foo/baz", etc. e.g. "foo.*" allows "foo.bar", "foo.baz", etc. + AllowedUnsafeSysctls *[]*string `field:"optional" json:"allowedUnsafeSysctls" yaml:"allowedUnsafeSysctls"` + // allowPrivilegeEscalation determines if a pod can request to allow privilege escalation. + // + // If unspecified, defaults to true. + AllowPrivilegeEscalation *bool `field:"optional" json:"allowPrivilegeEscalation" yaml:"allowPrivilegeEscalation"` + // defaultAddCapabilities is the default set of capabilities that will be added to the container unless the pod spec specifically drops the capability. + // + // You may not list a capability in both defaultAddCapabilities and requiredDropCapabilities. Capabilities added here are implicitly allowed, and need not be included in the allowedCapabilities list. + DefaultAddCapabilities *[]*string `field:"optional" json:"defaultAddCapabilities" yaml:"defaultAddCapabilities"` + // defaultAllowPrivilegeEscalation controls the default setting for whether a process can gain more privileges than its parent process. + DefaultAllowPrivilegeEscalation *bool `field:"optional" json:"defaultAllowPrivilegeEscalation" yaml:"defaultAllowPrivilegeEscalation"` + // forbiddenSysctls is a list of explicitly forbidden sysctls, defaults to none. + // + // Each entry is either a plain sysctl name or ends in "*" in which case it is considered as a prefix of forbidden sysctls. Single * means all sysctls are forbidden. + // + // Examples: e.g. "foo/*" forbids "foo/bar", "foo/baz", etc. e.g. "foo.*" forbids "foo.bar", "foo.baz", etc. + ForbiddenSysctls *[]*string `field:"optional" json:"forbiddenSysctls" yaml:"forbiddenSysctls"` + // hostIPC determines if the policy allows the use of HostIPC in the pod spec. + HostIpc *bool `field:"optional" json:"hostIpc" yaml:"hostIpc"` + // hostNetwork determines if the policy allows the use of HostNetwork in the pod spec. + HostNetwork *bool `field:"optional" json:"hostNetwork" yaml:"hostNetwork"` + // hostPID determines if the policy allows the use of HostPID in the pod spec. + HostPid *bool `field:"optional" json:"hostPid" yaml:"hostPid"` + // hostPorts determines which host port ranges are allowed to be exposed. + HostPorts *[]*HostPortRangeV1Beta1 `field:"optional" json:"hostPorts" yaml:"hostPorts"` + // privileged determines if a pod can request to be run as privileged. + Privileged *bool `field:"optional" json:"privileged" yaml:"privileged"` + // readOnlyRootFilesystem when set to true will force containers to run with a read only root file system. + // + // If the container specifically requests to run with a non-read only root file system the PSP should deny the pod. If set to false the container may run with a read only root file system if it wishes but it will not be forced to. + ReadOnlyRootFilesystem *bool `field:"optional" json:"readOnlyRootFilesystem" yaml:"readOnlyRootFilesystem"` + // requiredDropCapabilities are the capabilities that will be dropped from the container. + // + // These are required to be dropped and cannot be added. + RequiredDropCapabilities *[]*string `field:"optional" json:"requiredDropCapabilities" yaml:"requiredDropCapabilities"` + // RunAsGroup is the strategy that will dictate the allowable RunAsGroup values that may be set. + // + // If this field is omitted, the pod's RunAsGroup can take any value. This field requires the RunAsGroup feature gate to be enabled. + RunAsGroup *RunAsGroupStrategyOptionsV1Beta1 `field:"optional" json:"runAsGroup" yaml:"runAsGroup"` + // runtimeClass is the strategy that will dictate the allowable RuntimeClasses for a pod. + // + // If this field is omitted, the pod's runtimeClassName field is unrestricted. Enforcement of this field depends on the RuntimeClass feature gate being enabled. + RuntimeClass *RuntimeClassStrategyOptionsV1Beta1 `field:"optional" json:"runtimeClass" yaml:"runtimeClass"` + // volumes is an allowlist of volume plugins. + // + // Empty indicates that no volumes may be used. To allow all volumes you may use '*'. + Volumes *[]*string `field:"optional" json:"volumes" yaml:"volumes"` +} + +// PodSpec is a description of a pod. +type PodSpec struct { + // List of containers belonging to the pod. + // + // Containers cannot currently be added or removed. There must be at least one container in a Pod. Cannot be updated. + Containers *[]*Container `field:"required" json:"containers" yaml:"containers"` + // Optional duration in seconds the pod may be active on the node relative to StartTime before the system will actively try to mark it failed and kill associated containers. + // + // Value must be a positive integer. + ActiveDeadlineSeconds *float64 `field:"optional" json:"activeDeadlineSeconds" yaml:"activeDeadlineSeconds"` + // If specified, the pod's scheduling constraints. + Affinity *Affinity `field:"optional" json:"affinity" yaml:"affinity"` + // AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. + AutomountServiceAccountToken *bool `field:"optional" json:"automountServiceAccountToken" yaml:"automountServiceAccountToken"` + // Specifies the DNS parameters of a pod. + // + // Parameters specified here will be merged to the generated DNS configuration based on DNSPolicy. + DnsConfig *PodDnsConfig `field:"optional" json:"dnsConfig" yaml:"dnsConfig"` + // Set DNS policy for the pod. + // + // Defaults to "ClusterFirst". Valid values are 'ClusterFirstWithHostNet', 'ClusterFirst', 'Default' or 'None'. DNS parameters given in DNSConfig will be merged with the policy selected with DNSPolicy. To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'. + DnsPolicy *string `field:"optional" json:"dnsPolicy" yaml:"dnsPolicy"` + // EnableServiceLinks indicates whether information about services should be injected into pod's environment variables, matching the syntax of Docker links. + // + // Optional: Defaults to true. + EnableServiceLinks *bool `field:"optional" json:"enableServiceLinks" yaml:"enableServiceLinks"` + // List of ephemeral containers run in this pod. + // + // Ephemeral containers may be run in an existing pod to perform user-initiated actions such as debugging. This list cannot be specified when creating a pod, and it cannot be modified by updating the pod spec. In order to add an ephemeral container to an existing pod, use the pod's ephemeralcontainers subresource. This field is alpha-level and is only honored by servers that enable the EphemeralContainers feature. + EphemeralContainers *[]*EphemeralContainer `field:"optional" json:"ephemeralContainers" yaml:"ephemeralContainers"` + // HostAliases is an optional list of hosts and IPs that will be injected into the pod's hosts file if specified. + // + // This is only valid for non-hostNetwork pods. + HostAliases *[]*HostAlias `field:"optional" json:"hostAliases" yaml:"hostAliases"` + // Use the host's ipc namespace. + // + // Optional: Default to false. + HostIpc *bool `field:"optional" json:"hostIpc" yaml:"hostIpc"` + // Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. + Hostname *string `field:"optional" json:"hostname" yaml:"hostname"` + // Host networking requested for this pod. + // + // Use the host's network namespace. If this option is set, the ports that will be used must be specified. Default to false. + HostNetwork *bool `field:"optional" json:"hostNetwork" yaml:"hostNetwork"` + // Use the host's pid namespace. + // + // Optional: Default to false. + HostPid *bool `field:"optional" json:"hostPid" yaml:"hostPid"` + // ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. + // + // If specified, these secrets will be passed to individual puller implementations for them to use. For example, in the case of docker, only DockerConfig type secrets are honored. More info: https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod + ImagePullSecrets *[]*LocalObjectReference `field:"optional" json:"imagePullSecrets" yaml:"imagePullSecrets"` + // List of initialization containers belonging to the pod. + // + // Init containers are executed in order prior to containers being started. If any init container fails, the pod is considered to have failed and is handled according to its restartPolicy. The name for an init container or normal container must be unique among all containers. Init containers may not have Lifecycle actions, Readiness probes, Liveness probes, or Startup probes. The resourceRequirements of an init container are taken into account during scheduling by finding the highest request/limit for each resource type, and then using the max of of that value or the sum of the normal containers. Limits are applied to init containers in a similar fashion. Init containers cannot currently be added or removed. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ + InitContainers *[]*Container `field:"optional" json:"initContainers" yaml:"initContainers"` + // NodeName is a request to schedule this pod onto a specific node. + // + // If it is non-empty, the scheduler simply schedules this pod onto that node, assuming that it fits resource requirements. + NodeName *string `field:"optional" json:"nodeName" yaml:"nodeName"` + // NodeSelector is a selector which must be true for the pod to fit on a node. + // + // Selector which must match a node's labels for the pod to be scheduled on that node. More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ + NodeSelector *map[string]*string `field:"optional" json:"nodeSelector" yaml:"nodeSelector"` + // Overhead represents the resource overhead associated with running a pod for a given RuntimeClass. + // + // This field will be autopopulated at admission time by the RuntimeClass admission controller. If the RuntimeClass admission controller is enabled, overhead must not be set in Pod create requests. The RuntimeClass admission controller will reject Pod create requests which have the overhead already set. If RuntimeClass is configured and selected in the PodSpec, Overhead will be set to the value defined in the corresponding RuntimeClass, otherwise it will remain unset and treated as zero. More info: https://git.k8s.io/enhancements/keps/sig-node/688-pod-overhead/README.md This field is beta-level as of Kubernetes v1.18, and is only honored by servers that enable the PodOverhead feature. + Overhead *map[string]Quantity `field:"optional" json:"overhead" yaml:"overhead"` + // PreemptionPolicy is the Policy for preempting pods with lower priority. + // + // One of Never, PreemptLowerPriority. Defaults to PreemptLowerPriority if unset. This field is beta-level, gated by the NonPreemptingPriority feature-gate. + PreemptionPolicy *string `field:"optional" json:"preemptionPolicy" yaml:"preemptionPolicy"` + // The priority value. + // + // Various system components use this field to find the priority of the pod. When Priority Admission Controller is enabled, it prevents users from setting this field. The admission controller populates this field from PriorityClassName. The higher the value, the higher the priority. + Priority *float64 `field:"optional" json:"priority" yaml:"priority"` + // If specified, indicates the pod's priority. + // + // "system-node-critical" and "system-cluster-critical" are two special keywords which indicate the highest priorities with the former being the highest priority. Any other name must be defined by creating a PriorityClass object with that name. If not specified, the pod priority will be default or zero if there is no default. + PriorityClassName *string `field:"optional" json:"priorityClassName" yaml:"priorityClassName"` + // If specified, all readiness gates will be evaluated for pod readiness. + // + // A pod is ready when all its containers are ready AND all conditions specified in the readiness gates have status equal to "True" More info: https://git.k8s.io/enhancements/keps/sig-network/580-pod-readiness-gates + ReadinessGates *[]*PodReadinessGate `field:"optional" json:"readinessGates" yaml:"readinessGates"` + // Restart policy for all containers within the pod. + // + // One of Always, OnFailure, Never. Default to Always. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy + RestartPolicy *string `field:"optional" json:"restartPolicy" yaml:"restartPolicy"` + // RuntimeClassName refers to a RuntimeClass object in the node.k8s.io group, which should be used to run this pod. If no RuntimeClass resource matches the named class, the pod will not be run. If unset or empty, the "legacy" RuntimeClass will be used, which is an implicit class with an empty definition that uses the default runtime handler. More info: https://git.k8s.io/enhancements/keps/sig-node/585-runtime-class This is a beta feature as of Kubernetes v1.14. + RuntimeClassName *string `field:"optional" json:"runtimeClassName" yaml:"runtimeClassName"` + // If specified, the pod will be dispatched by specified scheduler. + // + // If not specified, the pod will be dispatched by default scheduler. + SchedulerName *string `field:"optional" json:"schedulerName" yaml:"schedulerName"` + // SecurityContext holds pod-level security attributes and common container settings. + // + // Optional: Defaults to empty. See type description for default values of each field. + SecurityContext *PodSecurityContext `field:"optional" json:"securityContext" yaml:"securityContext"` + // DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. + // + // Deprecated: Use serviceAccountName instead. + ServiceAccount *string `field:"optional" json:"serviceAccount" yaml:"serviceAccount"` + // ServiceAccountName is the name of the ServiceAccount to use to run this pod. + // + // More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ + ServiceAccountName *string `field:"optional" json:"serviceAccountName" yaml:"serviceAccountName"` + // If true the pod's hostname will be configured as the pod's FQDN, rather than the leaf name (the default). + // + // In Linux containers, this means setting the FQDN in the hostname field of the kernel (the nodename field of struct utsname). In Windows containers, this means setting the registry value of hostname for the registry key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters to FQDN. If a pod does not have FQDN, this has no effect. Default to false. + SetHostnameAsFqdn *bool `field:"optional" json:"setHostnameAsFqdn" yaml:"setHostnameAsFqdn"` + // Share a single process namespace between all of the containers in a pod. + // + // When this is set containers will be able to view and signal processes from other containers in the same pod, and the first process in each container will not be assigned PID 1. HostPID and ShareProcessNamespace cannot both be set. Optional: Default to false. + ShareProcessNamespace *bool `field:"optional" json:"shareProcessNamespace" yaml:"shareProcessNamespace"` + // If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all. + Subdomain *string `field:"optional" json:"subdomain" yaml:"subdomain"` + // Optional duration in seconds the pod needs to terminate gracefully. + // + // May be decreased in delete request. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down). If this value is nil, the default grace period will be used instead. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. Defaults to 30 seconds. + TerminationGracePeriodSeconds *float64 `field:"optional" json:"terminationGracePeriodSeconds" yaml:"terminationGracePeriodSeconds"` + // If specified, the pod's tolerations. + Tolerations *[]*Toleration `field:"optional" json:"tolerations" yaml:"tolerations"` + // TopologySpreadConstraints describes how a group of pods ought to spread across topology domains. + // + // Scheduler will schedule pods in a way which abides by the constraints. All topologySpreadConstraints are ANDed. + TopologySpreadConstraints *[]*TopologySpreadConstraint `field:"optional" json:"topologySpreadConstraints" yaml:"topologySpreadConstraints"` + // List of volumes that can be mounted by containers belonging to the pod. + // + // More info: https://kubernetes.io/docs/concepts/storage/volumes + Volumes *[]*Volume `field:"optional" json:"volumes" yaml:"volumes"` +} + +// PodTemplateSpec describes the data a pod should have when created from a template. +type PodTemplateSpec struct { + // Standard object's metadata. + // + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + Metadata *ObjectMeta `field:"optional" json:"metadata" yaml:"metadata"` + // Specification of the desired behavior of the pod. + // + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + Spec *PodSpec `field:"optional" json:"spec" yaml:"spec"` +} + +// PodsMetricSource indicates how to scale on a metric describing each pod in the current scale target (for example, transactions-processed-per-second). +// +// The values will be averaged together before being compared to the target value. +type PodsMetricSourceV2Beta1 struct { + // metricName is the name of the metric in question. + MetricName *string `field:"required" json:"metricName" yaml:"metricName"` + // targetAverageValue is the target value of the average of the metric across all relevant pods (as a quantity). + TargetAverageValue Quantity `field:"required" json:"targetAverageValue" yaml:"targetAverageValue"` + // selector is the string-encoded form of a standard kubernetes label selector for the given metric When set, it is passed as an additional parameter to the metrics server for more specific metrics scoping When unset, just the metricName will be used to gather metrics. + Selector *LabelSelector `field:"optional" json:"selector" yaml:"selector"` +} + +// PodsMetricSource indicates how to scale on a metric describing each pod in the current scale target (for example, transactions-processed-per-second). +// +// The values will be averaged together before being compared to the target value. +type PodsMetricSourceV2Beta2 struct { + // metric identifies the target metric by name and selector. + Metric *MetricIdentifierV2Beta2 `field:"required" json:"metric" yaml:"metric"` + // target specifies the target value for the given metric. + Target *MetricTargetV2Beta2 `field:"required" json:"target" yaml:"target"` +} + +// PolicyRule holds information that describes a policy rule, but does not contain information about who the rule applies to or which namespace the rule applies to. +type PolicyRule struct { + // Verbs is a list of Verbs that apply to ALL the ResourceKinds and AttributeRestrictions contained in this rule. + // + // '*' represents all verbs. + Verbs *[]*string `field:"required" json:"verbs" yaml:"verbs"` + // APIGroups is the name of the APIGroup that contains the resources. + // + // If multiple API groups are specified, any action requested against one of the enumerated resources in any API group will be allowed. + ApiGroups *[]*string `field:"optional" json:"apiGroups" yaml:"apiGroups"` + // NonResourceURLs is a set of partial urls that a user should have access to. + // + // *s are allowed, but only as the full, final step in the path Since non-resource URLs are not namespaced, this field is only applicable for ClusterRoles referenced from a ClusterRoleBinding. Rules can either apply to API resources (such as "pods" or "secrets") or non-resource URL paths (such as "/api"), but not both. + NonResourceUrLs *[]*string `field:"optional" json:"nonResourceUrLs" yaml:"nonResourceUrLs"` + // ResourceNames is an optional white list of names that the rule applies to. + // + // An empty set means that everything is allowed. + ResourceNames *[]*string `field:"optional" json:"resourceNames" yaml:"resourceNames"` + // Resources is a list of resources this rule applies to. + // + // '*' represents all resources. + Resources *[]*string `field:"optional" json:"resources" yaml:"resources"` +} + +// PolicyRule holds information that describes a policy rule, but does not contain information about who the rule applies to or which namespace the rule applies to. +type PolicyRuleV1Alpha1 struct { + // Verbs is a list of Verbs that apply to ALL the ResourceKinds and AttributeRestrictions contained in this rule. + // + // '*' represents all verbs. + Verbs *[]*string `field:"required" json:"verbs" yaml:"verbs"` + // APIGroups is the name of the APIGroup that contains the resources. + // + // If multiple API groups are specified, any action requested against one of the enumerated resources in any API group will be allowed. + ApiGroups *[]*string `field:"optional" json:"apiGroups" yaml:"apiGroups"` + // NonResourceURLs is a set of partial urls that a user should have access to. + // + // *s are allowed, but only as the full, final step in the path Since non-resource URLs are not namespaced, this field is only applicable for ClusterRoles referenced from a ClusterRoleBinding. Rules can either apply to API resources (such as "pods" or "secrets") or non-resource URL paths (such as "/api"), but not both. + NonResourceUrLs *[]*string `field:"optional" json:"nonResourceUrLs" yaml:"nonResourceUrLs"` + // ResourceNames is an optional white list of names that the rule applies to. + // + // An empty set means that everything is allowed. + ResourceNames *[]*string `field:"optional" json:"resourceNames" yaml:"resourceNames"` + // Resources is a list of resources this rule applies to. + // + // '*' represents all resources. + Resources *[]*string `field:"optional" json:"resources" yaml:"resources"` +} + +// PolicyRulesWithSubjects prescribes a test that applies to a request to an apiserver. +// +// The test considers the subject making the request, the verb being requested, and the resource to be acted upon. This PolicyRulesWithSubjects matches a request if and only if both (a) at least one member of subjects matches the request and (b) at least one member of resourceRules or nonResourceRules matches the request. +type PolicyRulesWithSubjectsV1Beta1 struct { + // subjects is the list of normal user, serviceaccount, or group that this rule cares about. + // + // There must be at least one member in this slice. A slice that includes both the system:authenticated and system:unauthenticated user groups matches every request. Required. + Subjects *[]*SubjectV1Beta1 `field:"required" json:"subjects" yaml:"subjects"` + // `nonResourceRules` is a list of NonResourcePolicyRules that identify matching requests according to their verb and the target non-resource URL. + NonResourceRules *[]*NonResourcePolicyRuleV1Beta1 `field:"optional" json:"nonResourceRules" yaml:"nonResourceRules"` + // `resourceRules` is a slice of ResourcePolicyRules that identify matching requests according to their verb and the target resource. + // + // At least one of `resourceRules` and `nonResourceRules` has to be non-empty. + ResourceRules *[]*ResourcePolicyRuleV1Beta1 `field:"optional" json:"resourceRules" yaml:"resourceRules"` +} + +// PortworxVolumeSource represents a Portworx volume resource. +type PortworxVolumeSource struct { + // VolumeID uniquely identifies a Portworx volume. + VolumeId *string `field:"required" json:"volumeId" yaml:"volumeId"` + // FSType represents the filesystem type to mount Must be a filesystem type supported by the host operating system. + // + // Ex. "ext4", "xfs". Implicitly inferred to be "ext4" if unspecified. + FsType *string `field:"optional" json:"fsType" yaml:"fsType"` + // Defaults to false (read/write). + // + // ReadOnly here will force the ReadOnly setting in VolumeMounts. + ReadOnly *bool `field:"optional" json:"readOnly" yaml:"readOnly"` +} + +// Preconditions must be fulfilled before an operation (update, delete, etc.) is carried out. +type Preconditions struct { + // Specifies the target ResourceVersion. + ResourceVersion *string `field:"optional" json:"resourceVersion" yaml:"resourceVersion"` + // Specifies the target UID. + Uid *string `field:"optional" json:"uid" yaml:"uid"` +} + +// An empty preferred scheduling term matches all objects with implicit weight 0 (i.e. it's a no-op). A null preferred scheduling term matches no objects (i.e. is also a no-op). +type PreferredSchedulingTerm struct { + // A node selector term, associated with the corresponding weight. + Preference *NodeSelectorTerm `field:"required" json:"preference" yaml:"preference"` + // Weight associated with matching the corresponding nodeSelectorTerm, in the range 1-100. + Weight *float64 `field:"required" json:"weight" yaml:"weight"` +} + +// PriorityLevelConfigurationReference contains information that points to the "request-priority" being used. +type PriorityLevelConfigurationReferenceV1Beta1 struct { + // `name` is the name of the priority level configuration being referenced Required. + Name *string `field:"required" json:"name" yaml:"name"` +} + +// PriorityLevelConfigurationSpec specifies the configuration of a priority level. +type PriorityLevelConfigurationSpecV1Beta1 struct { + // `type` indicates whether this priority level is subject to limitation on request execution. + // + // A value of `"Exempt"` means that requests of this priority level are not subject to a limit (and thus are never queued) and do not detract from the capacity made available to other priority levels. A value of `"Limited"` means that (a) requests of this priority level _are_ subject to limits and (b) some of the server's limited capacity is made available exclusively to this priority level. Required. + Type *string `field:"required" json:"type" yaml:"type"` + // `limited` specifies how requests are handled for a Limited priority level. + // + // This field must be non-empty if and only if `type` is `"Limited"`. + Limited *LimitedPriorityLevelConfigurationV1Beta1 `field:"optional" json:"limited" yaml:"limited"` +} + +// Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic. +type Probe struct { + // One and only one of the following should be specified. + // + // Exec specifies the action to take. + Exec *ExecAction `field:"optional" json:"exec" yaml:"exec"` + // Minimum consecutive failures for the probe to be considered failed after having succeeded. + // + // Defaults to 3. Minimum value is 1. + FailureThreshold *float64 `field:"optional" json:"failureThreshold" yaml:"failureThreshold"` + // HTTPGet specifies the http request to perform. + HttpGet *HttpGetAction `field:"optional" json:"httpGet" yaml:"httpGet"` + // Number of seconds after the container has started before liveness probes are initiated. + // + // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + InitialDelaySeconds *float64 `field:"optional" json:"initialDelaySeconds" yaml:"initialDelaySeconds"` + // How often (in seconds) to perform the probe. + // + // Default to 10 seconds. Minimum value is 1. + PeriodSeconds *float64 `field:"optional" json:"periodSeconds" yaml:"periodSeconds"` + // Minimum consecutive successes for the probe to be considered successful after having failed. + // + // Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. + SuccessThreshold *float64 `field:"optional" json:"successThreshold" yaml:"successThreshold"` + // TCPSocket specifies an action involving a TCP port. + // + // TCP hooks not yet supported. + TcpSocket *TcpSocketAction `field:"optional" json:"tcpSocket" yaml:"tcpSocket"` + // Optional duration in seconds the pod needs to terminate gracefully upon probe failure. + // + // The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this value overrides the value provided by the pod spec. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down). This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset. + TerminationGracePeriodSeconds *float64 `field:"optional" json:"terminationGracePeriodSeconds" yaml:"terminationGracePeriodSeconds"` + // Number of seconds after which the probe times out. + // + // Defaults to 1 second. Minimum value is 1. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + TimeoutSeconds *float64 `field:"optional" json:"timeoutSeconds" yaml:"timeoutSeconds"` +} + +// Represents a projected volume source. +type ProjectedVolumeSource struct { + // Mode bits used to set permissions on created files by default. + // + // Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set. + DefaultMode *float64 `field:"optional" json:"defaultMode" yaml:"defaultMode"` + // list of volume projections. + Sources *[]*VolumeProjection `field:"optional" json:"sources" yaml:"sources"` +} + +type Quantity interface { + Value() interface{} +} + +// The jsii proxy struct for Quantity +type jsiiProxy_Quantity struct { + _ byte // padding +} + +func (j *jsiiProxy_Quantity) Value() interface{} { + var returns interface{} + _jsii_.Get( + j, + "value", + &returns, + ) + return returns +} + +func Quantity_FromNumber(value *float64) Quantity { + _init_.Initialize() + + var returns Quantity + + _jsii_.StaticInvoke( + "k8s.Quantity", + "fromNumber", + []interface{}{value}, + &returns, + ) + + return returns +} + +func Quantity_FromString(value *string) Quantity { + _init_.Initialize() + + var returns Quantity + + _jsii_.StaticInvoke( + "k8s.Quantity", + "fromString", + []interface{}{value}, + &returns, + ) + + return returns +} + +// QueuingConfiguration holds the configuration parameters for queuing. +type QueuingConfigurationV1Beta1 struct { + // `handSize` is a small positive number that configures the shuffle sharding of requests into queues. + // + // When enqueuing a request at this priority level the request's flow identifier (a string pair) is hashed and the hash value is used to shuffle the list of queues and deal a hand of the size specified here. The request is put into one of the shortest queues in that hand. `handSize` must be no larger than `queues`, and should be significantly smaller (so that a few heavy flows do not saturate most of the queues). See the user-facing documentation for more extensive guidance on setting this field. This field has a default value of 8. + HandSize *float64 `field:"optional" json:"handSize" yaml:"handSize"` + // `queueLengthLimit` is the maximum number of requests allowed to be waiting in a given queue of this priority level at a time; + // + // excess requests are rejected. This value must be positive. If not specified, it will be defaulted to 50. + QueueLengthLimit *float64 `field:"optional" json:"queueLengthLimit" yaml:"queueLengthLimit"` + // `queues` is the number of queues for this priority level. + // + // The queues exist independently at each apiserver. The value must be positive. Setting it to 1 effectively precludes shufflesharding and thus makes the distinguisher method of associated flow schemas irrelevant. This field has a default value of 64. + Queues *float64 `field:"optional" json:"queues" yaml:"queues"` +} + +// Represents a Quobyte mount that lasts the lifetime of a pod. +// +// Quobyte volumes do not support ownership management or SELinux relabeling. +type QuobyteVolumeSource struct { + // Registry represents a single or multiple Quobyte Registry services specified as a string as host:port pair (multiple entries are separated with commas) which acts as the central registry for volumes. + Registry *string `field:"required" json:"registry" yaml:"registry"` + // Volume is a string that references an already created Quobyte volume by name. + Volume *string `field:"required" json:"volume" yaml:"volume"` + // Group to map volume access to Default is no group. + Group *string `field:"optional" json:"group" yaml:"group"` + // ReadOnly here will force the Quobyte volume to be mounted with read-only permissions. + // + // Defaults to false. + ReadOnly *bool `field:"optional" json:"readOnly" yaml:"readOnly"` + // Tenant owning the given Quobyte volume in the Backend Used with dynamically provisioned Quobyte volumes, value is set by the plugin. + Tenant *string `field:"optional" json:"tenant" yaml:"tenant"` + // User to map volume access to Defaults to serivceaccount user. + User *string `field:"optional" json:"user" yaml:"user"` +} + +// Represents a Rados Block Device mount that lasts the lifetime of a pod. +// +// RBD volumes support ownership management and SELinux relabeling. +type RbdPersistentVolumeSource struct { + // The rados image name. + // + // More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it + Image *string `field:"required" json:"image" yaml:"image"` + // A collection of Ceph monitors. + // + // More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it + Monitors *[]*string `field:"required" json:"monitors" yaml:"monitors"` + // Filesystem type of the volume that you want to mount. + // + // Tip: Ensure that the filesystem type is supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#rbd + FsType *string `field:"optional" json:"fsType" yaml:"fsType"` + // Keyring is the path to key ring for RBDUser. + // + // Default is /etc/ceph/keyring. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it + Keyring *string `field:"optional" json:"keyring" yaml:"keyring"` + // The rados pool name. + // + // Default is rbd. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it + Pool *string `field:"optional" json:"pool" yaml:"pool"` + // ReadOnly here will force the ReadOnly setting in VolumeMounts. + // + // Defaults to false. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it + ReadOnly *bool `field:"optional" json:"readOnly" yaml:"readOnly"` + // SecretRef is name of the authentication secret for RBDUser. + // + // If provided overrides keyring. Default is nil. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it + SecretRef *SecretReference `field:"optional" json:"secretRef" yaml:"secretRef"` + // The rados user name. + // + // Default is admin. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it + User *string `field:"optional" json:"user" yaml:"user"` +} + +// Represents a Rados Block Device mount that lasts the lifetime of a pod. +// +// RBD volumes support ownership management and SELinux relabeling. +type RbdVolumeSource struct { + // The rados image name. + // + // More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it + Image *string `field:"required" json:"image" yaml:"image"` + // A collection of Ceph monitors. + // + // More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it + Monitors *[]*string `field:"required" json:"monitors" yaml:"monitors"` + // Filesystem type of the volume that you want to mount. + // + // Tip: Ensure that the filesystem type is supported by the host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#rbd + FsType *string `field:"optional" json:"fsType" yaml:"fsType"` + // Keyring is the path to key ring for RBDUser. + // + // Default is /etc/ceph/keyring. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it + Keyring *string `field:"optional" json:"keyring" yaml:"keyring"` + // The rados pool name. + // + // Default is rbd. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it + Pool *string `field:"optional" json:"pool" yaml:"pool"` + // ReadOnly here will force the ReadOnly setting in VolumeMounts. + // + // Defaults to false. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it + ReadOnly *bool `field:"optional" json:"readOnly" yaml:"readOnly"` + // SecretRef is name of the authentication secret for RBDUser. + // + // If provided overrides keyring. Default is nil. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it + SecretRef *LocalObjectReference `field:"optional" json:"secretRef" yaml:"secretRef"` + // The rados user name. + // + // Default is admin. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it + User *string `field:"optional" json:"user" yaml:"user"` +} + +// ReplicaSetSpec is the specification of a ReplicaSet. +type ReplicaSetSpec struct { + // Selector is a label query over pods that should match the replica count. + // + // Label keys and values that must match in order to be controlled by this replica set. It must match the pod template's labels. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors + Selector *LabelSelector `field:"required" json:"selector" yaml:"selector"` + // Minimum number of seconds for which a newly created pod should be ready without any of its container crashing, for it to be considered available. + // + // Defaults to 0 (pod will be considered available as soon as it is ready). + MinReadySeconds *float64 `field:"optional" json:"minReadySeconds" yaml:"minReadySeconds"` + // Replicas is the number of desired replicas. + // + // This is a pointer to distinguish between explicit zero and unspecified. Defaults to 1. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller/#what-is-a-replicationcontroller + Replicas *float64 `field:"optional" json:"replicas" yaml:"replicas"` + // Template is the object that describes the pod that will be created if insufficient replicas are detected. + // + // More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template + Template *PodTemplateSpec `field:"optional" json:"template" yaml:"template"` +} + +// ReplicationControllerSpec is the specification of a replication controller. +type ReplicationControllerSpec struct { + // Minimum number of seconds for which a newly created pod should be ready without any of its container crashing, for it to be considered available. + // + // Defaults to 0 (pod will be considered available as soon as it is ready). + MinReadySeconds *float64 `field:"optional" json:"minReadySeconds" yaml:"minReadySeconds"` + // Replicas is the number of desired replicas. + // + // This is a pointer to distinguish between explicit zero and unspecified. Defaults to 1. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#what-is-a-replicationcontroller + Replicas *float64 `field:"optional" json:"replicas" yaml:"replicas"` + // Selector is a label query over pods that should match the Replicas count. + // + // If Selector is empty, it is defaulted to the labels present on the Pod template. Label keys and values that must match in order to be controlled by this replication controller, if empty defaulted to labels on Pod template. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors + Selector *map[string]*string `field:"optional" json:"selector" yaml:"selector"` + // Template is the object that describes the pod that will be created if insufficient replicas are detected. + // + // This takes precedence over a TemplateRef. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template + Template *PodTemplateSpec `field:"optional" json:"template" yaml:"template"` +} + +// ResourceAttributes includes the authorization attributes available for resource requests to the Authorizer interface. +type ResourceAttributes struct { + // Group is the API Group of the Resource. + // + // "*" means all. + Group *string `field:"optional" json:"group" yaml:"group"` + // Name is the name of the resource being requested for a "get" or deleted for a "delete". + // + // "" (empty) means all. + Name *string `field:"optional" json:"name" yaml:"name"` + // Namespace is the namespace of the action being requested. + // + // Currently, there is no distinction between no namespace and all namespaces "" (empty) is defaulted for LocalSubjectAccessReviews "" (empty) is empty for cluster-scoped resources "" (empty) means "all" for namespace scoped resources from a SubjectAccessReview or SelfSubjectAccessReview. + Namespace *string `field:"optional" json:"namespace" yaml:"namespace"` + // Resource is one of the existing resource types. + // + // "*" means all. + Resource *string `field:"optional" json:"resource" yaml:"resource"` + // Subresource is one of the existing resource types. + // + // "" means none. + Subresource *string `field:"optional" json:"subresource" yaml:"subresource"` + // Verb is a kubernetes resource API verb, like: get, list, watch, create, update, delete, proxy. + // + // "*" means all. + Verb *string `field:"optional" json:"verb" yaml:"verb"` + // Version is the API Version of the Resource. + // + // "*" means all. + Version *string `field:"optional" json:"version" yaml:"version"` +} + +// ResourceFieldSelector represents container resources (cpu, memory) and their output format. +type ResourceFieldSelector struct { + // Required: resource to select. + Resource *string `field:"required" json:"resource" yaml:"resource"` + // Container name: required for volumes, optional for env vars. + ContainerName *string `field:"optional" json:"containerName" yaml:"containerName"` + // Specifies the output format of the exposed resources, defaults to "1". + Divisor Quantity `field:"optional" json:"divisor" yaml:"divisor"` +} + +// ResourceMetricSource indicates how to scale on a resource metric known to Kubernetes, as specified in requests and limits, describing each pod in the current scale target (e.g. CPU or memory). The values will be averaged together before being compared to the target. Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the "pods" source. Only one "target" type should be set. +type ResourceMetricSourceV2Beta1 struct { + // name is the name of the resource in question. + Name *string `field:"required" json:"name" yaml:"name"` + // targetAverageUtilization is the target value of the average of the resource metric across all relevant pods, represented as a percentage of the requested value of the resource for the pods. + TargetAverageUtilization *float64 `field:"optional" json:"targetAverageUtilization" yaml:"targetAverageUtilization"` + // targetAverageValue is the target value of the average of the resource metric across all relevant pods, as a raw value (instead of as a percentage of the request), similar to the "pods" metric source type. + TargetAverageValue Quantity `field:"optional" json:"targetAverageValue" yaml:"targetAverageValue"` +} + +// ResourceMetricSource indicates how to scale on a resource metric known to Kubernetes, as specified in requests and limits, describing each pod in the current scale target (e.g. CPU or memory). The values will be averaged together before being compared to the target. Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the "pods" source. Only one "target" type should be set. +type ResourceMetricSourceV2Beta2 struct { + // name is the name of the resource in question. + Name *string `field:"required" json:"name" yaml:"name"` + // target specifies the target value for the given metric. + Target *MetricTargetV2Beta2 `field:"required" json:"target" yaml:"target"` +} + +// ResourcePolicyRule is a predicate that matches some resource requests, testing the request's verb and the target resource. +// +// A ResourcePolicyRule matches a resource request if and only if: (a) at least one member of verbs matches the request, (b) at least one member of apiGroups matches the request, (c) at least one member of resources matches the request, and (d) least one member of namespaces matches the request. +type ResourcePolicyRuleV1Beta1 struct { + // `apiGroups` is a list of matching API groups and may not be empty. + // + // "*" matches all API groups and, if present, must be the only entry. Required. + ApiGroups *[]*string `field:"required" json:"apiGroups" yaml:"apiGroups"` + // `resources` is a list of matching resources (i.e., lowercase and plural) with, if desired, subresource. For example, [ "services", "nodes/status" ]. This list may not be empty. "*" matches all resources and, if present, must be the only entry. Required. + Resources *[]*string `field:"required" json:"resources" yaml:"resources"` + // `verbs` is a list of matching verbs and may not be empty. + // + // "*" matches all verbs and, if present, must be the only entry. Required. + Verbs *[]*string `field:"required" json:"verbs" yaml:"verbs"` + // `clusterScope` indicates whether to match requests that do not specify a namespace (which happens either because the resource is not namespaced or the request targets all namespaces). + // + // If this field is omitted or false then the `namespaces` field must contain a non-empty list. + ClusterScope *bool `field:"optional" json:"clusterScope" yaml:"clusterScope"` + // `namespaces` is a list of target namespaces that restricts matches. + // + // A request that specifies a target namespace matches only if either (a) this list contains that target namespace or (b) this list contains "*". Note that "*" matches any specified namespace but does not match a request that _does not specify_ a namespace (see the `clusterScope` field for that). This list may be empty, but only if `clusterScope` is true. + Namespaces *[]*string `field:"optional" json:"namespaces" yaml:"namespaces"` +} + +// ResourceQuotaSpec defines the desired hard limits to enforce for Quota. +type ResourceQuotaSpec struct { + // hard is the set of desired hard limits for each named resource. + // + // More info: https://kubernetes.io/docs/concepts/policy/resource-quotas/ + Hard *map[string]Quantity `field:"optional" json:"hard" yaml:"hard"` + // A collection of filters that must match each object tracked by a quota. + // + // If not specified, the quota matches all objects. + Scopes *[]*string `field:"optional" json:"scopes" yaml:"scopes"` + // scopeSelector is also a collection of filters like scopes that must match each object tracked by a quota but expressed using ScopeSelectorOperator in combination with possible values. + // + // For a resource to match, both scopes AND scopeSelector (if specified in spec), must be matched. + ScopeSelector *ScopeSelector `field:"optional" json:"scopeSelector" yaml:"scopeSelector"` +} + +// ResourceRequirements describes the compute resource requirements. +type ResourceRequirements struct { + // Limits describes the maximum amount of compute resources allowed. + // + // More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + Limits *map[string]Quantity `field:"optional" json:"limits" yaml:"limits"` + // Requests describes the minimum amount of compute resources required. + // + // If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + Requests *map[string]Quantity `field:"optional" json:"requests" yaml:"requests"` +} + +// RoleRef contains information that points to the role being used. +type RoleRef struct { + // APIGroup is the group for the resource being referenced. + ApiGroup *string `field:"required" json:"apiGroup" yaml:"apiGroup"` + // Kind is the type of resource being referenced. + Kind *string `field:"required" json:"kind" yaml:"kind"` + // Name is the name of resource being referenced. + Name *string `field:"required" json:"name" yaml:"name"` +} + +// RoleRef contains information that points to the role being used. +type RoleRefV1Alpha1 struct { + // APIGroup is the group for the resource being referenced. + ApiGroup *string `field:"required" json:"apiGroup" yaml:"apiGroup"` + // Kind is the type of resource being referenced. + Kind *string `field:"required" json:"kind" yaml:"kind"` + // Name is the name of resource being referenced. + Name *string `field:"required" json:"name" yaml:"name"` +} + +// Spec to control the desired behavior of daemon set rolling update. +type RollingUpdateDaemonSet struct { + // The maximum number of nodes with an existing available DaemonSet pod that can have an updated DaemonSet pod during during an update. + // + // Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). This can not be 0 if MaxUnavailable is 0. Absolute number is calculated from percentage by rounding up to a minimum of 1. Default value is 0. Example: when this is set to 30%, at most 30% of the total number of nodes that should be running the daemon pod (i.e. status.desiredNumberScheduled) can have their a new pod created before the old pod is marked as deleted. The update starts by launching new pods on 30% of nodes. Once an updated pod is available (Ready for at least minReadySeconds) the old DaemonSet pod on that node is marked deleted. If the old pod becomes unavailable for any reason (Ready transitions to false, is evicted, or is drained) an updated pod is immediatedly created on that node without considering surge limits. Allowing surge implies the possibility that the resources consumed by the daemonset on any given node can double if the readiness check fails, and so resource intensive daemonsets should take into account that they may cause evictions during disruption. This is beta field and enabled/disabled by DaemonSetUpdateSurge feature gate. + MaxSurge IntOrString `field:"optional" json:"maxSurge" yaml:"maxSurge"` + // The maximum number of DaemonSet pods that can be unavailable during the update. + // + // Value can be an absolute number (ex: 5) or a percentage of total number of DaemonSet pods at the start of the update (ex: 10%). Absolute number is calculated from percentage by rounding up. This cannot be 0 if MaxSurge is 0 Default value is 1. Example: when this is set to 30%, at most 30% of the total number of nodes that should be running the daemon pod (i.e. status.desiredNumberScheduled) can have their pods stopped for an update at any given time. The update starts by stopping at most 30% of those DaemonSet pods and then brings up new DaemonSet pods in their place. Once the new pods are available, it then proceeds onto other DaemonSet pods, thus ensuring that at least 70% of original number of DaemonSet pods are available at all times during the update. + MaxUnavailable IntOrString `field:"optional" json:"maxUnavailable" yaml:"maxUnavailable"` +} + +// Spec to control the desired behavior of rolling update. +type RollingUpdateDeployment struct { + // The maximum number of pods that can be scheduled above the desired number of pods. + // + // Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). This can not be 0 if MaxUnavailable is 0. Absolute number is calculated from percentage by rounding up. Defaults to 25%. Example: when this is set to 30%, the new ReplicaSet can be scaled up immediately when the rolling update starts, such that the total number of old and new pods do not exceed 130% of desired pods. Once old pods have been killed, new ReplicaSet can be scaled up further, ensuring that total number of pods running at any time during the update is at most 130% of desired pods. + MaxSurge IntOrString `field:"optional" json:"maxSurge" yaml:"maxSurge"` + // The maximum number of pods that can be unavailable during the update. + // + // Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). Absolute number is calculated from percentage by rounding down. This can not be 0 if MaxSurge is 0. Defaults to 25%. Example: when this is set to 30%, the old ReplicaSet can be scaled down to 70% of desired pods immediately when the rolling update starts. Once new pods are ready, old ReplicaSet can be scaled down further, followed by scaling up the new ReplicaSet, ensuring that the total number of pods available at all times during the update is at least 70% of desired pods. + MaxUnavailable IntOrString `field:"optional" json:"maxUnavailable" yaml:"maxUnavailable"` +} + +// RollingUpdateStatefulSetStrategy is used to communicate parameter for RollingUpdateStatefulSetStrategyType. +type RollingUpdateStatefulSetStrategy struct { + // Partition indicates the ordinal at which the StatefulSet should be partitioned. + // + // Default value is 0. + Partition *float64 `field:"optional" json:"partition" yaml:"partition"` +} + +// RuleWithOperations is a tuple of Operations and Resources. +// +// It is recommended to make sure that all the tuple expansions are valid. +type RuleWithOperations struct { + // APIGroups is the API groups the resources belong to. + // + // '*' is all groups. If '*' is present, the length of the slice must be one. Required. + ApiGroups *[]*string `field:"optional" json:"apiGroups" yaml:"apiGroups"` + // APIVersions is the API versions the resources belong to. + // + // '*' is all versions. If '*' is present, the length of the slice must be one. Required. + ApiVersions *[]*string `field:"optional" json:"apiVersions" yaml:"apiVersions"` + // Operations is the operations the admission hook cares about - CREATE, UPDATE, DELETE, CONNECT or * for all of those operations and any future admission operations that are added. + // + // If '*' is present, the length of the slice must be one. Required. + Operations *[]*string `field:"optional" json:"operations" yaml:"operations"` + // Resources is a list of resources this rule applies to. + // + // For example: 'pods' means pods. 'pods/log' means the log subresource of pods. '*' means all resources, but not subresources. 'pods/*' means all subresources of pods. '_/scale' means all scale subresources. '_/*' means all resources and their subresources. + // + // If wildcard is present, the validation rule will ensure resources do not overlap with each other. + // + // Depending on the enclosing object, subresources might not be allowed. Required. + Resources *[]*string `field:"optional" json:"resources" yaml:"resources"` + // scope specifies the scope of this rule. + // + // Valid values are "Cluster", "Namespaced", and "*" "Cluster" means that only cluster-scoped resources will match this rule. Namespace API objects are cluster-scoped. "Namespaced" means that only namespaced resources will match this rule. "*" means that there are no scope restrictions. Subresources match the scope of their parent resource. Default is "*". + Scope *string `field:"optional" json:"scope" yaml:"scope"` +} + +// RunAsGroupStrategyOptions defines the strategy type and any options used to create the strategy. +type RunAsGroupStrategyOptionsV1Beta1 struct { + // rule is the strategy that will dictate the allowable RunAsGroup values that may be set. + Rule *string `field:"required" json:"rule" yaml:"rule"` + // ranges are the allowed ranges of gids that may be used. + // + // If you would like to force a single gid then supply a single range with the same start and end. Required for MustRunAs. + Ranges *[]*IdRangeV1Beta1 `field:"optional" json:"ranges" yaml:"ranges"` +} + +// RunAsUserStrategyOptions defines the strategy type and any options used to create the strategy. +type RunAsUserStrategyOptionsV1Beta1 struct { + // rule is the strategy that will dictate the allowable RunAsUser values that may be set. + Rule *string `field:"required" json:"rule" yaml:"rule"` + // ranges are the allowed ranges of uids that may be used. + // + // If you would like to force a single uid then supply a single range with the same start and end. Required for MustRunAs. + Ranges *[]*IdRangeV1Beta1 `field:"optional" json:"ranges" yaml:"ranges"` +} + +// RuntimeClassSpec is a specification of a RuntimeClass. +// +// It contains parameters that are required to describe the RuntimeClass to the Container Runtime Interface (CRI) implementation, as well as any other components that need to understand how the pod will be run. The RuntimeClassSpec is immutable. +type RuntimeClassSpecV1Alpha1 struct { + // RuntimeHandler specifies the underlying runtime and configuration that the CRI implementation will use to handle pods of this class. + // + // The possible values are specific to the node & CRI configuration. It is assumed that all handlers are available on every node, and handlers of the same name are equivalent on every node. For example, a handler called "runc" might specify that the runc OCI runtime (using native Linux containers) will be used to run the containers in a pod. The RuntimeHandler must be lowercase, conform to the DNS Label (RFC 1123) requirements, and is immutable. + RuntimeHandler *string `field:"required" json:"runtimeHandler" yaml:"runtimeHandler"` + // Overhead represents the resource overhead associated with running a pod for a given RuntimeClass. + // + // For more details, see https://git.k8s.io/enhancements/keps/sig-node/688-pod-overhead/README.md This field is beta-level as of Kubernetes v1.18, and is only honored by servers that enable the PodOverhead feature. + Overhead *OverheadV1Alpha1 `field:"optional" json:"overhead" yaml:"overhead"` + // Scheduling holds the scheduling constraints to ensure that pods running with this RuntimeClass are scheduled to nodes that support it. + // + // If scheduling is nil, this RuntimeClass is assumed to be supported by all nodes. + Scheduling *SchedulingV1Alpha1 `field:"optional" json:"scheduling" yaml:"scheduling"` +} + +// RuntimeClassStrategyOptions define the strategy that will dictate the allowable RuntimeClasses for a pod. +type RuntimeClassStrategyOptionsV1Beta1 struct { + // allowedRuntimeClassNames is an allowlist of RuntimeClass names that may be specified on a pod. + // + // A value of "*" means that any RuntimeClass name is allowed, and must be the only item in the list. An empty list requires the RuntimeClassName field to be unset. + AllowedRuntimeClassNames *[]*string `field:"required" json:"allowedRuntimeClassNames" yaml:"allowedRuntimeClassNames"` + // defaultRuntimeClassName is the default RuntimeClassName to set on the pod. + // + // The default MUST be allowed by the allowedRuntimeClassNames list. A value of nil does not mutate the Pod. + DefaultRuntimeClassName *string `field:"optional" json:"defaultRuntimeClassName" yaml:"defaultRuntimeClassName"` +} + +// ScaleIOPersistentVolumeSource represents a persistent ScaleIO volume. +type ScaleIoPersistentVolumeSource struct { + // The host address of the ScaleIO API Gateway. + Gateway *string `field:"required" json:"gateway" yaml:"gateway"` + // SecretRef references to the secret for ScaleIO user and other sensitive information. + // + // If this is not provided, Login operation will fail. + SecretRef *SecretReference `field:"required" json:"secretRef" yaml:"secretRef"` + // The name of the storage system as configured in ScaleIO. + System *string `field:"required" json:"system" yaml:"system"` + // Filesystem type to mount. + // + // Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Default is "xfs" + FsType *string `field:"optional" json:"fsType" yaml:"fsType"` + // The name of the ScaleIO Protection Domain for the configured storage. + ProtectionDomain *string `field:"optional" json:"protectionDomain" yaml:"protectionDomain"` + // Defaults to false (read/write). + // + // ReadOnly here will force the ReadOnly setting in VolumeMounts. + ReadOnly *bool `field:"optional" json:"readOnly" yaml:"readOnly"` + // Flag to enable/disable SSL communication with Gateway, default false. + SslEnabled *bool `field:"optional" json:"sslEnabled" yaml:"sslEnabled"` + // Indicates whether the storage for a volume should be ThickProvisioned or ThinProvisioned. + // + // Default is ThinProvisioned. + StorageMode *string `field:"optional" json:"storageMode" yaml:"storageMode"` + // The ScaleIO Storage Pool associated with the protection domain. + StoragePool *string `field:"optional" json:"storagePool" yaml:"storagePool"` + // The name of a volume already created in the ScaleIO system that is associated with this volume source. + VolumeName *string `field:"optional" json:"volumeName" yaml:"volumeName"` +} + +// ScaleIOVolumeSource represents a persistent ScaleIO volume. +type ScaleIoVolumeSource struct { + // The host address of the ScaleIO API Gateway. + Gateway *string `field:"required" json:"gateway" yaml:"gateway"` + // SecretRef references to the secret for ScaleIO user and other sensitive information. + // + // If this is not provided, Login operation will fail. + SecretRef *LocalObjectReference `field:"required" json:"secretRef" yaml:"secretRef"` + // The name of the storage system as configured in ScaleIO. + System *string `field:"required" json:"system" yaml:"system"` + // Filesystem type to mount. + // + // Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Default is "xfs". + FsType *string `field:"optional" json:"fsType" yaml:"fsType"` + // The name of the ScaleIO Protection Domain for the configured storage. + ProtectionDomain *string `field:"optional" json:"protectionDomain" yaml:"protectionDomain"` + // Defaults to false (read/write). + // + // ReadOnly here will force the ReadOnly setting in VolumeMounts. + ReadOnly *bool `field:"optional" json:"readOnly" yaml:"readOnly"` + // Flag to enable/disable SSL communication with Gateway, default false. + SslEnabled *bool `field:"optional" json:"sslEnabled" yaml:"sslEnabled"` + // Indicates whether the storage for a volume should be ThickProvisioned or ThinProvisioned. + // + // Default is ThinProvisioned. + StorageMode *string `field:"optional" json:"storageMode" yaml:"storageMode"` + // The ScaleIO Storage Pool associated with the protection domain. + StoragePool *string `field:"optional" json:"storagePool" yaml:"storagePool"` + // The name of a volume already created in the ScaleIO system that is associated with this volume source. + VolumeName *string `field:"optional" json:"volumeName" yaml:"volumeName"` +} + +// ScaleSpec describes the attributes of a scale subresource. +type ScaleSpec struct { + // desired number of instances for the scaled object. + Replicas *float64 `field:"optional" json:"replicas" yaml:"replicas"` +} + +// Scheduling specifies the scheduling constraints for nodes supporting a RuntimeClass. +type Scheduling struct { + // nodeSelector lists labels that must be present on nodes that support this RuntimeClass. + // + // Pods using this RuntimeClass can only be scheduled to a node matched by this selector. The RuntimeClass nodeSelector is merged with a pod's existing nodeSelector. Any conflicts will cause the pod to be rejected in admission. + NodeSelector *map[string]*string `field:"optional" json:"nodeSelector" yaml:"nodeSelector"` + // tolerations are appended (excluding duplicates) to pods running with this RuntimeClass during admission, effectively unioning the set of nodes tolerated by the pod and the RuntimeClass. + Tolerations *[]*Toleration `field:"optional" json:"tolerations" yaml:"tolerations"` +} + +// Scheduling specifies the scheduling constraints for nodes supporting a RuntimeClass. +type SchedulingV1Alpha1 struct { + // nodeSelector lists labels that must be present on nodes that support this RuntimeClass. + // + // Pods using this RuntimeClass can only be scheduled to a node matched by this selector. The RuntimeClass nodeSelector is merged with a pod's existing nodeSelector. Any conflicts will cause the pod to be rejected in admission. + NodeSelector *map[string]*string `field:"optional" json:"nodeSelector" yaml:"nodeSelector"` + // tolerations are appended (excluding duplicates) to pods running with this RuntimeClass during admission, effectively unioning the set of nodes tolerated by the pod and the RuntimeClass. + Tolerations *[]*Toleration `field:"optional" json:"tolerations" yaml:"tolerations"` +} + +// Scheduling specifies the scheduling constraints for nodes supporting a RuntimeClass. +type SchedulingV1Beta1 struct { + // nodeSelector lists labels that must be present on nodes that support this RuntimeClass. + // + // Pods using this RuntimeClass can only be scheduled to a node matched by this selector. The RuntimeClass nodeSelector is merged with a pod's existing nodeSelector. Any conflicts will cause the pod to be rejected in admission. + NodeSelector *map[string]*string `field:"optional" json:"nodeSelector" yaml:"nodeSelector"` + // tolerations are appended (excluding duplicates) to pods running with this RuntimeClass during admission, effectively unioning the set of nodes tolerated by the pod and the RuntimeClass. + Tolerations *[]*Toleration `field:"optional" json:"tolerations" yaml:"tolerations"` +} + +// A scope selector represents the AND of the selectors represented by the scoped-resource selector requirements. +type ScopeSelector struct { + // A list of scope selector requirements by scope of the resources. + MatchExpressions *[]*ScopedResourceSelectorRequirement `field:"optional" json:"matchExpressions" yaml:"matchExpressions"` +} + +// A scoped-resource selector requirement is a selector that contains values, a scope name, and an operator that relates the scope name and values. +type ScopedResourceSelectorRequirement struct { + // Represents a scope's relationship to a set of values. + // + // Valid operators are In, NotIn, Exists, DoesNotExist. + Operator *string `field:"required" json:"operator" yaml:"operator"` + // The name of the scope that the selector applies to. + ScopeName *string `field:"required" json:"scopeName" yaml:"scopeName"` + // 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. + Values *[]*string `field:"optional" json:"values" yaml:"values"` +} + +// SELinuxOptions are the labels to be applied to the container. +type SeLinuxOptions struct { + // Level is SELinux level label that applies to the container. + Level *string `field:"optional" json:"level" yaml:"level"` + // Role is a SELinux role label that applies to the container. + Role *string `field:"optional" json:"role" yaml:"role"` + // Type is a SELinux type label that applies to the container. + Type *string `field:"optional" json:"type" yaml:"type"` + // User is a SELinux user label that applies to the container. + User *string `field:"optional" json:"user" yaml:"user"` +} + +// SELinuxStrategyOptions defines the strategy type and any options used to create the strategy. +type SeLinuxStrategyOptionsV1Beta1 struct { + // rule is the strategy that will dictate the allowable labels that may be set. + Rule *string `field:"required" json:"rule" yaml:"rule"` + // seLinuxOptions required to run as; + // + // required for MustRunAs More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ + SeLinuxOptions *SeLinuxOptions `field:"optional" json:"seLinuxOptions" yaml:"seLinuxOptions"` +} + +// SeccompProfile defines a pod/container's seccomp profile settings. +// +// Only one profile source may be set. +type SeccompProfile struct { + // type indicates which kind of seccomp profile will be applied. Valid options are:. + // + // Localhost - a profile defined in a file on the node should be used. RuntimeDefault - the container runtime default profile should be used. Unconfined - no profile should be applied. + Type *string `field:"required" json:"type" yaml:"type"` + // localhostProfile indicates a profile defined in a file on the node should be used. + // + // The profile must be preconfigured on the node to work. Must be a descending path, relative to the kubelet's configured seccomp profile location. Must only be set if type is "Localhost". + LocalhostProfile *string `field:"optional" json:"localhostProfile" yaml:"localhostProfile"` +} + +// SecretEnvSource selects a Secret to populate the environment variables with. +// +// The contents of the target Secret's Data field will represent the key-value pairs as environment variables. +type SecretEnvSource struct { + // Name of the referent. + // + // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + Name *string `field:"optional" json:"name" yaml:"name"` + // Specify whether the Secret must be defined. + Optional *bool `field:"optional" json:"optional" yaml:"optional"` +} + +// SecretKeySelector selects a key of a Secret. +type SecretKeySelector struct { + // The key of the secret to select from. + // + // Must be a valid secret key. + Key *string `field:"required" json:"key" yaml:"key"` + // Name of the referent. + // + // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + Name *string `field:"optional" json:"name" yaml:"name"` + // Specify whether the Secret or its key must be defined. + Optional *bool `field:"optional" json:"optional" yaml:"optional"` +} + +// Adapts a secret into a projected volume. +// +// The contents of the target Secret's Data field will be presented in a projected volume as files using the keys in the Data field as the file names. Note that this is identical to a secret volume source without the default mode. +type SecretProjection struct { + // If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. + // + // If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'. + Items *[]*KeyToPath `field:"optional" json:"items" yaml:"items"` + // Name of the referent. + // + // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + Name *string `field:"optional" json:"name" yaml:"name"` + // Specify whether the Secret or its key must be defined. + Optional *bool `field:"optional" json:"optional" yaml:"optional"` +} + +// SecretReference represents a Secret Reference. +// +// It has enough information to retrieve secret in any namespace. +type SecretReference struct { + // Name is unique within a namespace to reference a secret resource. + Name *string `field:"optional" json:"name" yaml:"name"` + // Namespace defines the space within which the secret name must be unique. + Namespace *string `field:"optional" json:"namespace" yaml:"namespace"` +} + +// Adapts a Secret into a volume. +// +// The contents of the target Secret's Data field will be presented in a volume as files using the keys in the Data field as the file names. Secret volumes support ownership management and SELinux relabeling. +type SecretVolumeSource struct { + // Optional: mode bits used to set permissions on created files by default. + // + // Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set. + DefaultMode *float64 `field:"optional" json:"defaultMode" yaml:"defaultMode"` + // If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. + // + // If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'. + Items *[]*KeyToPath `field:"optional" json:"items" yaml:"items"` + // Specify whether the Secret or its keys must be defined. + Optional *bool `field:"optional" json:"optional" yaml:"optional"` + // Name of the secret in the pod's namespace to use. + // + // More info: https://kubernetes.io/docs/concepts/storage/volumes#secret + SecretName *string `field:"optional" json:"secretName" yaml:"secretName"` +} + +// SecurityContext holds security configuration that will be applied to a container. +// +// Some fields are present in both SecurityContext and PodSecurityContext. When both are set, the values in SecurityContext take precedence. +type SecurityContext struct { + // AllowPrivilegeEscalation controls whether a process can gain more privileges than its parent process. + // + // This bool directly controls if the no_new_privs flag will be set on the container process. AllowPrivilegeEscalation is true always when the container is: 1) run as Privileged 2) has CAP_SYS_ADMIN + AllowPrivilegeEscalation *bool `field:"optional" json:"allowPrivilegeEscalation" yaml:"allowPrivilegeEscalation"` + // The capabilities to add/drop when running containers. + // + // Defaults to the default set of capabilities granted by the container runtime. + Capabilities *Capabilities `field:"optional" json:"capabilities" yaml:"capabilities"` + // Run container in privileged mode. + // + // Processes in privileged containers are essentially equivalent to root on the host. Defaults to false. + Privileged *bool `field:"optional" json:"privileged" yaml:"privileged"` + // procMount denotes the type of proc mount to use for the containers. + // + // The default is DefaultProcMount which uses the container runtime defaults for readonly paths and masked paths. This requires the ProcMountType feature flag to be enabled. + ProcMount *string `field:"optional" json:"procMount" yaml:"procMount"` + // Whether this container has a read-only root filesystem. + // + // Default is false. + ReadOnlyRootFilesystem *bool `field:"optional" json:"readOnlyRootFilesystem" yaml:"readOnlyRootFilesystem"` + // The GID to run the entrypoint of the container process. + // + // Uses runtime default if unset. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. + RunAsGroup *float64 `field:"optional" json:"runAsGroup" yaml:"runAsGroup"` + // Indicates that the container must run as a non-root user. + // + // If true, the Kubelet will validate the image at runtime to ensure that it does not run as UID 0 (root) and fail to start the container if it does. If unset or false, no such validation will be performed. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. + RunAsNonRoot *bool `field:"optional" json:"runAsNonRoot" yaml:"runAsNonRoot"` + // The UID to run the entrypoint of the container process. + // + // Defaults to user specified in image metadata if unspecified. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. + RunAsUser *float64 `field:"optional" json:"runAsUser" yaml:"runAsUser"` + // The seccomp options to use by this container. + // + // If seccomp options are provided at both the pod & container level, the container options override the pod options. + SeccompProfile *SeccompProfile `field:"optional" json:"seccompProfile" yaml:"seccompProfile"` + // The SELinux context to be applied to the container. + // + // If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. + SeLinuxOptions *SeLinuxOptions `field:"optional" json:"seLinuxOptions" yaml:"seLinuxOptions"` + // The Windows specific settings applied to all containers. + // + // If unspecified, the options from the PodSecurityContext will be used. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. + WindowsOptions *WindowsSecurityContextOptions `field:"optional" json:"windowsOptions" yaml:"windowsOptions"` +} + +// SelfSubjectAccessReviewSpec is a description of the access request. +// +// Exactly one of ResourceAuthorizationAttributes and NonResourceAuthorizationAttributes must be set. +type SelfSubjectAccessReviewSpec struct { + // NonResourceAttributes describes information for a non-resource access request. + NonResourceAttributes *NonResourceAttributes `field:"optional" json:"nonResourceAttributes" yaml:"nonResourceAttributes"` + // ResourceAuthorizationAttributes describes information for a resource access request. + ResourceAttributes *ResourceAttributes `field:"optional" json:"resourceAttributes" yaml:"resourceAttributes"` +} + +// SelfSubjectRulesReviewSpec defines the specification for SelfSubjectRulesReview. +type SelfSubjectRulesReviewSpec struct { + // Namespace to evaluate rules for. + // + // Required. + Namespace *string `field:"optional" json:"namespace" yaml:"namespace"` +} + +// ServiceAccountSubject holds detailed information for service-account-kind subject. +type ServiceAccountSubjectV1Beta1 struct { + // `name` is the name of matching ServiceAccount objects, or "*" to match regardless of name. + // + // Required. + Name *string `field:"required" json:"name" yaml:"name"` + // `namespace` is the namespace of matching ServiceAccount objects. + // + // Required. + Namespace *string `field:"required" json:"namespace" yaml:"namespace"` +} + +// ServiceAccountTokenProjection represents a projected service account token volume. +// +// This projection can be used to insert a service account token into the pods runtime filesystem for use against APIs (Kubernetes API Server or otherwise). +type ServiceAccountTokenProjection struct { + // Path is the path relative to the mount point of the file to project the token into. + Path *string `field:"required" json:"path" yaml:"path"` + // Audience is the intended audience of the token. + // + // A recipient of a token must identify itself with an identifier specified in the audience of the token, and otherwise should reject the token. The audience defaults to the identifier of the apiserver. + Audience *string `field:"optional" json:"audience" yaml:"audience"` + // ExpirationSeconds is the requested duration of validity of the service account token. + // + // As the token approaches expiration, the kubelet volume plugin will proactively rotate the service account token. The kubelet will start trying to rotate the token if the token is older than 80 percent of its time to live or if the token is older than 24 hours.Defaults to 1 hour and must be at least 10 minutes. + ExpirationSeconds *float64 `field:"optional" json:"expirationSeconds" yaml:"expirationSeconds"` +} + +// ServiceBackendPort is the service port being referenced. +type ServiceBackendPort struct { + // Name is the name of the port on the Service. + // + // This is a mutually exclusive setting with "Number". + Name *string `field:"optional" json:"name" yaml:"name"` + // Number is the numerical port number (e.g. 80) on the Service. This is a mutually exclusive setting with "Name". + Number *float64 `field:"optional" json:"number" yaml:"number"` +} + +// ServicePort contains information on service's port. +type ServicePort struct { + // The port that will be exposed by this service. + Port *float64 `field:"required" json:"port" yaml:"port"` + // The application protocol for this port. + // + // This field follows standard Kubernetes label syntax. Un-prefixed names are reserved for IANA standard service names (as per RFC-6335 and http://www.iana.org/assignments/service-names). Non-standard protocols should use prefixed names such as mycompany.com/my-custom-protocol. + AppProtocol *string `field:"optional" json:"appProtocol" yaml:"appProtocol"` + // The name of this port within the service. + // + // This must be a DNS_LABEL. All ports within a ServiceSpec must have unique names. When considering the endpoints for a Service, this must match the 'name' field in the EndpointPort. Optional if only one ServicePort is defined on this service. + Name *string `field:"optional" json:"name" yaml:"name"` + // The port on each node on which this service is exposed when type is NodePort or LoadBalancer. + // + // Usually assigned by the system. If a value is specified, in-range, and not in use it will be used, otherwise the operation will fail. If not specified, a port will be allocated if this Service requires one. If this field is specified when creating a Service which does not need it, creation will fail. This field will be wiped when updating a Service to no longer need it (e.g. changing type from NodePort to ClusterIP). More info: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport + NodePort *float64 `field:"optional" json:"nodePort" yaml:"nodePort"` + // The IP protocol for this port. + // + // Supports "TCP", "UDP", and "SCTP". Default is TCP. + Protocol *string `field:"optional" json:"protocol" yaml:"protocol"` + // Number or name of the port to access on the pods targeted by the service. + // + // Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. If this is a string, it will be looked up as a named port in the target Pod's container ports. If this is not specified, the value of the 'port' field is used (an identity map). This field is ignored for services with clusterIP=None, and should be omitted or set equal to the 'port' field. More info: https://kubernetes.io/docs/concepts/services-networking/service/#defining-a-service + TargetPort IntOrString `field:"optional" json:"targetPort" yaml:"targetPort"` +} + +// ServiceReference holds a reference to Service.legacy.k8s.io. +type ServiceReference struct { + // `name` is the name of the service. + // + // Required. + Name *string `field:"required" json:"name" yaml:"name"` + // `namespace` is the namespace of the service. + // + // Required. + Namespace *string `field:"required" json:"namespace" yaml:"namespace"` + // `path` is an optional URL path which will be sent in any request to this service. + Path *string `field:"optional" json:"path" yaml:"path"` + // If specified, the port on the service that hosting webhook. + // + // Default to 443 for backward compatibility. `port` should be a valid port number (1-65535, inclusive). + Port *float64 `field:"optional" json:"port" yaml:"port"` +} + +// ServiceSpec describes the attributes that a user creates on a service. +type ServiceSpec struct { + // allocateLoadBalancerNodePorts defines if NodePorts will be automatically allocated for services with type LoadBalancer. + // + // Default is "true". It may be set to "false" if the cluster load-balancer does not rely on NodePorts. If the caller requests specific NodePorts (by specifying a value), those requests will be respected, regardless of this field. This field may only be set for services with type LoadBalancer and will be cleared if the type is changed to any other type. This field is beta-level and is only honored by servers that enable the ServiceLBNodePortControl feature. + AllocateLoadBalancerNodePorts *bool `field:"optional" json:"allocateLoadBalancerNodePorts" yaml:"allocateLoadBalancerNodePorts"` + // clusterIP is the IP address of the service and is usually assigned randomly. + // + // If an address is specified manually, is in-range (as per system configuration), and is not in use, it will be allocated to the service; otherwise creation of the service will fail. This field may not be changed through updates unless the type field is also being changed to ExternalName (which requires this field to be blank) or the type field is being changed from ExternalName (in which case this field may optionally be specified, as describe above). Valid values are "None", empty string (""), or a valid IP address. Setting this to "None" makes a "headless service" (no virtual IP), which is useful when direct endpoint connections are preferred and proxying is not required. Only applies to types ClusterIP, NodePort, and LoadBalancer. If this field is specified when creating a Service of type ExternalName, creation will fail. This field will be wiped when updating a Service to type ExternalName. More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies + ClusterIp *string `field:"optional" json:"clusterIp" yaml:"clusterIp"` + // ClusterIPs is a list of IP addresses assigned to this service, and are usually assigned randomly. + // + // If an address is specified manually, is in-range (as per system configuration), and is not in use, it will be allocated to the service; otherwise creation of the service will fail. This field may not be changed through updates unless the type field is also being changed to ExternalName (which requires this field to be empty) or the type field is being changed from ExternalName (in which case this field may optionally be specified, as describe above). Valid values are "None", empty string (""), or a valid IP address. Setting this to "None" makes a "headless service" (no virtual IP), which is useful when direct endpoint connections are preferred and proxying is not required. Only applies to types ClusterIP, NodePort, and LoadBalancer. If this field is specified when creating a Service of type ExternalName, creation will fail. This field will be wiped when updating a Service to type ExternalName. If this field is not specified, it will be initialized from the clusterIP field. If this field is specified, clients must ensure that clusterIPs[0] and clusterIP have the same value. + // + // Unless the "IPv6DualStack" feature gate is enabled, this field is limited to one value, which must be the same as the clusterIP field. If the feature gate is enabled, this field may hold a maximum of two entries (dual-stack IPs, in either order). These IPs must correspond to the values of the ipFamilies field. Both clusterIPs and ipFamilies are governed by the ipFamilyPolicy field. More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies + ClusterIPs *[]*string `field:"optional" json:"clusterIPs" yaml:"clusterIPs"` + // externalIPs is a list of IP addresses for which nodes in the cluster will also accept traffic for this service. + // + // These IPs are not managed by Kubernetes. The user is responsible for ensuring that traffic arrives at a node with this IP. A common example is external load-balancers that are not part of the Kubernetes system. + ExternalIPs *[]*string `field:"optional" json:"externalIPs" yaml:"externalIPs"` + // externalName is the external reference that discovery mechanisms will return as an alias for this service (e.g. a DNS CNAME record). No proxying will be involved. Must be a lowercase RFC-1123 hostname (https://tools.ietf.org/html/rfc1123) and requires `type` to be "ExternalName". + ExternalName *string `field:"optional" json:"externalName" yaml:"externalName"` + // externalTrafficPolicy denotes if this Service desires to route external traffic to node-local or cluster-wide endpoints. + // + // "Local" preserves the client source IP and avoids a second hop for LoadBalancer and Nodeport type services, but risks potentially imbalanced traffic spreading. "Cluster" obscures the client source IP and may cause a second hop to another node, but should have good overall load-spreading. + ExternalTrafficPolicy *string `field:"optional" json:"externalTrafficPolicy" yaml:"externalTrafficPolicy"` + // healthCheckNodePort specifies the healthcheck nodePort for the service. + // + // This only applies when type is set to LoadBalancer and externalTrafficPolicy is set to Local. If a value is specified, is in-range, and is not in use, it will be used. If not specified, a value will be automatically allocated. External systems (e.g. load-balancers) can use this port to determine if a given node holds endpoints for this service or not. If this field is specified when creating a Service which does not need it, creation will fail. This field will be wiped when updating a Service to no longer need it (e.g. changing type). + HealthCheckNodePort *float64 `field:"optional" json:"healthCheckNodePort" yaml:"healthCheckNodePort"` + // InternalTrafficPolicy specifies if the cluster internal traffic should be routed to all endpoints or node-local endpoints only. + // + // "Cluster" routes internal traffic to a Service to all endpoints. "Local" routes traffic to node-local endpoints only, traffic is dropped if no node-local endpoints are ready. The default value is "Cluster". + InternalTrafficPolicy *string `field:"optional" json:"internalTrafficPolicy" yaml:"internalTrafficPolicy"` + // IPFamilies is a list of IP families (e.g. IPv4, IPv6) assigned to this service, and is gated by the "IPv6DualStack" feature gate. This field is usually assigned automatically based on cluster configuration and the ipFamilyPolicy field. If this field is specified manually, the requested family is available in the cluster, and ipFamilyPolicy allows it, it will be used; otherwise creation of the service will fail. This field is conditionally mutable: it allows for adding or removing a secondary IP family, but it does not allow changing the primary IP family of the Service. Valid values are "IPv4" and "IPv6". This field only applies to Services of types ClusterIP, NodePort, and LoadBalancer, and does apply to "headless" services. This field will be wiped when updating a Service to type ExternalName. + // + // This field may hold a maximum of two entries (dual-stack families, in either order). These families must correspond to the values of the clusterIPs field, if specified. Both clusterIPs and ipFamilies are governed by the ipFamilyPolicy field. + IpFamilies *[]*string `field:"optional" json:"ipFamilies" yaml:"ipFamilies"` + // IPFamilyPolicy represents the dual-stack-ness requested or required by this Service, and is gated by the "IPv6DualStack" feature gate. + // + // If there is no value provided, then this field will be set to SingleStack. Services can be "SingleStack" (a single IP family), "PreferDualStack" (two IP families on dual-stack configured clusters or a single IP family on single-stack clusters), or "RequireDualStack" (two IP families on dual-stack configured clusters, otherwise fail). The ipFamilies and clusterIPs fields depend on the value of this field. This field will be wiped when updating a service to type ExternalName. + IpFamilyPolicy *string `field:"optional" json:"ipFamilyPolicy" yaml:"ipFamilyPolicy"` + // loadBalancerClass is the class of the load balancer implementation this Service belongs to. + // + // If specified, the value of this field must be a label-style identifier, with an optional prefix, e.g. "internal-vip" or "example.com/internal-vip". Unprefixed names are reserved for end-users. This field can only be set when the Service type is 'LoadBalancer'. If not set, the default load balancer implementation is used, today this is typically done through the cloud provider integration, but should apply for any default implementation. If set, it is assumed that a load balancer implementation is watching for Services with a matching class. Any default load balancer implementation (e.g. cloud providers) should ignore Services that set this field. This field can only be set when creating or updating a Service to type 'LoadBalancer'. Once set, it can not be changed. This field will be wiped when a service is updated to a non 'LoadBalancer' type. + LoadBalancerClass *string `field:"optional" json:"loadBalancerClass" yaml:"loadBalancerClass"` + // Only applies to Service Type: LoadBalancer LoadBalancer will get created with the IP specified in this field. + // + // This feature depends on whether the underlying cloud-provider supports specifying the loadBalancerIP when a load balancer is created. This field will be ignored if the cloud-provider does not support the feature. + LoadBalancerIp *string `field:"optional" json:"loadBalancerIp" yaml:"loadBalancerIp"` + // If specified and supported by the platform, this will restrict traffic through the cloud-provider load-balancer will be restricted to the specified client IPs. + // + // This field will be ignored if the cloud-provider does not support the feature." More info: https://kubernetes.io/docs/tasks/access-application-cluster/create-external-load-balancer/ + LoadBalancerSourceRanges *[]*string `field:"optional" json:"loadBalancerSourceRanges" yaml:"loadBalancerSourceRanges"` + // The list of ports that are exposed by this service. + // + // More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies + Ports *[]*ServicePort `field:"optional" json:"ports" yaml:"ports"` + // publishNotReadyAddresses indicates that any agent which deals with endpoints for this Service should disregard any indications of ready/not-ready. + // + // The primary use case for setting this field is for a StatefulSet's Headless Service to propagate SRV DNS records for its Pods for the purpose of peer discovery. The Kubernetes controllers that generate Endpoints and EndpointSlice resources for Services interpret this to mean that all endpoints are considered "ready" even if the Pods themselves are not. Agents which consume only Kubernetes generated endpoints through the Endpoints or EndpointSlice resources can safely assume this behavior. + PublishNotReadyAddresses *bool `field:"optional" json:"publishNotReadyAddresses" yaml:"publishNotReadyAddresses"` + // Route service traffic to pods with label keys and values matching this selector. + // + // If empty or not present, the service is assumed to have an external process managing its endpoints, which Kubernetes will not modify_helm. Only applies to types ClusterIP, NodePort, and LoadBalancer. Ignored if type is ExternalName. More info: https://kubernetes.io/docs/concepts/services-networking/service/ + Selector *map[string]*string `field:"optional" json:"selector" yaml:"selector"` + // Supports "ClientIP" and "None". + // + // Used to maintain session affinity. Enable client IP based session affinity. Must be ClientIP or None. Defaults to None. More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies + SessionAffinity *string `field:"optional" json:"sessionAffinity" yaml:"sessionAffinity"` + // sessionAffinityConfig contains the configurations of session affinity. + SessionAffinityConfig *SessionAffinityConfig `field:"optional" json:"sessionAffinityConfig" yaml:"sessionAffinityConfig"` + // type determines how the Service is exposed. + // + // Defaults to ClusterIP. Valid options are ExternalName, ClusterIP, NodePort, and LoadBalancer. "ClusterIP" allocates a cluster-internal IP address for load-balancing to endpoints. Endpoints are determined by the selector or if that is not specified, by manual construction of an Endpoints object or EndpointSlice objects. If clusterIP is "None", no virtual IP is allocated and the endpoints are published as a set of endpoints rather than a virtual IP. "NodePort" builds on ClusterIP and allocates a port on every node which routes to the same endpoints as the clusterIP. "LoadBalancer" builds on NodePort and creates an external load-balancer (if supported in the current cloud) which routes to the same endpoints as the clusterIP. "ExternalName" aliases this service to the specified externalName. Several other fields do not apply to ExternalName services. More info: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types + Type *string `field:"optional" json:"type" yaml:"type"` +} + +// SessionAffinityConfig represents the configurations of session affinity. +type SessionAffinityConfig struct { + // clientIP contains the configurations of Client IP based session affinity. + ClientIp *ClientIpConfig `field:"optional" json:"clientIp" yaml:"clientIp"` +} + +// A StatefulSetSpec is the specification of a StatefulSet. +type StatefulSetSpec struct { + // selector is a label query over pods that should match the replica count. + // + // It must match the pod template's labels. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors + Selector *LabelSelector `field:"required" json:"selector" yaml:"selector"` + // serviceName is the name of the service that governs this StatefulSet. + // + // This service must exist before the StatefulSet, and is responsible for the network identity of the set. Pods get DNS/hostnames that follow the pattern: pod-specific-string.serviceName.default.svc.cluster.local where "pod-specific-string" is managed by the StatefulSet controller. + ServiceName *string `field:"required" json:"serviceName" yaml:"serviceName"` + // template is the object that describes the pod that will be created if insufficient replicas are detected. + // + // Each pod stamped out by the StatefulSet will fulfill this Template, but have a unique identity from the rest of the StatefulSet. + Template *PodTemplateSpec `field:"required" json:"template" yaml:"template"` + // Minimum number of seconds for which a newly created pod should be ready without any of its container crashing for it to be considered available. + // + // Defaults to 0 (pod will be considered available as soon as it is ready) This is an alpha field and requires enabling StatefulSetMinReadySeconds feature gate. + MinReadySeconds *float64 `field:"optional" json:"minReadySeconds" yaml:"minReadySeconds"` + // podManagementPolicy controls how pods are created during initial scale up, when replacing pods on nodes, or when scaling down. + // + // The default policy is `OrderedReady`, where pods are created in increasing order (pod-0, then pod-1, etc) and the controller will wait until each pod is ready before continuing. When scaling down, the pods are removed in the opposite order. The alternative policy is `Parallel` which will create pods in parallel to match the desired scale without waiting, and on scale down will delete all pods at once. + PodManagementPolicy *string `field:"optional" json:"podManagementPolicy" yaml:"podManagementPolicy"` + // replicas is the desired number of replicas of the given Template. + // + // These are replicas in the sense that they are instantiations of the same Template, but individual replicas also have a consistent identity. If unspecified, defaults to 1. + Replicas *float64 `field:"optional" json:"replicas" yaml:"replicas"` + // revisionHistoryLimit is the maximum number of revisions that will be maintained in the StatefulSet's revision history. + // + // The revision history consists of all revisions not represented by a currently applied StatefulSetSpec version. The default value is 10. + RevisionHistoryLimit *float64 `field:"optional" json:"revisionHistoryLimit" yaml:"revisionHistoryLimit"` + // updateStrategy indicates the StatefulSetUpdateStrategy that will be employed to update Pods in the StatefulSet when a revision is made to Template. + UpdateStrategy *StatefulSetUpdateStrategy `field:"optional" json:"updateStrategy" yaml:"updateStrategy"` + // volumeClaimTemplates is a list of claims that pods are allowed to reference. + // + // The StatefulSet controller is responsible for mapping network identities to claims in a way that maintains the identity of a pod. Every claim in this list must have at least one matching (by name) volumeMount in one container in the template. A claim in this list takes precedence over any volumes in the template, with the same name. + VolumeClaimTemplates *[]*KubePersistentVolumeClaimProps `field:"optional" json:"volumeClaimTemplates" yaml:"volumeClaimTemplates"` +} + +// StatefulSetUpdateStrategy indicates the strategy that the StatefulSet controller will use to perform updates. +// +// It includes any additional parameters necessary to perform the update for the indicated strategy. +type StatefulSetUpdateStrategy struct { + // RollingUpdate is used to communicate parameters when Type is RollingUpdateStatefulSetStrategyType. + RollingUpdate *RollingUpdateStatefulSetStrategy `field:"optional" json:"rollingUpdate" yaml:"rollingUpdate"` + // Type indicates the type of the StatefulSetUpdateStrategy. + // + // Default is RollingUpdate. + Type *string `field:"optional" json:"type" yaml:"type"` +} + +// StatusCause provides more information about an api.Status failure, including cases when multiple errors are encountered. +type StatusCause struct { + // The field of the resource that has caused this error, as named by its JSON serialization. + // + // May include dot and postfix notation for nested attributes. Arrays are zero-indexed. Fields may appear more than once in an array of causes due to fields having multiple errors. Optional. + // + // Examples: + // "name" - the field "name" on the current resource + // "items[0].name" - the field "name" on the first array entry in "items" + Field *string `field:"optional" json:"field" yaml:"field"` + // A human-readable description of the cause of the error. + // + // This field may be presented as-is to a reader. + Message *string `field:"optional" json:"message" yaml:"message"` + // A machine-readable description of the cause of the error. + // + // If this value is empty there is no information available. + Reason *string `field:"optional" json:"reason" yaml:"reason"` +} + +// StatusDetails is a set of additional properties that MAY be set by the server to provide additional information about a response. +// +// The Reason field of a Status object defines what attributes will be set. Clients must ignore fields that do not match the defined type of each attribute, and should assume that any attribute may be empty, invalid, or under defined. +type StatusDetails struct { + // The Causes array includes more details associated with the StatusReason failure. + // + // Not all StatusReasons may provide detailed causes. + Causes *[]*StatusCause `field:"optional" json:"causes" yaml:"causes"` + // The group attribute of the resource associated with the status StatusReason. + Group *string `field:"optional" json:"group" yaml:"group"` + // The kind attribute of the resource associated with the status StatusReason. + // + // On some operations may differ from the requested resource Kind. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + Kind *string `field:"optional" json:"kind" yaml:"kind"` + // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). + Name *string `field:"optional" json:"name" yaml:"name"` + // If specified, the time in seconds before the operation should be retried. + // + // Some errors may indicate the client must take an alternate action - for those errors this field may indicate how long to wait before taking the alternate action. + RetryAfterSeconds *float64 `field:"optional" json:"retryAfterSeconds" yaml:"retryAfterSeconds"` + // UID of the resource. + // + // (when there is a single resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids + Uid *string `field:"optional" json:"uid" yaml:"uid"` +} + +// Represents a StorageOS persistent volume resource. +type StorageOsPersistentVolumeSource struct { + // Filesystem type to mount. + // + // Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + FsType *string `field:"optional" json:"fsType" yaml:"fsType"` + // Defaults to false (read/write). + // + // ReadOnly here will force the ReadOnly setting in VolumeMounts. + ReadOnly *bool `field:"optional" json:"readOnly" yaml:"readOnly"` + // SecretRef specifies the secret to use for obtaining the StorageOS API credentials. + // + // If not specified, default values will be attempted. + SecretRef *ObjectReference `field:"optional" json:"secretRef" yaml:"secretRef"` + // VolumeName is the human-readable name of the StorageOS volume. + // + // Volume names are only unique within a namespace. + VolumeName *string `field:"optional" json:"volumeName" yaml:"volumeName"` + // VolumeNamespace specifies the scope of the volume within StorageOS. + // + // If no namespace is specified then the Pod's namespace will be used. This allows the Kubernetes name scoping to be mirrored within StorageOS for tighter integration. Set VolumeName to any name to override the default behaviour. Set to "default" if you are not using namespaces within StorageOS. Namespaces that do not pre-exist within StorageOS will be created. + VolumeNamespace *string `field:"optional" json:"volumeNamespace" yaml:"volumeNamespace"` +} + +// Represents a StorageOS persistent volume resource. +type StorageOsVolumeSource struct { + // Filesystem type to mount. + // + // Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + FsType *string `field:"optional" json:"fsType" yaml:"fsType"` + // Defaults to false (read/write). + // + // ReadOnly here will force the ReadOnly setting in VolumeMounts. + ReadOnly *bool `field:"optional" json:"readOnly" yaml:"readOnly"` + // SecretRef specifies the secret to use for obtaining the StorageOS API credentials. + // + // If not specified, default values will be attempted. + SecretRef *LocalObjectReference `field:"optional" json:"secretRef" yaml:"secretRef"` + // VolumeName is the human-readable name of the StorageOS volume. + // + // Volume names are only unique within a namespace. + VolumeName *string `field:"optional" json:"volumeName" yaml:"volumeName"` + // VolumeNamespace specifies the scope of the volume within StorageOS. + // + // If no namespace is specified then the Pod's namespace will be used. This allows the Kubernetes name scoping to be mirrored within StorageOS for tighter integration. Set VolumeName to any name to override the default behaviour. Set to "default" if you are not using namespaces within StorageOS. Namespaces that do not pre-exist within StorageOS will be created. + VolumeNamespace *string `field:"optional" json:"volumeNamespace" yaml:"volumeNamespace"` +} + +// Subject contains a reference to the object or user identities a role binding applies to. +// +// This can either hold a direct API object reference, or a value for non-objects such as user and group names. +type Subject struct { + // Kind of object being referenced. + // + // Values defined by this API group are "User", "Group", and "ServiceAccount". If the Authorizer does not recognized the kind value, the Authorizer should report an error. + Kind *string `field:"required" json:"kind" yaml:"kind"` + // Name of the object being referenced. + Name *string `field:"required" json:"name" yaml:"name"` + // APIGroup holds the API group of the referenced subject. + // + // Defaults to "" for ServiceAccount subjects. Defaults to "rbac.authorization.k8s.io" for User and Group subjects. + ApiGroup *string `field:"optional" json:"apiGroup" yaml:"apiGroup"` + // Namespace of the referenced object. + // + // If the object kind is non-namespace, such as "User" or "Group", and this value is not empty the Authorizer should report an error. + Namespace *string `field:"optional" json:"namespace" yaml:"namespace"` +} + +// SubjectAccessReviewSpec is a description of the access request. +// +// Exactly one of ResourceAuthorizationAttributes and NonResourceAuthorizationAttributes must be set. +type SubjectAccessReviewSpec struct { + // Extra corresponds to the user.Info.GetExtra() method from the authenticator. Since that is input to the authorizer it needs a reflection here. + Extra *map[string]*[]*string `field:"optional" json:"extra" yaml:"extra"` + // Groups is the groups you're testing for. + Groups *[]*string `field:"optional" json:"groups" yaml:"groups"` + // NonResourceAttributes describes information for a non-resource access request. + NonResourceAttributes *NonResourceAttributes `field:"optional" json:"nonResourceAttributes" yaml:"nonResourceAttributes"` + // ResourceAuthorizationAttributes describes information for a resource access request. + ResourceAttributes *ResourceAttributes `field:"optional" json:"resourceAttributes" yaml:"resourceAttributes"` + // UID information about the requesting user. + Uid *string `field:"optional" json:"uid" yaml:"uid"` + // User is the user you're testing for. + // + // If you specify "User" but not "Groups", then is it interpreted as "What if User were not a member of any groups. + User *string `field:"optional" json:"user" yaml:"user"` +} + +// Subject contains a reference to the object or user identities a role binding applies to. +// +// This can either hold a direct API object reference, or a value for non-objects such as user and group names. +type SubjectV1Alpha1 struct { + // Kind of object being referenced. + // + // Values defined by this API group are "User", "Group", and "ServiceAccount". If the Authorizer does not recognized the kind value, the Authorizer should report an error. + Kind *string `field:"required" json:"kind" yaml:"kind"` + // Name of the object being referenced. + Name *string `field:"required" json:"name" yaml:"name"` + // APIVersion holds the API group and version of the referenced subject. + // + // Defaults to "v1" for ServiceAccount subjects. Defaults to "rbac.authorization.k8s.io/v1alpha1" for User and Group subjects. + ApiVersion *string `field:"optional" json:"apiVersion" yaml:"apiVersion"` + // Namespace of the referenced object. + // + // If the object kind is non-namespace, such as "User" or "Group", and this value is not empty the Authorizer should report an error. + Namespace *string `field:"optional" json:"namespace" yaml:"namespace"` +} + +// Subject matches the originator of a request, as identified by the request authentication system. +// +// There are three ways of matching an originator; by user, group, or service account. +type SubjectV1Beta1 struct { + // `kind` indicates which one of the other fields is non-empty. + // + // Required. + Kind *string `field:"required" json:"kind" yaml:"kind"` + // `group` matches based on user group name. + Group *GroupSubjectV1Beta1 `field:"optional" json:"group" yaml:"group"` + // `serviceAccount` matches ServiceAccounts. + ServiceAccount *ServiceAccountSubjectV1Beta1 `field:"optional" json:"serviceAccount" yaml:"serviceAccount"` + // `user` matches based on username. + User *UserSubjectV1Beta1 `field:"optional" json:"user" yaml:"user"` +} + +// SupplementalGroupsStrategyOptions defines the strategy type and options used to create the strategy. +type SupplementalGroupsStrategyOptionsV1Beta1 struct { + // ranges are the allowed ranges of supplemental groups. + // + // If you would like to force a single supplemental group then supply a single range with the same start and end. Required for MustRunAs. + Ranges *[]*IdRangeV1Beta1 `field:"optional" json:"ranges" yaml:"ranges"` + // rule is the strategy that will dictate what supplemental groups is used in the SecurityContext. + Rule *string `field:"optional" json:"rule" yaml:"rule"` +} + +// Sysctl defines a kernel parameter to be set. +type Sysctl struct { + // Name of a property to set. + Name *string `field:"required" json:"name" yaml:"name"` + // Value of a property to set. + Value *string `field:"required" json:"value" yaml:"value"` +} + +// The node this Taint is attached to has the "effect" on any pod that does not tolerate the Taint. +type Taint struct { + // Required. + // + // The effect of the taint on pods that do not tolerate the taint. Valid effects are NoSchedule, PreferNoSchedule and NoExecute. + Effect *string `field:"required" json:"effect" yaml:"effect"` + // Required. + // + // The taint key to be applied to a node. + Key *string `field:"required" json:"key" yaml:"key"` + // TimeAdded represents the time at which the taint was added. + // + // It is only written for NoExecute taints. + TimeAdded *time.Time `field:"optional" json:"timeAdded" yaml:"timeAdded"` + // The taint value corresponding to the taint key. + Value *string `field:"optional" json:"value" yaml:"value"` +} + +// TCPSocketAction describes an action based on opening a socket. +type TcpSocketAction struct { + // Number or name of the port to access on the container. + // + // Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + Port IntOrString `field:"required" json:"port" yaml:"port"` + // Optional: Host name to connect to, defaults to the pod IP. + Host *string `field:"optional" json:"host" yaml:"host"` +} + +// TokenRequest contains parameters of a service account token. +type TokenRequest struct { + // Audience is the intended audience of the token in "TokenRequestSpec". + // + // It will default to the audiences of kube apiserver. + Audience *string `field:"required" json:"audience" yaml:"audience"` + // ExpirationSeconds is the duration of validity of the token in "TokenRequestSpec". + // + // It has the same default value of "ExpirationSeconds" in "TokenRequestSpec". + ExpirationSeconds *float64 `field:"optional" json:"expirationSeconds" yaml:"expirationSeconds"` +} + +// TokenRequestSpec contains client provided parameters of a token request. +type TokenRequestSpec struct { + // Audiences are the intendend audiences of the token. + // + // A recipient of a token must identitfy themself with an identifier in the list of audiences of the token, and otherwise should reject the token. A token issued for multiple audiences may be used to authenticate against any of the audiences listed but implies a high degree of trust between the target audiences. + Audiences *[]*string `field:"required" json:"audiences" yaml:"audiences"` + // BoundObjectRef is a reference to an object that the token will be bound to. + // + // The token will only be valid for as long as the bound object exists. NOTE: The API server's TokenReview endpoint will validate the BoundObjectRef, but other audiences may not. Keep ExpirationSeconds small if you want prompt revocation. + BoundObjectRef *BoundObjectReference `field:"optional" json:"boundObjectRef" yaml:"boundObjectRef"` + // ExpirationSeconds is the requested duration of validity of the request. + // + // The token issuer may return a token with a different validity duration so a client needs to check the 'expiration' field in a response. + ExpirationSeconds *float64 `field:"optional" json:"expirationSeconds" yaml:"expirationSeconds"` +} + +// TokenReviewSpec is a description of the token authentication request. +type TokenReviewSpec struct { + // Audiences is a list of the identifiers that the resource server presented with the token identifies as. + // + // Audience-aware token authenticators will verify that the token was intended for at least one of the audiences in this list. If no audiences are provided, the audience will default to the audience of the Kubernetes apiserver. + Audiences *[]*string `field:"optional" json:"audiences" yaml:"audiences"` + // Token is the opaque bearer token. + Token *string `field:"optional" json:"token" yaml:"token"` +} + +// The pod this Toleration is attached to tolerates any taint that matches the triple using the matching operator . +type Toleration struct { + // Effect indicates the taint effect to match. + // + // Empty means match all taint effects. When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute. + Effect *string `field:"optional" json:"effect" yaml:"effect"` + // Key is the taint key that the toleration applies to. + // + // Empty means match all taint keys. If the key is empty, operator must be Exists; this combination means to match all values and all keys. + Key *string `field:"optional" json:"key" yaml:"key"` + // Operator represents a key's relationship to the value. + // + // Valid operators are Exists and Equal. Defaults to Equal. Exists is equivalent to wildcard for value, so that a pod can tolerate all taints of a particular category. + Operator *string `field:"optional" json:"operator" yaml:"operator"` + // TolerationSeconds represents the period of time the toleration (which must be of effect NoExecute, otherwise this field is ignored) tolerates the taint. + // + // By default, it is not set, which means tolerate the taint forever (do not evict). Zero and negative values will be treated as 0 (evict immediately) by the system. + TolerationSeconds *float64 `field:"optional" json:"tolerationSeconds" yaml:"tolerationSeconds"` + // Value is the taint value the toleration matches to. + // + // If the operator is Exists, the value should be empty, otherwise just a regular string. + Value *string `field:"optional" json:"value" yaml:"value"` +} + +// A topology selector requirement is a selector that matches given label. +// +// This is an alpha feature and may change in the future. +type TopologySelectorLabelRequirement struct { + // The label key that the selector applies to. + Key *string `field:"required" json:"key" yaml:"key"` + // An array of string values. + // + // One value must match the label to be selected. Each entry in Values is ORed. + Values *[]*string `field:"required" json:"values" yaml:"values"` +} + +// A topology selector term represents the result of label queries. +// +// A null or empty topology selector term matches no objects. The requirements of them are ANDed. It provides a subset of functionality as NodeSelectorTerm. This is an alpha feature and may change in the future. +type TopologySelectorTerm struct { + // A list of topology selector requirements by labels. + MatchLabelExpressions *[]*TopologySelectorLabelRequirement `field:"optional" json:"matchLabelExpressions" yaml:"matchLabelExpressions"` +} + +// TopologySpreadConstraint specifies how to spread matching pods among the given topology. +type TopologySpreadConstraint struct { + // MaxSkew describes the degree to which pods may be unevenly distributed. + // + // When `whenUnsatisfiable=DoNotSchedule`, it is the maximum permitted difference between the number of matching pods in the target topology and the global minimum. For example, in a 3-zone cluster, MaxSkew is set to 1, and pods with the same labelSelector spread as 1/1/0: | zone1 | zone2 | zone3 | | P | P | | - if MaxSkew is 1, incoming pod can only be scheduled to zone3 to become 1/1/1; scheduling it onto zone1(zone2) would make the ActualSkew(2-0) on zone1(zone2) violate MaxSkew(1). - if MaxSkew is 2, incoming pod can be scheduled onto any zone. When `whenUnsatisfiable=ScheduleAnyway`, it is used to give higher precedence to topologies that satisfy it. It's a required field. Default value is 1 and 0 is not allowed. + MaxSkew *float64 `field:"required" json:"maxSkew" yaml:"maxSkew"` + // TopologyKey is the key of node labels. + // + // Nodes that have a label with this key and identical values are considered to be in the same topology. We consider each as a "bucket", and try to put balanced number of pods into each bucket. It's a required field. + TopologyKey *string `field:"required" json:"topologyKey" yaml:"topologyKey"` + // WhenUnsatisfiable indicates how to deal with a pod if it doesn't satisfy the spread constraint. + // + // - DoNotSchedule (default) tells the scheduler not to schedule it. - ScheduleAnyway tells the scheduler to schedule the pod in any location, + // but giving higher precedence to topologies that would help reduce the + // skew. + // A constraint is considered "Unsatisfiable" for an incoming pod if and only if every possible node assigment for that pod would violate "MaxSkew" on some topology. For example, in a 3-zone cluster, MaxSkew is set to 1, and pods with the same labelSelector spread as 3/1/1: | zone1 | zone2 | zone3 | | P P P | P | P | If WhenUnsatisfiable is set to DoNotSchedule, incoming pod can only be scheduled to zone2(zone3) to become 3/2/1(3/1/2) as ActualSkew(2-1) on zone2(zone3) satisfies MaxSkew(1). In other words, the cluster can still be imbalanced, but scheduler won't make it *more* imbalanced. It's a required field. + WhenUnsatisfiable *string `field:"required" json:"whenUnsatisfiable" yaml:"whenUnsatisfiable"` + // LabelSelector is used to find matching pods. + // + // Pods that match this label selector are counted to determine the number of pods in their corresponding topology domain. + LabelSelector *LabelSelector `field:"optional" json:"labelSelector" yaml:"labelSelector"` +} + +// TypedLocalObjectReference contains enough information to let you locate the typed referenced object inside the same namespace. +type TypedLocalObjectReference struct { + // Kind is the type of resource being referenced. + Kind *string `field:"required" json:"kind" yaml:"kind"` + // Name is the name of resource being referenced. + Name *string `field:"required" json:"name" yaml:"name"` + // APIGroup is the group for the resource being referenced. + // + // If APIGroup is not specified, the specified Kind must be in the core API group. For any other third-party types, APIGroup is required. + ApiGroup *string `field:"optional" json:"apiGroup" yaml:"apiGroup"` +} + +// UserSubject holds detailed information for user-kind subject. +type UserSubjectV1Beta1 struct { + // `name` is the username that matches, or "*" to match all usernames. + // + // Required. + Name *string `field:"required" json:"name" yaml:"name"` +} + +// ValidatingWebhook describes an admission webhook and the resources and operations it applies to. +type ValidatingWebhook struct { + // AdmissionReviewVersions is an ordered list of preferred `AdmissionReview` versions the Webhook expects. + // + // API server will try to use first version in the list which it supports. If none of the versions specified in this list supported by API server, validation will fail for this object. If a persisted webhook configuration specifies allowed versions and does not include any versions known to the API Server, calls to the webhook will fail and be subject to the failure policy. + AdmissionReviewVersions *[]*string `field:"required" json:"admissionReviewVersions" yaml:"admissionReviewVersions"` + // ClientConfig defines how to communicate with the hook. + // + // Required. + ClientConfig *WebhookClientConfig `field:"required" json:"clientConfig" yaml:"clientConfig"` + // The name of the admission webhook. + // + // Name should be fully qualified, e.g., imagepolicy.kubernetes.io, where "imagepolicy" is the name of the webhook, and kubernetes.io is the name of the organization. Required. + Name *string `field:"required" json:"name" yaml:"name"` + // SideEffects states whether this webhook has side effects. + // + // Acceptable values are: None, NoneOnDryRun (webhooks created via v1beta1 may also specify Some or Unknown). Webhooks with side effects MUST implement a reconciliation system, since a request may be rejected by a future step in the admission chain and the side effects therefore need to be undone. Requests with the dryRun attribute will be auto-rejected if they match a webhook with sideEffects == Unknown or Some. + SideEffects *string `field:"required" json:"sideEffects" yaml:"sideEffects"` + // FailurePolicy defines how unrecognized errors from the admission endpoint are handled - allowed values are Ignore or Fail. + // + // Defaults to Fail. + FailurePolicy *string `field:"optional" json:"failurePolicy" yaml:"failurePolicy"` + // matchPolicy defines how the "rules" list is used to match incoming requests. Allowed values are "Exact" or "Equivalent". + // + // - Exact: match a request only if it exactly matches a specified rule. For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, but "rules" only included `apiGroups:["apps"], apiVersions:["v1"], resources: ["deployments"]`, a request to apps/v1beta1 or extensions/v1beta1 would not be sent to the webhook. + // + // - Equivalent: match a request if modifies a resource listed in rules, even via another API group or version. For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, and "rules" only included `apiGroups:["apps"], apiVersions:["v1"], resources: ["deployments"]`, a request to apps/v1beta1 or extensions/v1beta1 would be converted to apps/v1 and sent to the webhook. + // + // Defaults to "Equivalent". + MatchPolicy *string `field:"optional" json:"matchPolicy" yaml:"matchPolicy"` + // NamespaceSelector decides whether to run the webhook on an object based on whether the namespace for that object matches the selector. + // + // If the object itself is a namespace, the matching is performed on object.metadata.labels. If the object is another cluster scoped resource, it never skips the webhook. + // + // For example, to run the webhook on any objects whose namespace is not associated with "runlevel" of "0" or "1"; you will set the selector as follows: "namespaceSelector": { + // "matchExpressions": [ + // { + // "key": "runlevel", + // "operator": "NotIn", + // "values": [ + // "0", + // "1" + // ] + // } + // ] + // } + // + // If instead you want to only run the webhook on any objects whose namespace is associated with the "environment" of "prod" or "staging"; you will set the selector as follows: "namespaceSelector": { + // "matchExpressions": [ + // { + // "key": "environment", + // "operator": "In", + // "values": [ + // "prod", + // "staging" + // ] + // } + // ] + // } + // + // See https://kubernetes.io/docs/concepts/overview/working-with-objects/labels for more examples of label selectors. + // + // Default to the empty LabelSelector, which matches everything. + NamespaceSelector *LabelSelector `field:"optional" json:"namespaceSelector" yaml:"namespaceSelector"` + // ObjectSelector decides whether to run the webhook based on if the object has matching labels. + // + // objectSelector is evaluated against both the oldObject and newObject that would be sent to the webhook, and is considered to match if either object matches the selector. A null object (oldObject in the case of create, or newObject in the case of delete) or an object that cannot have labels (like a DeploymentRollback or a PodProxyOptions object) is not considered to match. Use the object selector only if the webhook is opt-in, because end users may skip the admission webhook by setting the labels. Default to the empty LabelSelector, which matches everything. + ObjectSelector *LabelSelector `field:"optional" json:"objectSelector" yaml:"objectSelector"` + // Rules describes what operations on what resources/subresources the webhook cares about. + // + // The webhook cares about an operation if it matches _any_ Rule. However, in order to prevent ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks from putting the cluster in a state which cannot be recovered from without completely disabling the plugin, ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks are never called on admission requests for ValidatingWebhookConfiguration and MutatingWebhookConfiguration objects. + Rules *[]*RuleWithOperations `field:"optional" json:"rules" yaml:"rules"` + // TimeoutSeconds specifies the timeout for this webhook. + // + // After the timeout passes, the webhook call will be ignored or the API call will fail based on the failure policy. The timeout value must be between 1 and 30 seconds. Default to 10 seconds. + TimeoutSeconds *float64 `field:"optional" json:"timeoutSeconds" yaml:"timeoutSeconds"` +} + +// Volume represents a named volume in a pod that may be accessed by any container in the pod. +type Volume struct { + // Volume's name. + // + // Must be a DNS_LABEL and unique within the pod. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + Name *string `field:"required" json:"name" yaml:"name"` + // AWSElasticBlockStore represents an AWS Disk resource that is attached to a kubelet's host machine and then exposed to the pod. + // + // More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore + AwsElasticBlockStore *AwsElasticBlockStoreVolumeSource `field:"optional" json:"awsElasticBlockStore" yaml:"awsElasticBlockStore"` + // AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod. + AzureDisk *AzureDiskVolumeSource `field:"optional" json:"azureDisk" yaml:"azureDisk"` + // AzureFile represents an Azure File Service mount on the host and bind mount to the pod. + AzureFile *AzureFileVolumeSource `field:"optional" json:"azureFile" yaml:"azureFile"` + // CephFS represents a Ceph FS mount on the host that shares a pod's lifetime. + Cephfs *CephFsVolumeSource `field:"optional" json:"cephfs" yaml:"cephfs"` + // Cinder represents a cinder volume attached and mounted on kubelets host machine. + // + // More info: https://examples.k8s.io/mysql-cinder-pd/README.md + Cinder *CinderVolumeSource `field:"optional" json:"cinder" yaml:"cinder"` + // ConfigMap represents a configMap that should populate this volume. + ConfigMap *ConfigMapVolumeSource `field:"optional" json:"configMap" yaml:"configMap"` + // CSI (Container Storage Interface) represents ephemeral storage that is handled by certain external CSI drivers (Beta feature). + Csi *CsiVolumeSource `field:"optional" json:"csi" yaml:"csi"` + // DownwardAPI represents downward API about the pod that should populate this volume. + DownwardApi *DownwardApiVolumeSource `field:"optional" json:"downwardApi" yaml:"downwardApi"` + // EmptyDir represents a temporary directory that shares a pod's lifetime. + // + // More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir + EmptyDir *EmptyDirVolumeSource `field:"optional" json:"emptyDir" yaml:"emptyDir"` + // Ephemeral represents a volume that is handled by a cluster storage driver. + // + // The volume's lifecycle is tied to the pod that defines it - it will be created before the pod starts, and deleted when the pod is removed. + // + // Use this if: a) the volume is only needed while the pod runs, b) features of normal volumes like restoring from snapshot or capacity + // tracking are needed, + // c) the storage driver is specified through a storage class, and d) the storage driver supports dynamic volume provisioning through + // a PersistentVolumeClaim (see EphemeralVolumeSource for more + // information on the connection between this volume type + // and PersistentVolumeClaim). + // + // Use PersistentVolumeClaim or one of the vendor-specific APIs for volumes that persist for longer than the lifecycle of an individual pod. + // + // Use CSI for light-weight local ephemeral volumes if the CSI driver is meant to be used that way - see the documentation of the driver for more information. + // + // A pod can use both types of ephemeral volumes and persistent volumes at the same time. + // + // This is a beta feature and only available when the GenericEphemeralVolume feature gate is enabled. + Ephemeral *EphemeralVolumeSource `field:"optional" json:"ephemeral" yaml:"ephemeral"` + // FC represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod. + Fc *FcVolumeSource `field:"optional" json:"fc" yaml:"fc"` + // FlexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin. + FlexVolume *FlexVolumeSource `field:"optional" json:"flexVolume" yaml:"flexVolume"` + // Flocker represents a Flocker volume attached to a kubelet's host machine. + // + // This depends on the Flocker control service being running. + Flocker *FlockerVolumeSource `field:"optional" json:"flocker" yaml:"flocker"` + // GCEPersistentDisk represents a GCE Disk resource that is attached to a kubelet's host machine and then exposed to the pod. + // + // More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk + GcePersistentDisk *GcePersistentDiskVolumeSource `field:"optional" json:"gcePersistentDisk" yaml:"gcePersistentDisk"` + // GitRepo represents a git repository at a particular revision. + // + // DEPRECATED: GitRepo is deprecated. To provision a container with a git repo, mount an EmptyDir into an InitContainer that clones the repo using git, then mount the EmptyDir into the Pod's container. + GitRepo *GitRepoVolumeSource `field:"optional" json:"gitRepo" yaml:"gitRepo"` + // Glusterfs represents a Glusterfs mount on the host that shares a pod's lifetime. + // + // More info: https://examples.k8s.io/volumes/glusterfs/README.md + Glusterfs *GlusterfsVolumeSource `field:"optional" json:"glusterfs" yaml:"glusterfs"` + // HostPath represents a pre-existing file or directory on the host machine that is directly exposed to the container. + // + // This is generally used for system agents or other privileged things that are allowed to see the host machine. Most containers will NOT need this. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath + HostPath *HostPathVolumeSource `field:"optional" json:"hostPath" yaml:"hostPath"` + // ISCSI represents an ISCSI Disk resource that is attached to a kubelet's host machine and then exposed to the pod. + // + // More info: https://examples.k8s.io/volumes/iscsi/README.md + Iscsi *IscsiVolumeSource `field:"optional" json:"iscsi" yaml:"iscsi"` + // NFS represents an NFS mount on the host that shares a pod's lifetime More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs. + Nfs *NfsVolumeSource `field:"optional" json:"nfs" yaml:"nfs"` + // PersistentVolumeClaimVolumeSource represents a reference to a PersistentVolumeClaim in the same namespace. + // + // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims + PersistentVolumeClaim *PersistentVolumeClaimVolumeSource `field:"optional" json:"persistentVolumeClaim" yaml:"persistentVolumeClaim"` + // PhotonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine. + PhotonPersistentDisk *PhotonPersistentDiskVolumeSource `field:"optional" json:"photonPersistentDisk" yaml:"photonPersistentDisk"` + // PortworxVolume represents a portworx volume attached and mounted on kubelets host machine. + PortworxVolume *PortworxVolumeSource `field:"optional" json:"portworxVolume" yaml:"portworxVolume"` + // Items for all in one resources secrets, configmaps, and downward API. + Projected *ProjectedVolumeSource `field:"optional" json:"projected" yaml:"projected"` + // Quobyte represents a Quobyte mount on the host that shares a pod's lifetime. + Quobyte *QuobyteVolumeSource `field:"optional" json:"quobyte" yaml:"quobyte"` + // RBD represents a Rados Block Device mount on the host that shares a pod's lifetime. + // + // More info: https://examples.k8s.io/volumes/rbd/README.md + Rbd *RbdVolumeSource `field:"optional" json:"rbd" yaml:"rbd"` + // ScaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes. + ScaleIo *ScaleIoVolumeSource `field:"optional" json:"scaleIo" yaml:"scaleIo"` + // Secret represents a secret that should populate this volume. + // + // More info: https://kubernetes.io/docs/concepts/storage/volumes#secret + Secret *SecretVolumeSource `field:"optional" json:"secret" yaml:"secret"` + // StorageOS represents a StorageOS volume attached and mounted on Kubernetes nodes. + Storageos *StorageOsVolumeSource `field:"optional" json:"storageos" yaml:"storageos"` + // VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine. + VsphereVolume *VsphereVirtualDiskVolumeSource `field:"optional" json:"vsphereVolume" yaml:"vsphereVolume"` +} + +// VolumeAttachmentSource represents a volume that should be attached. +// +// Right now only PersistenVolumes can be attached via external attacher, in future we may allow also inline volumes in pods. Exactly one member can be set. +type VolumeAttachmentSource struct { + // inlineVolumeSpec contains all the information necessary to attach a persistent volume defined by a pod's inline VolumeSource. + // + // This field is populated only for the CSIMigration feature. It contains translated fields from a pod's inline VolumeSource to a PersistentVolumeSpec. This field is beta-level and is only honored by servers that enabled the CSIMigration feature. + InlineVolumeSpec *PersistentVolumeSpec `field:"optional" json:"inlineVolumeSpec" yaml:"inlineVolumeSpec"` + // Name of the persistent volume to attach. + PersistentVolumeName *string `field:"optional" json:"persistentVolumeName" yaml:"persistentVolumeName"` +} + +// VolumeAttachmentSource represents a volume that should be attached. +// +// Right now only PersistenVolumes can be attached via external attacher, in future we may allow also inline volumes in pods. Exactly one member can be set. +type VolumeAttachmentSourceV1Alpha1 struct { + // inlineVolumeSpec contains all the information necessary to attach a persistent volume defined by a pod's inline VolumeSource. + // + // This field is populated only for the CSIMigration feature. It contains translated fields from a pod's inline VolumeSource to a PersistentVolumeSpec. This field is alpha-level and is only honored by servers that enabled the CSIMigration feature. + InlineVolumeSpec *PersistentVolumeSpec `field:"optional" json:"inlineVolumeSpec" yaml:"inlineVolumeSpec"` + // Name of the persistent volume to attach. + PersistentVolumeName *string `field:"optional" json:"persistentVolumeName" yaml:"persistentVolumeName"` +} + +// VolumeAttachmentSpec is the specification of a VolumeAttachment request. +type VolumeAttachmentSpec struct { + // Attacher indicates the name of the volume driver that MUST handle this request. + // + // This is the name returned by GetPluginName(). + Attacher *string `field:"required" json:"attacher" yaml:"attacher"` + // The node that the volume should be attached to. + NodeName *string `field:"required" json:"nodeName" yaml:"nodeName"` + // Source represents the volume that should be attached. + Source *VolumeAttachmentSource `field:"required" json:"source" yaml:"source"` +} + +// VolumeAttachmentSpec is the specification of a VolumeAttachment request. +type VolumeAttachmentSpecV1Alpha1 struct { + // Attacher indicates the name of the volume driver that MUST handle this request. + // + // This is the name returned by GetPluginName(). + Attacher *string `field:"required" json:"attacher" yaml:"attacher"` + // The node that the volume should be attached to. + NodeName *string `field:"required" json:"nodeName" yaml:"nodeName"` + // Source represents the volume that should be attached. + Source *VolumeAttachmentSourceV1Alpha1 `field:"required" json:"source" yaml:"source"` +} + +// volumeDevice describes a mapping of a raw block device within a container. +type VolumeDevice struct { + // devicePath is the path inside of the container that the device will be mapped to. + DevicePath *string `field:"required" json:"devicePath" yaml:"devicePath"` + // name must match the name of a persistentVolumeClaim in the pod. + Name *string `field:"required" json:"name" yaml:"name"` +} + +// VolumeMount describes a mounting of a Volume within a container. +type VolumeMount struct { + // Path within the container at which the volume should be mounted. + // + // Must not contain ':'. + MountPath *string `field:"required" json:"mountPath" yaml:"mountPath"` + // This must match the Name of a Volume. + Name *string `field:"required" json:"name" yaml:"name"` + // mountPropagation determines how mounts are propagated from the host to container and the other way around. + // + // When not set, MountPropagationNone is used. This field is beta in 1.10. + MountPropagation *string `field:"optional" json:"mountPropagation" yaml:"mountPropagation"` + // Mounted read-only if true, read-write otherwise (false or unspecified). + // + // Defaults to false. + ReadOnly *bool `field:"optional" json:"readOnly" yaml:"readOnly"` + // Path within the volume from which the container's volume should be mounted. + // + // Defaults to "" (volume's root). + SubPath *string `field:"optional" json:"subPath" yaml:"subPath"` + // Expanded path within the volume from which the container's volume should be mounted. + // + // Behaves similarly to SubPath but environment variable references $(VAR_NAME) are expanded using the container's environment. Defaults to "" (volume's root). SubPathExpr and SubPath are mutually exclusive. + SubPathExpr *string `field:"optional" json:"subPathExpr" yaml:"subPathExpr"` +} + +// VolumeNodeAffinity defines constraints that limit what nodes this volume can be accessed from. +type VolumeNodeAffinity struct { + // Required specifies hard node constraints that must be met. + Required *NodeSelector `field:"optional" json:"required" yaml:"required"` +} + +// VolumeNodeResources is a set of resource limits for scheduling of volumes. +type VolumeNodeResources struct { + // Maximum number of unique volumes managed by the CSI driver that can be used on a node. + // + // A volume that is both attached and mounted on a node is considered to be used once, not twice. The same rule applies for a unique volume that is shared among multiple pods on the same node. If this field is not specified, then the supported number of volumes on this node is unbounded. + Count *float64 `field:"optional" json:"count" yaml:"count"` +} + +// Projection that may be projected along with other supported volume types. +type VolumeProjection struct { + // information about the configMap data to project. + ConfigMap *ConfigMapProjection `field:"optional" json:"configMap" yaml:"configMap"` + // information about the downwardAPI data to project. + DownwardApi *DownwardApiProjection `field:"optional" json:"downwardApi" yaml:"downwardApi"` + // information about the secret data to project. + Secret *SecretProjection `field:"optional" json:"secret" yaml:"secret"` + // information about the serviceAccountToken data to project. + ServiceAccountToken *ServiceAccountTokenProjection `field:"optional" json:"serviceAccountToken" yaml:"serviceAccountToken"` +} + +// Represents a vSphere volume resource. +type VsphereVirtualDiskVolumeSource struct { + // Path that identifies vSphere volume vmdk. + VolumePath *string `field:"required" json:"volumePath" yaml:"volumePath"` + // Filesystem type to mount. + // + // Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + FsType *string `field:"optional" json:"fsType" yaml:"fsType"` + // Storage Policy Based Management (SPBM) profile ID associated with the StoragePolicyName. + StoragePolicyId *string `field:"optional" json:"storagePolicyId" yaml:"storagePolicyId"` + // Storage Policy Based Management (SPBM) profile name. + StoragePolicyName *string `field:"optional" json:"storagePolicyName" yaml:"storagePolicyName"` +} + +// WebhookClientConfig contains the information to make a TLS connection with the webhook. +type WebhookClientConfig struct { + // `caBundle` is a PEM encoded CA bundle which will be used to validate the webhook's server certificate. + // + // If unspecified, system trust roots on the apiserver are used. + CaBundle *string `field:"optional" json:"caBundle" yaml:"caBundle"` + // `service` is a reference to the service for this webhook. Either `service` or `url` must be specified. + // + // If the webhook is running within the cluster, then you should use `service`. + Service *ServiceReference `field:"optional" json:"service" yaml:"service"` + // `url` gives the location of the webhook, in standard URL form (`scheme://host:port/path`). + // + // Exactly one of `url` or `service` must be specified. + // + // The `host` should not refer to a service running in the cluster; use the `service` field instead. The host might be resolved via external DNS in some apiservers (e.g., `kube-apiserver` cannot resolve in-cluster DNS as that would be a layering violation). `host` may also be an IP address. + // + // Please note that using `localhost` or `127.0.0.1` as a `host` is risky unless you take great care to run this webhook on all hosts which run an apiserver which might need to make calls to this webhook. Such installs are likely to be non-portable, i.e., not easy to turn up in a new cluster. + // + // The scheme must be "https"; the URL must begin with "https://". + // + // A path is optional, and if present may be any string permissible in a URL. You may use the path to pass an arbitrary string to the webhook, for example, a cluster identifier. + // + // Attempting to use a user or basic auth e.g. "user:password@" is not allowed. Fragments ("#...") and query parameters ("?...") are not allowed, either. + Url *string `field:"optional" json:"url" yaml:"url"` +} + +// WebhookConversion describes how to call a conversion webhook. +type WebhookConversion struct { + // conversionReviewVersions is an ordered list of preferred `ConversionReview` versions the Webhook expects. + // + // The API server will use the first version in the list which it supports. If none of the versions specified in this list are supported by API server, conversion will fail for the custom resource. If a persisted Webhook configuration specifies allowed versions and does not include any versions known to the API Server, calls to the webhook will fail. + ConversionReviewVersions *[]*string `field:"required" json:"conversionReviewVersions" yaml:"conversionReviewVersions"` + // clientConfig is the instructions for how to call the webhook if strategy is `Webhook`. + ClientConfig *WebhookClientConfig `field:"optional" json:"clientConfig" yaml:"clientConfig"` +} + +// The weights of all of the matched WeightedPodAffinityTerm fields are added per-node to find the most preferred node(s). +type WeightedPodAffinityTerm struct { + // Required. + // + // A pod affinity term, associated with the corresponding weight. + PodAffinityTerm *PodAffinityTerm `field:"required" json:"podAffinityTerm" yaml:"podAffinityTerm"` + // weight associated with matching the corresponding podAffinityTerm, in the range 1-100. + Weight *float64 `field:"required" json:"weight" yaml:"weight"` +} + +// WindowsSecurityContextOptions contain Windows-specific options and credentials. +type WindowsSecurityContextOptions struct { + // GMSACredentialSpec is where the GMSA admission webhook (https://github.com/kubernetes-sigs/windows-gmsa) inlines the contents of the GMSA credential spec named by the GMSACredentialSpecName field. + GmsaCredentialSpec *string `field:"optional" json:"gmsaCredentialSpec" yaml:"gmsaCredentialSpec"` + // GMSACredentialSpecName is the name of the GMSA credential spec to use. + GmsaCredentialSpecName *string `field:"optional" json:"gmsaCredentialSpecName" yaml:"gmsaCredentialSpecName"` + // HostProcess determines if a container should be run as a 'Host Process' container. + // + // This field is alpha-level and will only be honored by components that enable the WindowsHostProcessContainers feature flag. Setting this field without the feature flag will result in errors when validating the Pod. All of a Pod's containers must have the same effective HostProcess value (it is not allowed to have a mix of HostProcess containers and non-HostProcess containers). In addition, if HostProcess is true then HostNetwork must also be set to true. + HostProcess *bool `field:"optional" json:"hostProcess" yaml:"hostProcess"` + // The UserName in Windows to run the entrypoint of the container process. + // + // Defaults to the user specified in image metadata if unspecified. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. + RunAsUserName *string `field:"optional" json:"runAsUserName" yaml:"runAsUserName"` +} diff --git a/env/imports/k8s/k8s.init.go b/env/imports/k8s/k8s.init.go new file mode 100644 index 000000000..c8e38bf01 --- /dev/null +++ b/env/imports/k8s/k8s.init.go @@ -0,0 +1,4797 @@ +package k8s + +import ( + "reflect" + + _jsii_ "github.com/aws/jsii-runtime-go/runtime" +) + +func init() { + _jsii_.RegisterStruct( + "k8s.Affinity", + reflect.TypeOf((*Affinity)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.AggregationRule", + reflect.TypeOf((*AggregationRule)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.AggregationRuleV1Alpha1", + reflect.TypeOf((*AggregationRuleV1Alpha1)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.AllowedCsiDriverV1Beta1", + reflect.TypeOf((*AllowedCsiDriverV1Beta1)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.AllowedFlexVolumeV1Beta1", + reflect.TypeOf((*AllowedFlexVolumeV1Beta1)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.AllowedHostPathV1Beta1", + reflect.TypeOf((*AllowedHostPathV1Beta1)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.ApiServiceSpec", + reflect.TypeOf((*ApiServiceSpec)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.AwsElasticBlockStoreVolumeSource", + reflect.TypeOf((*AwsElasticBlockStoreVolumeSource)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.AzureDiskVolumeSource", + reflect.TypeOf((*AzureDiskVolumeSource)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.AzureFilePersistentVolumeSource", + reflect.TypeOf((*AzureFilePersistentVolumeSource)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.AzureFileVolumeSource", + reflect.TypeOf((*AzureFileVolumeSource)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.BoundObjectReference", + reflect.TypeOf((*BoundObjectReference)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.Capabilities", + reflect.TypeOf((*Capabilities)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.CephFsPersistentVolumeSource", + reflect.TypeOf((*CephFsPersistentVolumeSource)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.CephFsVolumeSource", + reflect.TypeOf((*CephFsVolumeSource)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.CertificateSigningRequestSpec", + reflect.TypeOf((*CertificateSigningRequestSpec)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.CinderPersistentVolumeSource", + reflect.TypeOf((*CinderPersistentVolumeSource)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.CinderVolumeSource", + reflect.TypeOf((*CinderVolumeSource)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.ClientIpConfig", + reflect.TypeOf((*ClientIpConfig)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.ComponentCondition", + reflect.TypeOf((*ComponentCondition)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.ConfigMapEnvSource", + reflect.TypeOf((*ConfigMapEnvSource)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.ConfigMapKeySelector", + reflect.TypeOf((*ConfigMapKeySelector)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.ConfigMapNodeConfigSource", + reflect.TypeOf((*ConfigMapNodeConfigSource)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.ConfigMapProjection", + reflect.TypeOf((*ConfigMapProjection)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.ConfigMapVolumeSource", + reflect.TypeOf((*ConfigMapVolumeSource)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.Container", + reflect.TypeOf((*Container)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.ContainerPort", + reflect.TypeOf((*ContainerPort)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.ContainerResourceMetricSourceV2Beta1", + reflect.TypeOf((*ContainerResourceMetricSourceV2Beta1)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.ContainerResourceMetricSourceV2Beta2", + reflect.TypeOf((*ContainerResourceMetricSourceV2Beta2)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.CronJobSpec", + reflect.TypeOf((*CronJobSpec)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.CronJobSpecV1Beta1", + reflect.TypeOf((*CronJobSpecV1Beta1)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.CrossVersionObjectReference", + reflect.TypeOf((*CrossVersionObjectReference)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.CrossVersionObjectReferenceV2Beta1", + reflect.TypeOf((*CrossVersionObjectReferenceV2Beta1)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.CrossVersionObjectReferenceV2Beta2", + reflect.TypeOf((*CrossVersionObjectReferenceV2Beta2)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.CsiDriverSpec", + reflect.TypeOf((*CsiDriverSpec)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.CsiNodeDriver", + reflect.TypeOf((*CsiNodeDriver)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.CsiNodeSpec", + reflect.TypeOf((*CsiNodeSpec)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.CsiPersistentVolumeSource", + reflect.TypeOf((*CsiPersistentVolumeSource)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.CsiVolumeSource", + reflect.TypeOf((*CsiVolumeSource)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.CustomResourceColumnDefinition", + reflect.TypeOf((*CustomResourceColumnDefinition)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.CustomResourceConversion", + reflect.TypeOf((*CustomResourceConversion)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.CustomResourceDefinitionNames", + reflect.TypeOf((*CustomResourceDefinitionNames)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.CustomResourceDefinitionSpec", + reflect.TypeOf((*CustomResourceDefinitionSpec)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.CustomResourceDefinitionVersion", + reflect.TypeOf((*CustomResourceDefinitionVersion)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.CustomResourceSubresourceScale", + reflect.TypeOf((*CustomResourceSubresourceScale)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.CustomResourceSubresources", + reflect.TypeOf((*CustomResourceSubresources)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.CustomResourceValidation", + reflect.TypeOf((*CustomResourceValidation)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.DaemonSetSpec", + reflect.TypeOf((*DaemonSetSpec)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.DaemonSetUpdateStrategy", + reflect.TypeOf((*DaemonSetUpdateStrategy)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.DeleteOptions", + reflect.TypeOf((*DeleteOptions)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.DeploymentSpec", + reflect.TypeOf((*DeploymentSpec)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.DeploymentStrategy", + reflect.TypeOf((*DeploymentStrategy)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.DownwardApiProjection", + reflect.TypeOf((*DownwardApiProjection)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.DownwardApiVolumeFile", + reflect.TypeOf((*DownwardApiVolumeFile)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.DownwardApiVolumeSource", + reflect.TypeOf((*DownwardApiVolumeSource)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.EmptyDirVolumeSource", + reflect.TypeOf((*EmptyDirVolumeSource)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.Endpoint", + reflect.TypeOf((*Endpoint)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.EndpointAddress", + reflect.TypeOf((*EndpointAddress)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.EndpointConditions", + reflect.TypeOf((*EndpointConditions)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.EndpointConditionsV1Beta1", + reflect.TypeOf((*EndpointConditionsV1Beta1)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.EndpointHints", + reflect.TypeOf((*EndpointHints)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.EndpointHintsV1Beta1", + reflect.TypeOf((*EndpointHintsV1Beta1)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.EndpointPort", + reflect.TypeOf((*EndpointPort)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.EndpointPortV1Beta1", + reflect.TypeOf((*EndpointPortV1Beta1)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.EndpointSubset", + reflect.TypeOf((*EndpointSubset)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.EndpointV1Beta1", + reflect.TypeOf((*EndpointV1Beta1)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.EnvFromSource", + reflect.TypeOf((*EnvFromSource)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.EnvVar", + reflect.TypeOf((*EnvVar)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.EnvVarSource", + reflect.TypeOf((*EnvVarSource)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.EphemeralContainer", + reflect.TypeOf((*EphemeralContainer)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.EphemeralVolumeSource", + reflect.TypeOf((*EphemeralVolumeSource)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.EventSeries", + reflect.TypeOf((*EventSeries)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.EventSeriesV1Beta1", + reflect.TypeOf((*EventSeriesV1Beta1)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.EventSource", + reflect.TypeOf((*EventSource)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.ExecAction", + reflect.TypeOf((*ExecAction)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.ExternalDocumentation", + reflect.TypeOf((*ExternalDocumentation)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.ExternalMetricSourceV2Beta1", + reflect.TypeOf((*ExternalMetricSourceV2Beta1)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.ExternalMetricSourceV2Beta2", + reflect.TypeOf((*ExternalMetricSourceV2Beta2)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.FcVolumeSource", + reflect.TypeOf((*FcVolumeSource)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.FlexPersistentVolumeSource", + reflect.TypeOf((*FlexPersistentVolumeSource)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.FlexVolumeSource", + reflect.TypeOf((*FlexVolumeSource)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.FlockerVolumeSource", + reflect.TypeOf((*FlockerVolumeSource)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.FlowDistinguisherMethodV1Beta1", + reflect.TypeOf((*FlowDistinguisherMethodV1Beta1)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.FlowSchemaSpecV1Beta1", + reflect.TypeOf((*FlowSchemaSpecV1Beta1)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.ForZone", + reflect.TypeOf((*ForZone)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.ForZoneV1Beta1", + reflect.TypeOf((*ForZoneV1Beta1)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.FsGroupStrategyOptionsV1Beta1", + reflect.TypeOf((*FsGroupStrategyOptionsV1Beta1)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.GcePersistentDiskVolumeSource", + reflect.TypeOf((*GcePersistentDiskVolumeSource)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.GitRepoVolumeSource", + reflect.TypeOf((*GitRepoVolumeSource)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.GlusterfsPersistentVolumeSource", + reflect.TypeOf((*GlusterfsPersistentVolumeSource)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.GlusterfsVolumeSource", + reflect.TypeOf((*GlusterfsVolumeSource)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.GroupSubjectV1Beta1", + reflect.TypeOf((*GroupSubjectV1Beta1)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.Handler", + reflect.TypeOf((*Handler)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.HorizontalPodAutoscalerBehaviorV2Beta2", + reflect.TypeOf((*HorizontalPodAutoscalerBehaviorV2Beta2)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.HorizontalPodAutoscalerSpec", + reflect.TypeOf((*HorizontalPodAutoscalerSpec)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.HorizontalPodAutoscalerSpecV2Beta1", + reflect.TypeOf((*HorizontalPodAutoscalerSpecV2Beta1)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.HorizontalPodAutoscalerSpecV2Beta2", + reflect.TypeOf((*HorizontalPodAutoscalerSpecV2Beta2)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.HostAlias", + reflect.TypeOf((*HostAlias)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.HostPathVolumeSource", + reflect.TypeOf((*HostPathVolumeSource)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.HostPortRangeV1Beta1", + reflect.TypeOf((*HostPortRangeV1Beta1)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.HpaScalingPolicyV2Beta2", + reflect.TypeOf((*HpaScalingPolicyV2Beta2)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.HpaScalingRulesV2Beta2", + reflect.TypeOf((*HpaScalingRulesV2Beta2)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.HttpGetAction", + reflect.TypeOf((*HttpGetAction)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.HttpHeader", + reflect.TypeOf((*HttpHeader)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.HttpIngressPath", + reflect.TypeOf((*HttpIngressPath)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.HttpIngressRuleValue", + reflect.TypeOf((*HttpIngressRuleValue)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.IdRangeV1Beta1", + reflect.TypeOf((*IdRangeV1Beta1)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.IngressBackend", + reflect.TypeOf((*IngressBackend)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.IngressClassParametersReference", + reflect.TypeOf((*IngressClassParametersReference)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.IngressClassSpec", + reflect.TypeOf((*IngressClassSpec)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.IngressRule", + reflect.TypeOf((*IngressRule)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.IngressServiceBackend", + reflect.TypeOf((*IngressServiceBackend)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.IngressSpec", + reflect.TypeOf((*IngressSpec)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.IngressTls", + reflect.TypeOf((*IngressTls)(nil)).Elem(), + ) + _jsii_.RegisterClass( + "k8s.IntOrString", + reflect.TypeOf((*IntOrString)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberProperty{JsiiProperty: "value", GoGetter: "Value"}, + }, + func() interface{} { + return &jsiiProxy_IntOrString{} + }, + ) + _jsii_.RegisterEnum( + "k8s.IoK8SApimachineryPkgApisMetaV1DeleteOptionsKind", + reflect.TypeOf((*IoK8SApimachineryPkgApisMetaV1DeleteOptionsKind)(nil)).Elem(), + map[string]interface{}{ + "DELETE_OPTIONS": IoK8SApimachineryPkgApisMetaV1DeleteOptionsKind_DELETE_OPTIONS, + }, + ) + _jsii_.RegisterStruct( + "k8s.IpBlock", + reflect.TypeOf((*IpBlock)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.IscsiPersistentVolumeSource", + reflect.TypeOf((*IscsiPersistentVolumeSource)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.IscsiVolumeSource", + reflect.TypeOf((*IscsiVolumeSource)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.JobSpec", + reflect.TypeOf((*JobSpec)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.JobTemplateSpec", + reflect.TypeOf((*JobTemplateSpec)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.JobTemplateSpecV1Beta1", + reflect.TypeOf((*JobTemplateSpecV1Beta1)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.JsonSchemaProps", + reflect.TypeOf((*JsonSchemaProps)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.KeyToPath", + reflect.TypeOf((*KeyToPath)(nil)).Elem(), + ) + _jsii_.RegisterClass( + "k8s.KubeApiService", + reflect.TypeOf((*KubeApiService)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "addDependency", GoMethod: "AddDependency"}, + _jsii_.MemberMethod{JsiiMethod: "addJsonPatch", GoMethod: "AddJsonPatch"}, + _jsii_.MemberProperty{JsiiProperty: "apiGroup", GoGetter: "ApiGroup"}, + _jsii_.MemberProperty{JsiiProperty: "apiVersion", GoGetter: "ApiVersion"}, + _jsii_.MemberProperty{JsiiProperty: "chart", GoGetter: "AddHelm"}, + _jsii_.MemberProperty{JsiiProperty: "kind", GoGetter: "Kind"}, + _jsii_.MemberProperty{JsiiProperty: "metadata", GoGetter: "Metadata"}, + _jsii_.MemberProperty{JsiiProperty: "name", GoGetter: "Name"}, + _jsii_.MemberProperty{JsiiProperty: "node", GoGetter: "Node"}, + _jsii_.MemberMethod{JsiiMethod: "toJson", GoMethod: "ToJson"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + }, + func() interface{} { + j := jsiiProxy_KubeApiService{} + _jsii_.InitJsiiProxy(&j.Type__cdk8sApiObject) + return &j + }, + ) + _jsii_.RegisterClass( + "k8s.KubeApiServiceList", + reflect.TypeOf((*KubeApiServiceList)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "addDependency", GoMethod: "AddDependency"}, + _jsii_.MemberMethod{JsiiMethod: "addJsonPatch", GoMethod: "AddJsonPatch"}, + _jsii_.MemberProperty{JsiiProperty: "apiGroup", GoGetter: "ApiGroup"}, + _jsii_.MemberProperty{JsiiProperty: "apiVersion", GoGetter: "ApiVersion"}, + _jsii_.MemberProperty{JsiiProperty: "chart", GoGetter: "AddHelm"}, + _jsii_.MemberProperty{JsiiProperty: "kind", GoGetter: "Kind"}, + _jsii_.MemberProperty{JsiiProperty: "metadata", GoGetter: "Metadata"}, + _jsii_.MemberProperty{JsiiProperty: "name", GoGetter: "Name"}, + _jsii_.MemberProperty{JsiiProperty: "node", GoGetter: "Node"}, + _jsii_.MemberMethod{JsiiMethod: "toJson", GoMethod: "ToJson"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + }, + func() interface{} { + j := jsiiProxy_KubeApiServiceList{} + _jsii_.InitJsiiProxy(&j.Type__cdk8sApiObject) + return &j + }, + ) + _jsii_.RegisterStruct( + "k8s.KubeApiServiceListProps", + reflect.TypeOf((*KubeApiServiceListProps)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.KubeApiServiceProps", + reflect.TypeOf((*KubeApiServiceProps)(nil)).Elem(), + ) + _jsii_.RegisterClass( + "k8s.KubeBinding", + reflect.TypeOf((*KubeBinding)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "addDependency", GoMethod: "AddDependency"}, + _jsii_.MemberMethod{JsiiMethod: "addJsonPatch", GoMethod: "AddJsonPatch"}, + _jsii_.MemberProperty{JsiiProperty: "apiGroup", GoGetter: "ApiGroup"}, + _jsii_.MemberProperty{JsiiProperty: "apiVersion", GoGetter: "ApiVersion"}, + _jsii_.MemberProperty{JsiiProperty: "chart", GoGetter: "AddHelm"}, + _jsii_.MemberProperty{JsiiProperty: "kind", GoGetter: "Kind"}, + _jsii_.MemberProperty{JsiiProperty: "metadata", GoGetter: "Metadata"}, + _jsii_.MemberProperty{JsiiProperty: "name", GoGetter: "Name"}, + _jsii_.MemberProperty{JsiiProperty: "node", GoGetter: "Node"}, + _jsii_.MemberMethod{JsiiMethod: "toJson", GoMethod: "ToJson"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + }, + func() interface{} { + j := jsiiProxy_KubeBinding{} + _jsii_.InitJsiiProxy(&j.Type__cdk8sApiObject) + return &j + }, + ) + _jsii_.RegisterStruct( + "k8s.KubeBindingProps", + reflect.TypeOf((*KubeBindingProps)(nil)).Elem(), + ) + _jsii_.RegisterClass( + "k8s.KubeCertificateSigningRequest", + reflect.TypeOf((*KubeCertificateSigningRequest)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "addDependency", GoMethod: "AddDependency"}, + _jsii_.MemberMethod{JsiiMethod: "addJsonPatch", GoMethod: "AddJsonPatch"}, + _jsii_.MemberProperty{JsiiProperty: "apiGroup", GoGetter: "ApiGroup"}, + _jsii_.MemberProperty{JsiiProperty: "apiVersion", GoGetter: "ApiVersion"}, + _jsii_.MemberProperty{JsiiProperty: "chart", GoGetter: "AddHelm"}, + _jsii_.MemberProperty{JsiiProperty: "kind", GoGetter: "Kind"}, + _jsii_.MemberProperty{JsiiProperty: "metadata", GoGetter: "Metadata"}, + _jsii_.MemberProperty{JsiiProperty: "name", GoGetter: "Name"}, + _jsii_.MemberProperty{JsiiProperty: "node", GoGetter: "Node"}, + _jsii_.MemberMethod{JsiiMethod: "toJson", GoMethod: "ToJson"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + }, + func() interface{} { + j := jsiiProxy_KubeCertificateSigningRequest{} + _jsii_.InitJsiiProxy(&j.Type__cdk8sApiObject) + return &j + }, + ) + _jsii_.RegisterClass( + "k8s.KubeCertificateSigningRequestList", + reflect.TypeOf((*KubeCertificateSigningRequestList)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "addDependency", GoMethod: "AddDependency"}, + _jsii_.MemberMethod{JsiiMethod: "addJsonPatch", GoMethod: "AddJsonPatch"}, + _jsii_.MemberProperty{JsiiProperty: "apiGroup", GoGetter: "ApiGroup"}, + _jsii_.MemberProperty{JsiiProperty: "apiVersion", GoGetter: "ApiVersion"}, + _jsii_.MemberProperty{JsiiProperty: "chart", GoGetter: "AddHelm"}, + _jsii_.MemberProperty{JsiiProperty: "kind", GoGetter: "Kind"}, + _jsii_.MemberProperty{JsiiProperty: "metadata", GoGetter: "Metadata"}, + _jsii_.MemberProperty{JsiiProperty: "name", GoGetter: "Name"}, + _jsii_.MemberProperty{JsiiProperty: "node", GoGetter: "Node"}, + _jsii_.MemberMethod{JsiiMethod: "toJson", GoMethod: "ToJson"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + }, + func() interface{} { + j := jsiiProxy_KubeCertificateSigningRequestList{} + _jsii_.InitJsiiProxy(&j.Type__cdk8sApiObject) + return &j + }, + ) + _jsii_.RegisterStruct( + "k8s.KubeCertificateSigningRequestListProps", + reflect.TypeOf((*KubeCertificateSigningRequestListProps)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.KubeCertificateSigningRequestProps", + reflect.TypeOf((*KubeCertificateSigningRequestProps)(nil)).Elem(), + ) + _jsii_.RegisterClass( + "k8s.KubeClusterRole", + reflect.TypeOf((*KubeClusterRole)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "addDependency", GoMethod: "AddDependency"}, + _jsii_.MemberMethod{JsiiMethod: "addJsonPatch", GoMethod: "AddJsonPatch"}, + _jsii_.MemberProperty{JsiiProperty: "apiGroup", GoGetter: "ApiGroup"}, + _jsii_.MemberProperty{JsiiProperty: "apiVersion", GoGetter: "ApiVersion"}, + _jsii_.MemberProperty{JsiiProperty: "chart", GoGetter: "AddHelm"}, + _jsii_.MemberProperty{JsiiProperty: "kind", GoGetter: "Kind"}, + _jsii_.MemberProperty{JsiiProperty: "metadata", GoGetter: "Metadata"}, + _jsii_.MemberProperty{JsiiProperty: "name", GoGetter: "Name"}, + _jsii_.MemberProperty{JsiiProperty: "node", GoGetter: "Node"}, + _jsii_.MemberMethod{JsiiMethod: "toJson", GoMethod: "ToJson"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + }, + func() interface{} { + j := jsiiProxy_KubeClusterRole{} + _jsii_.InitJsiiProxy(&j.Type__cdk8sApiObject) + return &j + }, + ) + _jsii_.RegisterClass( + "k8s.KubeClusterRoleBinding", + reflect.TypeOf((*KubeClusterRoleBinding)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "addDependency", GoMethod: "AddDependency"}, + _jsii_.MemberMethod{JsiiMethod: "addJsonPatch", GoMethod: "AddJsonPatch"}, + _jsii_.MemberProperty{JsiiProperty: "apiGroup", GoGetter: "ApiGroup"}, + _jsii_.MemberProperty{JsiiProperty: "apiVersion", GoGetter: "ApiVersion"}, + _jsii_.MemberProperty{JsiiProperty: "chart", GoGetter: "AddHelm"}, + _jsii_.MemberProperty{JsiiProperty: "kind", GoGetter: "Kind"}, + _jsii_.MemberProperty{JsiiProperty: "metadata", GoGetter: "Metadata"}, + _jsii_.MemberProperty{JsiiProperty: "name", GoGetter: "Name"}, + _jsii_.MemberProperty{JsiiProperty: "node", GoGetter: "Node"}, + _jsii_.MemberMethod{JsiiMethod: "toJson", GoMethod: "ToJson"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + }, + func() interface{} { + j := jsiiProxy_KubeClusterRoleBinding{} + _jsii_.InitJsiiProxy(&j.Type__cdk8sApiObject) + return &j + }, + ) + _jsii_.RegisterClass( + "k8s.KubeClusterRoleBindingList", + reflect.TypeOf((*KubeClusterRoleBindingList)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "addDependency", GoMethod: "AddDependency"}, + _jsii_.MemberMethod{JsiiMethod: "addJsonPatch", GoMethod: "AddJsonPatch"}, + _jsii_.MemberProperty{JsiiProperty: "apiGroup", GoGetter: "ApiGroup"}, + _jsii_.MemberProperty{JsiiProperty: "apiVersion", GoGetter: "ApiVersion"}, + _jsii_.MemberProperty{JsiiProperty: "chart", GoGetter: "AddHelm"}, + _jsii_.MemberProperty{JsiiProperty: "kind", GoGetter: "Kind"}, + _jsii_.MemberProperty{JsiiProperty: "metadata", GoGetter: "Metadata"}, + _jsii_.MemberProperty{JsiiProperty: "name", GoGetter: "Name"}, + _jsii_.MemberProperty{JsiiProperty: "node", GoGetter: "Node"}, + _jsii_.MemberMethod{JsiiMethod: "toJson", GoMethod: "ToJson"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + }, + func() interface{} { + j := jsiiProxy_KubeClusterRoleBindingList{} + _jsii_.InitJsiiProxy(&j.Type__cdk8sApiObject) + return &j + }, + ) + _jsii_.RegisterStruct( + "k8s.KubeClusterRoleBindingListProps", + reflect.TypeOf((*KubeClusterRoleBindingListProps)(nil)).Elem(), + ) + _jsii_.RegisterClass( + "k8s.KubeClusterRoleBindingListV1Alpha1", + reflect.TypeOf((*KubeClusterRoleBindingListV1Alpha1)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "addDependency", GoMethod: "AddDependency"}, + _jsii_.MemberMethod{JsiiMethod: "addJsonPatch", GoMethod: "AddJsonPatch"}, + _jsii_.MemberProperty{JsiiProperty: "apiGroup", GoGetter: "ApiGroup"}, + _jsii_.MemberProperty{JsiiProperty: "apiVersion", GoGetter: "ApiVersion"}, + _jsii_.MemberProperty{JsiiProperty: "chart", GoGetter: "AddHelm"}, + _jsii_.MemberProperty{JsiiProperty: "kind", GoGetter: "Kind"}, + _jsii_.MemberProperty{JsiiProperty: "metadata", GoGetter: "Metadata"}, + _jsii_.MemberProperty{JsiiProperty: "name", GoGetter: "Name"}, + _jsii_.MemberProperty{JsiiProperty: "node", GoGetter: "Node"}, + _jsii_.MemberMethod{JsiiMethod: "toJson", GoMethod: "ToJson"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + }, + func() interface{} { + j := jsiiProxy_KubeClusterRoleBindingListV1Alpha1{} + _jsii_.InitJsiiProxy(&j.Type__cdk8sApiObject) + return &j + }, + ) + _jsii_.RegisterStruct( + "k8s.KubeClusterRoleBindingListV1Alpha1Props", + reflect.TypeOf((*KubeClusterRoleBindingListV1Alpha1Props)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.KubeClusterRoleBindingProps", + reflect.TypeOf((*KubeClusterRoleBindingProps)(nil)).Elem(), + ) + _jsii_.RegisterClass( + "k8s.KubeClusterRoleBindingV1Alpha1", + reflect.TypeOf((*KubeClusterRoleBindingV1Alpha1)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "addDependency", GoMethod: "AddDependency"}, + _jsii_.MemberMethod{JsiiMethod: "addJsonPatch", GoMethod: "AddJsonPatch"}, + _jsii_.MemberProperty{JsiiProperty: "apiGroup", GoGetter: "ApiGroup"}, + _jsii_.MemberProperty{JsiiProperty: "apiVersion", GoGetter: "ApiVersion"}, + _jsii_.MemberProperty{JsiiProperty: "chart", GoGetter: "AddHelm"}, + _jsii_.MemberProperty{JsiiProperty: "kind", GoGetter: "Kind"}, + _jsii_.MemberProperty{JsiiProperty: "metadata", GoGetter: "Metadata"}, + _jsii_.MemberProperty{JsiiProperty: "name", GoGetter: "Name"}, + _jsii_.MemberProperty{JsiiProperty: "node", GoGetter: "Node"}, + _jsii_.MemberMethod{JsiiMethod: "toJson", GoMethod: "ToJson"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + }, + func() interface{} { + j := jsiiProxy_KubeClusterRoleBindingV1Alpha1{} + _jsii_.InitJsiiProxy(&j.Type__cdk8sApiObject) + return &j + }, + ) + _jsii_.RegisterStruct( + "k8s.KubeClusterRoleBindingV1Alpha1Props", + reflect.TypeOf((*KubeClusterRoleBindingV1Alpha1Props)(nil)).Elem(), + ) + _jsii_.RegisterClass( + "k8s.KubeClusterRoleList", + reflect.TypeOf((*KubeClusterRoleList)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "addDependency", GoMethod: "AddDependency"}, + _jsii_.MemberMethod{JsiiMethod: "addJsonPatch", GoMethod: "AddJsonPatch"}, + _jsii_.MemberProperty{JsiiProperty: "apiGroup", GoGetter: "ApiGroup"}, + _jsii_.MemberProperty{JsiiProperty: "apiVersion", GoGetter: "ApiVersion"}, + _jsii_.MemberProperty{JsiiProperty: "chart", GoGetter: "AddHelm"}, + _jsii_.MemberProperty{JsiiProperty: "kind", GoGetter: "Kind"}, + _jsii_.MemberProperty{JsiiProperty: "metadata", GoGetter: "Metadata"}, + _jsii_.MemberProperty{JsiiProperty: "name", GoGetter: "Name"}, + _jsii_.MemberProperty{JsiiProperty: "node", GoGetter: "Node"}, + _jsii_.MemberMethod{JsiiMethod: "toJson", GoMethod: "ToJson"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + }, + func() interface{} { + j := jsiiProxy_KubeClusterRoleList{} + _jsii_.InitJsiiProxy(&j.Type__cdk8sApiObject) + return &j + }, + ) + _jsii_.RegisterStruct( + "k8s.KubeClusterRoleListProps", + reflect.TypeOf((*KubeClusterRoleListProps)(nil)).Elem(), + ) + _jsii_.RegisterClass( + "k8s.KubeClusterRoleListV1Alpha1", + reflect.TypeOf((*KubeClusterRoleListV1Alpha1)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "addDependency", GoMethod: "AddDependency"}, + _jsii_.MemberMethod{JsiiMethod: "addJsonPatch", GoMethod: "AddJsonPatch"}, + _jsii_.MemberProperty{JsiiProperty: "apiGroup", GoGetter: "ApiGroup"}, + _jsii_.MemberProperty{JsiiProperty: "apiVersion", GoGetter: "ApiVersion"}, + _jsii_.MemberProperty{JsiiProperty: "chart", GoGetter: "AddHelm"}, + _jsii_.MemberProperty{JsiiProperty: "kind", GoGetter: "Kind"}, + _jsii_.MemberProperty{JsiiProperty: "metadata", GoGetter: "Metadata"}, + _jsii_.MemberProperty{JsiiProperty: "name", GoGetter: "Name"}, + _jsii_.MemberProperty{JsiiProperty: "node", GoGetter: "Node"}, + _jsii_.MemberMethod{JsiiMethod: "toJson", GoMethod: "ToJson"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + }, + func() interface{} { + j := jsiiProxy_KubeClusterRoleListV1Alpha1{} + _jsii_.InitJsiiProxy(&j.Type__cdk8sApiObject) + return &j + }, + ) + _jsii_.RegisterStruct( + "k8s.KubeClusterRoleListV1Alpha1Props", + reflect.TypeOf((*KubeClusterRoleListV1Alpha1Props)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.KubeClusterRoleProps", + reflect.TypeOf((*KubeClusterRoleProps)(nil)).Elem(), + ) + _jsii_.RegisterClass( + "k8s.KubeClusterRoleV1Alpha1", + reflect.TypeOf((*KubeClusterRoleV1Alpha1)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "addDependency", GoMethod: "AddDependency"}, + _jsii_.MemberMethod{JsiiMethod: "addJsonPatch", GoMethod: "AddJsonPatch"}, + _jsii_.MemberProperty{JsiiProperty: "apiGroup", GoGetter: "ApiGroup"}, + _jsii_.MemberProperty{JsiiProperty: "apiVersion", GoGetter: "ApiVersion"}, + _jsii_.MemberProperty{JsiiProperty: "chart", GoGetter: "AddHelm"}, + _jsii_.MemberProperty{JsiiProperty: "kind", GoGetter: "Kind"}, + _jsii_.MemberProperty{JsiiProperty: "metadata", GoGetter: "Metadata"}, + _jsii_.MemberProperty{JsiiProperty: "name", GoGetter: "Name"}, + _jsii_.MemberProperty{JsiiProperty: "node", GoGetter: "Node"}, + _jsii_.MemberMethod{JsiiMethod: "toJson", GoMethod: "ToJson"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + }, + func() interface{} { + j := jsiiProxy_KubeClusterRoleV1Alpha1{} + _jsii_.InitJsiiProxy(&j.Type__cdk8sApiObject) + return &j + }, + ) + _jsii_.RegisterStruct( + "k8s.KubeClusterRoleV1Alpha1Props", + reflect.TypeOf((*KubeClusterRoleV1Alpha1Props)(nil)).Elem(), + ) + _jsii_.RegisterClass( + "k8s.KubeComponentStatus", + reflect.TypeOf((*KubeComponentStatus)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "addDependency", GoMethod: "AddDependency"}, + _jsii_.MemberMethod{JsiiMethod: "addJsonPatch", GoMethod: "AddJsonPatch"}, + _jsii_.MemberProperty{JsiiProperty: "apiGroup", GoGetter: "ApiGroup"}, + _jsii_.MemberProperty{JsiiProperty: "apiVersion", GoGetter: "ApiVersion"}, + _jsii_.MemberProperty{JsiiProperty: "chart", GoGetter: "AddHelm"}, + _jsii_.MemberProperty{JsiiProperty: "kind", GoGetter: "Kind"}, + _jsii_.MemberProperty{JsiiProperty: "metadata", GoGetter: "Metadata"}, + _jsii_.MemberProperty{JsiiProperty: "name", GoGetter: "Name"}, + _jsii_.MemberProperty{JsiiProperty: "node", GoGetter: "Node"}, + _jsii_.MemberMethod{JsiiMethod: "toJson", GoMethod: "ToJson"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + }, + func() interface{} { + j := jsiiProxy_KubeComponentStatus{} + _jsii_.InitJsiiProxy(&j.Type__cdk8sApiObject) + return &j + }, + ) + _jsii_.RegisterClass( + "k8s.KubeComponentStatusList", + reflect.TypeOf((*KubeComponentStatusList)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "addDependency", GoMethod: "AddDependency"}, + _jsii_.MemberMethod{JsiiMethod: "addJsonPatch", GoMethod: "AddJsonPatch"}, + _jsii_.MemberProperty{JsiiProperty: "apiGroup", GoGetter: "ApiGroup"}, + _jsii_.MemberProperty{JsiiProperty: "apiVersion", GoGetter: "ApiVersion"}, + _jsii_.MemberProperty{JsiiProperty: "chart", GoGetter: "AddHelm"}, + _jsii_.MemberProperty{JsiiProperty: "kind", GoGetter: "Kind"}, + _jsii_.MemberProperty{JsiiProperty: "metadata", GoGetter: "Metadata"}, + _jsii_.MemberProperty{JsiiProperty: "name", GoGetter: "Name"}, + _jsii_.MemberProperty{JsiiProperty: "node", GoGetter: "Node"}, + _jsii_.MemberMethod{JsiiMethod: "toJson", GoMethod: "ToJson"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + }, + func() interface{} { + j := jsiiProxy_KubeComponentStatusList{} + _jsii_.InitJsiiProxy(&j.Type__cdk8sApiObject) + return &j + }, + ) + _jsii_.RegisterStruct( + "k8s.KubeComponentStatusListProps", + reflect.TypeOf((*KubeComponentStatusListProps)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.KubeComponentStatusProps", + reflect.TypeOf((*KubeComponentStatusProps)(nil)).Elem(), + ) + _jsii_.RegisterClass( + "k8s.KubeConfigMap", + reflect.TypeOf((*KubeConfigMap)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "addDependency", GoMethod: "AddDependency"}, + _jsii_.MemberMethod{JsiiMethod: "addJsonPatch", GoMethod: "AddJsonPatch"}, + _jsii_.MemberProperty{JsiiProperty: "apiGroup", GoGetter: "ApiGroup"}, + _jsii_.MemberProperty{JsiiProperty: "apiVersion", GoGetter: "ApiVersion"}, + _jsii_.MemberProperty{JsiiProperty: "chart", GoGetter: "AddHelm"}, + _jsii_.MemberProperty{JsiiProperty: "kind", GoGetter: "Kind"}, + _jsii_.MemberProperty{JsiiProperty: "metadata", GoGetter: "Metadata"}, + _jsii_.MemberProperty{JsiiProperty: "name", GoGetter: "Name"}, + _jsii_.MemberProperty{JsiiProperty: "node", GoGetter: "Node"}, + _jsii_.MemberMethod{JsiiMethod: "toJson", GoMethod: "ToJson"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + }, + func() interface{} { + j := jsiiProxy_KubeConfigMap{} + _jsii_.InitJsiiProxy(&j.Type__cdk8sApiObject) + return &j + }, + ) + _jsii_.RegisterClass( + "k8s.KubeConfigMapList", + reflect.TypeOf((*KubeConfigMapList)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "addDependency", GoMethod: "AddDependency"}, + _jsii_.MemberMethod{JsiiMethod: "addJsonPatch", GoMethod: "AddJsonPatch"}, + _jsii_.MemberProperty{JsiiProperty: "apiGroup", GoGetter: "ApiGroup"}, + _jsii_.MemberProperty{JsiiProperty: "apiVersion", GoGetter: "ApiVersion"}, + _jsii_.MemberProperty{JsiiProperty: "chart", GoGetter: "AddHelm"}, + _jsii_.MemberProperty{JsiiProperty: "kind", GoGetter: "Kind"}, + _jsii_.MemberProperty{JsiiProperty: "metadata", GoGetter: "Metadata"}, + _jsii_.MemberProperty{JsiiProperty: "name", GoGetter: "Name"}, + _jsii_.MemberProperty{JsiiProperty: "node", GoGetter: "Node"}, + _jsii_.MemberMethod{JsiiMethod: "toJson", GoMethod: "ToJson"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + }, + func() interface{} { + j := jsiiProxy_KubeConfigMapList{} + _jsii_.InitJsiiProxy(&j.Type__cdk8sApiObject) + return &j + }, + ) + _jsii_.RegisterStruct( + "k8s.KubeConfigMapListProps", + reflect.TypeOf((*KubeConfigMapListProps)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.KubeConfigMapProps", + reflect.TypeOf((*KubeConfigMapProps)(nil)).Elem(), + ) + _jsii_.RegisterClass( + "k8s.KubeControllerRevision", + reflect.TypeOf((*KubeControllerRevision)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "addDependency", GoMethod: "AddDependency"}, + _jsii_.MemberMethod{JsiiMethod: "addJsonPatch", GoMethod: "AddJsonPatch"}, + _jsii_.MemberProperty{JsiiProperty: "apiGroup", GoGetter: "ApiGroup"}, + _jsii_.MemberProperty{JsiiProperty: "apiVersion", GoGetter: "ApiVersion"}, + _jsii_.MemberProperty{JsiiProperty: "chart", GoGetter: "AddHelm"}, + _jsii_.MemberProperty{JsiiProperty: "kind", GoGetter: "Kind"}, + _jsii_.MemberProperty{JsiiProperty: "metadata", GoGetter: "Metadata"}, + _jsii_.MemberProperty{JsiiProperty: "name", GoGetter: "Name"}, + _jsii_.MemberProperty{JsiiProperty: "node", GoGetter: "Node"}, + _jsii_.MemberMethod{JsiiMethod: "toJson", GoMethod: "ToJson"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + }, + func() interface{} { + j := jsiiProxy_KubeControllerRevision{} + _jsii_.InitJsiiProxy(&j.Type__cdk8sApiObject) + return &j + }, + ) + _jsii_.RegisterClass( + "k8s.KubeControllerRevisionList", + reflect.TypeOf((*KubeControllerRevisionList)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "addDependency", GoMethod: "AddDependency"}, + _jsii_.MemberMethod{JsiiMethod: "addJsonPatch", GoMethod: "AddJsonPatch"}, + _jsii_.MemberProperty{JsiiProperty: "apiGroup", GoGetter: "ApiGroup"}, + _jsii_.MemberProperty{JsiiProperty: "apiVersion", GoGetter: "ApiVersion"}, + _jsii_.MemberProperty{JsiiProperty: "chart", GoGetter: "AddHelm"}, + _jsii_.MemberProperty{JsiiProperty: "kind", GoGetter: "Kind"}, + _jsii_.MemberProperty{JsiiProperty: "metadata", GoGetter: "Metadata"}, + _jsii_.MemberProperty{JsiiProperty: "name", GoGetter: "Name"}, + _jsii_.MemberProperty{JsiiProperty: "node", GoGetter: "Node"}, + _jsii_.MemberMethod{JsiiMethod: "toJson", GoMethod: "ToJson"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + }, + func() interface{} { + j := jsiiProxy_KubeControllerRevisionList{} + _jsii_.InitJsiiProxy(&j.Type__cdk8sApiObject) + return &j + }, + ) + _jsii_.RegisterStruct( + "k8s.KubeControllerRevisionListProps", + reflect.TypeOf((*KubeControllerRevisionListProps)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.KubeControllerRevisionProps", + reflect.TypeOf((*KubeControllerRevisionProps)(nil)).Elem(), + ) + _jsii_.RegisterClass( + "k8s.KubeCronJob", + reflect.TypeOf((*KubeCronJob)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "addDependency", GoMethod: "AddDependency"}, + _jsii_.MemberMethod{JsiiMethod: "addJsonPatch", GoMethod: "AddJsonPatch"}, + _jsii_.MemberProperty{JsiiProperty: "apiGroup", GoGetter: "ApiGroup"}, + _jsii_.MemberProperty{JsiiProperty: "apiVersion", GoGetter: "ApiVersion"}, + _jsii_.MemberProperty{JsiiProperty: "chart", GoGetter: "AddHelm"}, + _jsii_.MemberProperty{JsiiProperty: "kind", GoGetter: "Kind"}, + _jsii_.MemberProperty{JsiiProperty: "metadata", GoGetter: "Metadata"}, + _jsii_.MemberProperty{JsiiProperty: "name", GoGetter: "Name"}, + _jsii_.MemberProperty{JsiiProperty: "node", GoGetter: "Node"}, + _jsii_.MemberMethod{JsiiMethod: "toJson", GoMethod: "ToJson"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + }, + func() interface{} { + j := jsiiProxy_KubeCronJob{} + _jsii_.InitJsiiProxy(&j.Type__cdk8sApiObject) + return &j + }, + ) + _jsii_.RegisterClass( + "k8s.KubeCronJobList", + reflect.TypeOf((*KubeCronJobList)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "addDependency", GoMethod: "AddDependency"}, + _jsii_.MemberMethod{JsiiMethod: "addJsonPatch", GoMethod: "AddJsonPatch"}, + _jsii_.MemberProperty{JsiiProperty: "apiGroup", GoGetter: "ApiGroup"}, + _jsii_.MemberProperty{JsiiProperty: "apiVersion", GoGetter: "ApiVersion"}, + _jsii_.MemberProperty{JsiiProperty: "chart", GoGetter: "AddHelm"}, + _jsii_.MemberProperty{JsiiProperty: "kind", GoGetter: "Kind"}, + _jsii_.MemberProperty{JsiiProperty: "metadata", GoGetter: "Metadata"}, + _jsii_.MemberProperty{JsiiProperty: "name", GoGetter: "Name"}, + _jsii_.MemberProperty{JsiiProperty: "node", GoGetter: "Node"}, + _jsii_.MemberMethod{JsiiMethod: "toJson", GoMethod: "ToJson"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + }, + func() interface{} { + j := jsiiProxy_KubeCronJobList{} + _jsii_.InitJsiiProxy(&j.Type__cdk8sApiObject) + return &j + }, + ) + _jsii_.RegisterStruct( + "k8s.KubeCronJobListProps", + reflect.TypeOf((*KubeCronJobListProps)(nil)).Elem(), + ) + _jsii_.RegisterClass( + "k8s.KubeCronJobListV1Beta1", + reflect.TypeOf((*KubeCronJobListV1Beta1)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "addDependency", GoMethod: "AddDependency"}, + _jsii_.MemberMethod{JsiiMethod: "addJsonPatch", GoMethod: "AddJsonPatch"}, + _jsii_.MemberProperty{JsiiProperty: "apiGroup", GoGetter: "ApiGroup"}, + _jsii_.MemberProperty{JsiiProperty: "apiVersion", GoGetter: "ApiVersion"}, + _jsii_.MemberProperty{JsiiProperty: "chart", GoGetter: "AddHelm"}, + _jsii_.MemberProperty{JsiiProperty: "kind", GoGetter: "Kind"}, + _jsii_.MemberProperty{JsiiProperty: "metadata", GoGetter: "Metadata"}, + _jsii_.MemberProperty{JsiiProperty: "name", GoGetter: "Name"}, + _jsii_.MemberProperty{JsiiProperty: "node", GoGetter: "Node"}, + _jsii_.MemberMethod{JsiiMethod: "toJson", GoMethod: "ToJson"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + }, + func() interface{} { + j := jsiiProxy_KubeCronJobListV1Beta1{} + _jsii_.InitJsiiProxy(&j.Type__cdk8sApiObject) + return &j + }, + ) + _jsii_.RegisterStruct( + "k8s.KubeCronJobListV1Beta1Props", + reflect.TypeOf((*KubeCronJobListV1Beta1Props)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.KubeCronJobProps", + reflect.TypeOf((*KubeCronJobProps)(nil)).Elem(), + ) + _jsii_.RegisterClass( + "k8s.KubeCronJobV1Beta1", + reflect.TypeOf((*KubeCronJobV1Beta1)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "addDependency", GoMethod: "AddDependency"}, + _jsii_.MemberMethod{JsiiMethod: "addJsonPatch", GoMethod: "AddJsonPatch"}, + _jsii_.MemberProperty{JsiiProperty: "apiGroup", GoGetter: "ApiGroup"}, + _jsii_.MemberProperty{JsiiProperty: "apiVersion", GoGetter: "ApiVersion"}, + _jsii_.MemberProperty{JsiiProperty: "chart", GoGetter: "AddHelm"}, + _jsii_.MemberProperty{JsiiProperty: "kind", GoGetter: "Kind"}, + _jsii_.MemberProperty{JsiiProperty: "metadata", GoGetter: "Metadata"}, + _jsii_.MemberProperty{JsiiProperty: "name", GoGetter: "Name"}, + _jsii_.MemberProperty{JsiiProperty: "node", GoGetter: "Node"}, + _jsii_.MemberMethod{JsiiMethod: "toJson", GoMethod: "ToJson"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + }, + func() interface{} { + j := jsiiProxy_KubeCronJobV1Beta1{} + _jsii_.InitJsiiProxy(&j.Type__cdk8sApiObject) + return &j + }, + ) + _jsii_.RegisterStruct( + "k8s.KubeCronJobV1Beta1Props", + reflect.TypeOf((*KubeCronJobV1Beta1Props)(nil)).Elem(), + ) + _jsii_.RegisterClass( + "k8s.KubeCsiDriver", + reflect.TypeOf((*KubeCsiDriver)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "addDependency", GoMethod: "AddDependency"}, + _jsii_.MemberMethod{JsiiMethod: "addJsonPatch", GoMethod: "AddJsonPatch"}, + _jsii_.MemberProperty{JsiiProperty: "apiGroup", GoGetter: "ApiGroup"}, + _jsii_.MemberProperty{JsiiProperty: "apiVersion", GoGetter: "ApiVersion"}, + _jsii_.MemberProperty{JsiiProperty: "chart", GoGetter: "AddHelm"}, + _jsii_.MemberProperty{JsiiProperty: "kind", GoGetter: "Kind"}, + _jsii_.MemberProperty{JsiiProperty: "metadata", GoGetter: "Metadata"}, + _jsii_.MemberProperty{JsiiProperty: "name", GoGetter: "Name"}, + _jsii_.MemberProperty{JsiiProperty: "node", GoGetter: "Node"}, + _jsii_.MemberMethod{JsiiMethod: "toJson", GoMethod: "ToJson"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + }, + func() interface{} { + j := jsiiProxy_KubeCsiDriver{} + _jsii_.InitJsiiProxy(&j.Type__cdk8sApiObject) + return &j + }, + ) + _jsii_.RegisterClass( + "k8s.KubeCsiDriverList", + reflect.TypeOf((*KubeCsiDriverList)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "addDependency", GoMethod: "AddDependency"}, + _jsii_.MemberMethod{JsiiMethod: "addJsonPatch", GoMethod: "AddJsonPatch"}, + _jsii_.MemberProperty{JsiiProperty: "apiGroup", GoGetter: "ApiGroup"}, + _jsii_.MemberProperty{JsiiProperty: "apiVersion", GoGetter: "ApiVersion"}, + _jsii_.MemberProperty{JsiiProperty: "chart", GoGetter: "AddHelm"}, + _jsii_.MemberProperty{JsiiProperty: "kind", GoGetter: "Kind"}, + _jsii_.MemberProperty{JsiiProperty: "metadata", GoGetter: "Metadata"}, + _jsii_.MemberProperty{JsiiProperty: "name", GoGetter: "Name"}, + _jsii_.MemberProperty{JsiiProperty: "node", GoGetter: "Node"}, + _jsii_.MemberMethod{JsiiMethod: "toJson", GoMethod: "ToJson"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + }, + func() interface{} { + j := jsiiProxy_KubeCsiDriverList{} + _jsii_.InitJsiiProxy(&j.Type__cdk8sApiObject) + return &j + }, + ) + _jsii_.RegisterStruct( + "k8s.KubeCsiDriverListProps", + reflect.TypeOf((*KubeCsiDriverListProps)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.KubeCsiDriverProps", + reflect.TypeOf((*KubeCsiDriverProps)(nil)).Elem(), + ) + _jsii_.RegisterClass( + "k8s.KubeCsiNode", + reflect.TypeOf((*KubeCsiNode)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "addDependency", GoMethod: "AddDependency"}, + _jsii_.MemberMethod{JsiiMethod: "addJsonPatch", GoMethod: "AddJsonPatch"}, + _jsii_.MemberProperty{JsiiProperty: "apiGroup", GoGetter: "ApiGroup"}, + _jsii_.MemberProperty{JsiiProperty: "apiVersion", GoGetter: "ApiVersion"}, + _jsii_.MemberProperty{JsiiProperty: "chart", GoGetter: "AddHelm"}, + _jsii_.MemberProperty{JsiiProperty: "kind", GoGetter: "Kind"}, + _jsii_.MemberProperty{JsiiProperty: "metadata", GoGetter: "Metadata"}, + _jsii_.MemberProperty{JsiiProperty: "name", GoGetter: "Name"}, + _jsii_.MemberProperty{JsiiProperty: "node", GoGetter: "Node"}, + _jsii_.MemberMethod{JsiiMethod: "toJson", GoMethod: "ToJson"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + }, + func() interface{} { + j := jsiiProxy_KubeCsiNode{} + _jsii_.InitJsiiProxy(&j.Type__cdk8sApiObject) + return &j + }, + ) + _jsii_.RegisterClass( + "k8s.KubeCsiNodeList", + reflect.TypeOf((*KubeCsiNodeList)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "addDependency", GoMethod: "AddDependency"}, + _jsii_.MemberMethod{JsiiMethod: "addJsonPatch", GoMethod: "AddJsonPatch"}, + _jsii_.MemberProperty{JsiiProperty: "apiGroup", GoGetter: "ApiGroup"}, + _jsii_.MemberProperty{JsiiProperty: "apiVersion", GoGetter: "ApiVersion"}, + _jsii_.MemberProperty{JsiiProperty: "chart", GoGetter: "AddHelm"}, + _jsii_.MemberProperty{JsiiProperty: "kind", GoGetter: "Kind"}, + _jsii_.MemberProperty{JsiiProperty: "metadata", GoGetter: "Metadata"}, + _jsii_.MemberProperty{JsiiProperty: "name", GoGetter: "Name"}, + _jsii_.MemberProperty{JsiiProperty: "node", GoGetter: "Node"}, + _jsii_.MemberMethod{JsiiMethod: "toJson", GoMethod: "ToJson"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + }, + func() interface{} { + j := jsiiProxy_KubeCsiNodeList{} + _jsii_.InitJsiiProxy(&j.Type__cdk8sApiObject) + return &j + }, + ) + _jsii_.RegisterStruct( + "k8s.KubeCsiNodeListProps", + reflect.TypeOf((*KubeCsiNodeListProps)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.KubeCsiNodeProps", + reflect.TypeOf((*KubeCsiNodeProps)(nil)).Elem(), + ) + _jsii_.RegisterClass( + "k8s.KubeCsiStorageCapacityListV1Alpha1", + reflect.TypeOf((*KubeCsiStorageCapacityListV1Alpha1)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "addDependency", GoMethod: "AddDependency"}, + _jsii_.MemberMethod{JsiiMethod: "addJsonPatch", GoMethod: "AddJsonPatch"}, + _jsii_.MemberProperty{JsiiProperty: "apiGroup", GoGetter: "ApiGroup"}, + _jsii_.MemberProperty{JsiiProperty: "apiVersion", GoGetter: "ApiVersion"}, + _jsii_.MemberProperty{JsiiProperty: "chart", GoGetter: "AddHelm"}, + _jsii_.MemberProperty{JsiiProperty: "kind", GoGetter: "Kind"}, + _jsii_.MemberProperty{JsiiProperty: "metadata", GoGetter: "Metadata"}, + _jsii_.MemberProperty{JsiiProperty: "name", GoGetter: "Name"}, + _jsii_.MemberProperty{JsiiProperty: "node", GoGetter: "Node"}, + _jsii_.MemberMethod{JsiiMethod: "toJson", GoMethod: "ToJson"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + }, + func() interface{} { + j := jsiiProxy_KubeCsiStorageCapacityListV1Alpha1{} + _jsii_.InitJsiiProxy(&j.Type__cdk8sApiObject) + return &j + }, + ) + _jsii_.RegisterStruct( + "k8s.KubeCsiStorageCapacityListV1Alpha1Props", + reflect.TypeOf((*KubeCsiStorageCapacityListV1Alpha1Props)(nil)).Elem(), + ) + _jsii_.RegisterClass( + "k8s.KubeCsiStorageCapacityListV1Beta1", + reflect.TypeOf((*KubeCsiStorageCapacityListV1Beta1)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "addDependency", GoMethod: "AddDependency"}, + _jsii_.MemberMethod{JsiiMethod: "addJsonPatch", GoMethod: "AddJsonPatch"}, + _jsii_.MemberProperty{JsiiProperty: "apiGroup", GoGetter: "ApiGroup"}, + _jsii_.MemberProperty{JsiiProperty: "apiVersion", GoGetter: "ApiVersion"}, + _jsii_.MemberProperty{JsiiProperty: "chart", GoGetter: "AddHelm"}, + _jsii_.MemberProperty{JsiiProperty: "kind", GoGetter: "Kind"}, + _jsii_.MemberProperty{JsiiProperty: "metadata", GoGetter: "Metadata"}, + _jsii_.MemberProperty{JsiiProperty: "name", GoGetter: "Name"}, + _jsii_.MemberProperty{JsiiProperty: "node", GoGetter: "Node"}, + _jsii_.MemberMethod{JsiiMethod: "toJson", GoMethod: "ToJson"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + }, + func() interface{} { + j := jsiiProxy_KubeCsiStorageCapacityListV1Beta1{} + _jsii_.InitJsiiProxy(&j.Type__cdk8sApiObject) + return &j + }, + ) + _jsii_.RegisterStruct( + "k8s.KubeCsiStorageCapacityListV1Beta1Props", + reflect.TypeOf((*KubeCsiStorageCapacityListV1Beta1Props)(nil)).Elem(), + ) + _jsii_.RegisterClass( + "k8s.KubeCsiStorageCapacityV1Alpha1", + reflect.TypeOf((*KubeCsiStorageCapacityV1Alpha1)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "addDependency", GoMethod: "AddDependency"}, + _jsii_.MemberMethod{JsiiMethod: "addJsonPatch", GoMethod: "AddJsonPatch"}, + _jsii_.MemberProperty{JsiiProperty: "apiGroup", GoGetter: "ApiGroup"}, + _jsii_.MemberProperty{JsiiProperty: "apiVersion", GoGetter: "ApiVersion"}, + _jsii_.MemberProperty{JsiiProperty: "chart", GoGetter: "AddHelm"}, + _jsii_.MemberProperty{JsiiProperty: "kind", GoGetter: "Kind"}, + _jsii_.MemberProperty{JsiiProperty: "metadata", GoGetter: "Metadata"}, + _jsii_.MemberProperty{JsiiProperty: "name", GoGetter: "Name"}, + _jsii_.MemberProperty{JsiiProperty: "node", GoGetter: "Node"}, + _jsii_.MemberMethod{JsiiMethod: "toJson", GoMethod: "ToJson"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + }, + func() interface{} { + j := jsiiProxy_KubeCsiStorageCapacityV1Alpha1{} + _jsii_.InitJsiiProxy(&j.Type__cdk8sApiObject) + return &j + }, + ) + _jsii_.RegisterStruct( + "k8s.KubeCsiStorageCapacityV1Alpha1Props", + reflect.TypeOf((*KubeCsiStorageCapacityV1Alpha1Props)(nil)).Elem(), + ) + _jsii_.RegisterClass( + "k8s.KubeCsiStorageCapacityV1Beta1", + reflect.TypeOf((*KubeCsiStorageCapacityV1Beta1)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "addDependency", GoMethod: "AddDependency"}, + _jsii_.MemberMethod{JsiiMethod: "addJsonPatch", GoMethod: "AddJsonPatch"}, + _jsii_.MemberProperty{JsiiProperty: "apiGroup", GoGetter: "ApiGroup"}, + _jsii_.MemberProperty{JsiiProperty: "apiVersion", GoGetter: "ApiVersion"}, + _jsii_.MemberProperty{JsiiProperty: "chart", GoGetter: "AddHelm"}, + _jsii_.MemberProperty{JsiiProperty: "kind", GoGetter: "Kind"}, + _jsii_.MemberProperty{JsiiProperty: "metadata", GoGetter: "Metadata"}, + _jsii_.MemberProperty{JsiiProperty: "name", GoGetter: "Name"}, + _jsii_.MemberProperty{JsiiProperty: "node", GoGetter: "Node"}, + _jsii_.MemberMethod{JsiiMethod: "toJson", GoMethod: "ToJson"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + }, + func() interface{} { + j := jsiiProxy_KubeCsiStorageCapacityV1Beta1{} + _jsii_.InitJsiiProxy(&j.Type__cdk8sApiObject) + return &j + }, + ) + _jsii_.RegisterStruct( + "k8s.KubeCsiStorageCapacityV1Beta1Props", + reflect.TypeOf((*KubeCsiStorageCapacityV1Beta1Props)(nil)).Elem(), + ) + _jsii_.RegisterClass( + "k8s.KubeCustomResourceDefinition", + reflect.TypeOf((*KubeCustomResourceDefinition)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "addDependency", GoMethod: "AddDependency"}, + _jsii_.MemberMethod{JsiiMethod: "addJsonPatch", GoMethod: "AddJsonPatch"}, + _jsii_.MemberProperty{JsiiProperty: "apiGroup", GoGetter: "ApiGroup"}, + _jsii_.MemberProperty{JsiiProperty: "apiVersion", GoGetter: "ApiVersion"}, + _jsii_.MemberProperty{JsiiProperty: "chart", GoGetter: "AddHelm"}, + _jsii_.MemberProperty{JsiiProperty: "kind", GoGetter: "Kind"}, + _jsii_.MemberProperty{JsiiProperty: "metadata", GoGetter: "Metadata"}, + _jsii_.MemberProperty{JsiiProperty: "name", GoGetter: "Name"}, + _jsii_.MemberProperty{JsiiProperty: "node", GoGetter: "Node"}, + _jsii_.MemberMethod{JsiiMethod: "toJson", GoMethod: "ToJson"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + }, + func() interface{} { + j := jsiiProxy_KubeCustomResourceDefinition{} + _jsii_.InitJsiiProxy(&j.Type__cdk8sApiObject) + return &j + }, + ) + _jsii_.RegisterClass( + "k8s.KubeCustomResourceDefinitionList", + reflect.TypeOf((*KubeCustomResourceDefinitionList)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "addDependency", GoMethod: "AddDependency"}, + _jsii_.MemberMethod{JsiiMethod: "addJsonPatch", GoMethod: "AddJsonPatch"}, + _jsii_.MemberProperty{JsiiProperty: "apiGroup", GoGetter: "ApiGroup"}, + _jsii_.MemberProperty{JsiiProperty: "apiVersion", GoGetter: "ApiVersion"}, + _jsii_.MemberProperty{JsiiProperty: "chart", GoGetter: "AddHelm"}, + _jsii_.MemberProperty{JsiiProperty: "kind", GoGetter: "Kind"}, + _jsii_.MemberProperty{JsiiProperty: "metadata", GoGetter: "Metadata"}, + _jsii_.MemberProperty{JsiiProperty: "name", GoGetter: "Name"}, + _jsii_.MemberProperty{JsiiProperty: "node", GoGetter: "Node"}, + _jsii_.MemberMethod{JsiiMethod: "toJson", GoMethod: "ToJson"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + }, + func() interface{} { + j := jsiiProxy_KubeCustomResourceDefinitionList{} + _jsii_.InitJsiiProxy(&j.Type__cdk8sApiObject) + return &j + }, + ) + _jsii_.RegisterStruct( + "k8s.KubeCustomResourceDefinitionListProps", + reflect.TypeOf((*KubeCustomResourceDefinitionListProps)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.KubeCustomResourceDefinitionProps", + reflect.TypeOf((*KubeCustomResourceDefinitionProps)(nil)).Elem(), + ) + _jsii_.RegisterClass( + "k8s.KubeDaemonSet", + reflect.TypeOf((*KubeDaemonSet)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "addDependency", GoMethod: "AddDependency"}, + _jsii_.MemberMethod{JsiiMethod: "addJsonPatch", GoMethod: "AddJsonPatch"}, + _jsii_.MemberProperty{JsiiProperty: "apiGroup", GoGetter: "ApiGroup"}, + _jsii_.MemberProperty{JsiiProperty: "apiVersion", GoGetter: "ApiVersion"}, + _jsii_.MemberProperty{JsiiProperty: "chart", GoGetter: "AddHelm"}, + _jsii_.MemberProperty{JsiiProperty: "kind", GoGetter: "Kind"}, + _jsii_.MemberProperty{JsiiProperty: "metadata", GoGetter: "Metadata"}, + _jsii_.MemberProperty{JsiiProperty: "name", GoGetter: "Name"}, + _jsii_.MemberProperty{JsiiProperty: "node", GoGetter: "Node"}, + _jsii_.MemberMethod{JsiiMethod: "toJson", GoMethod: "ToJson"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + }, + func() interface{} { + j := jsiiProxy_KubeDaemonSet{} + _jsii_.InitJsiiProxy(&j.Type__cdk8sApiObject) + return &j + }, + ) + _jsii_.RegisterClass( + "k8s.KubeDaemonSetList", + reflect.TypeOf((*KubeDaemonSetList)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "addDependency", GoMethod: "AddDependency"}, + _jsii_.MemberMethod{JsiiMethod: "addJsonPatch", GoMethod: "AddJsonPatch"}, + _jsii_.MemberProperty{JsiiProperty: "apiGroup", GoGetter: "ApiGroup"}, + _jsii_.MemberProperty{JsiiProperty: "apiVersion", GoGetter: "ApiVersion"}, + _jsii_.MemberProperty{JsiiProperty: "chart", GoGetter: "AddHelm"}, + _jsii_.MemberProperty{JsiiProperty: "kind", GoGetter: "Kind"}, + _jsii_.MemberProperty{JsiiProperty: "metadata", GoGetter: "Metadata"}, + _jsii_.MemberProperty{JsiiProperty: "name", GoGetter: "Name"}, + _jsii_.MemberProperty{JsiiProperty: "node", GoGetter: "Node"}, + _jsii_.MemberMethod{JsiiMethod: "toJson", GoMethod: "ToJson"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + }, + func() interface{} { + j := jsiiProxy_KubeDaemonSetList{} + _jsii_.InitJsiiProxy(&j.Type__cdk8sApiObject) + return &j + }, + ) + _jsii_.RegisterStruct( + "k8s.KubeDaemonSetListProps", + reflect.TypeOf((*KubeDaemonSetListProps)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.KubeDaemonSetProps", + reflect.TypeOf((*KubeDaemonSetProps)(nil)).Elem(), + ) + _jsii_.RegisterClass( + "k8s.KubeDeployment", + reflect.TypeOf((*KubeDeployment)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "addDependency", GoMethod: "AddDependency"}, + _jsii_.MemberMethod{JsiiMethod: "addJsonPatch", GoMethod: "AddJsonPatch"}, + _jsii_.MemberProperty{JsiiProperty: "apiGroup", GoGetter: "ApiGroup"}, + _jsii_.MemberProperty{JsiiProperty: "apiVersion", GoGetter: "ApiVersion"}, + _jsii_.MemberProperty{JsiiProperty: "chart", GoGetter: "AddHelm"}, + _jsii_.MemberProperty{JsiiProperty: "kind", GoGetter: "Kind"}, + _jsii_.MemberProperty{JsiiProperty: "metadata", GoGetter: "Metadata"}, + _jsii_.MemberProperty{JsiiProperty: "name", GoGetter: "Name"}, + _jsii_.MemberProperty{JsiiProperty: "node", GoGetter: "Node"}, + _jsii_.MemberMethod{JsiiMethod: "toJson", GoMethod: "ToJson"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + }, + func() interface{} { + j := jsiiProxy_KubeDeployment{} + _jsii_.InitJsiiProxy(&j.Type__cdk8sApiObject) + return &j + }, + ) + _jsii_.RegisterClass( + "k8s.KubeDeploymentList", + reflect.TypeOf((*KubeDeploymentList)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "addDependency", GoMethod: "AddDependency"}, + _jsii_.MemberMethod{JsiiMethod: "addJsonPatch", GoMethod: "AddJsonPatch"}, + _jsii_.MemberProperty{JsiiProperty: "apiGroup", GoGetter: "ApiGroup"}, + _jsii_.MemberProperty{JsiiProperty: "apiVersion", GoGetter: "ApiVersion"}, + _jsii_.MemberProperty{JsiiProperty: "chart", GoGetter: "AddHelm"}, + _jsii_.MemberProperty{JsiiProperty: "kind", GoGetter: "Kind"}, + _jsii_.MemberProperty{JsiiProperty: "metadata", GoGetter: "Metadata"}, + _jsii_.MemberProperty{JsiiProperty: "name", GoGetter: "Name"}, + _jsii_.MemberProperty{JsiiProperty: "node", GoGetter: "Node"}, + _jsii_.MemberMethod{JsiiMethod: "toJson", GoMethod: "ToJson"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + }, + func() interface{} { + j := jsiiProxy_KubeDeploymentList{} + _jsii_.InitJsiiProxy(&j.Type__cdk8sApiObject) + return &j + }, + ) + _jsii_.RegisterStruct( + "k8s.KubeDeploymentListProps", + reflect.TypeOf((*KubeDeploymentListProps)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.KubeDeploymentProps", + reflect.TypeOf((*KubeDeploymentProps)(nil)).Elem(), + ) + _jsii_.RegisterClass( + "k8s.KubeEndpointSlice", + reflect.TypeOf((*KubeEndpointSlice)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "addDependency", GoMethod: "AddDependency"}, + _jsii_.MemberMethod{JsiiMethod: "addJsonPatch", GoMethod: "AddJsonPatch"}, + _jsii_.MemberProperty{JsiiProperty: "apiGroup", GoGetter: "ApiGroup"}, + _jsii_.MemberProperty{JsiiProperty: "apiVersion", GoGetter: "ApiVersion"}, + _jsii_.MemberProperty{JsiiProperty: "chart", GoGetter: "AddHelm"}, + _jsii_.MemberProperty{JsiiProperty: "kind", GoGetter: "Kind"}, + _jsii_.MemberProperty{JsiiProperty: "metadata", GoGetter: "Metadata"}, + _jsii_.MemberProperty{JsiiProperty: "name", GoGetter: "Name"}, + _jsii_.MemberProperty{JsiiProperty: "node", GoGetter: "Node"}, + _jsii_.MemberMethod{JsiiMethod: "toJson", GoMethod: "ToJson"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + }, + func() interface{} { + j := jsiiProxy_KubeEndpointSlice{} + _jsii_.InitJsiiProxy(&j.Type__cdk8sApiObject) + return &j + }, + ) + _jsii_.RegisterClass( + "k8s.KubeEndpointSliceList", + reflect.TypeOf((*KubeEndpointSliceList)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "addDependency", GoMethod: "AddDependency"}, + _jsii_.MemberMethod{JsiiMethod: "addJsonPatch", GoMethod: "AddJsonPatch"}, + _jsii_.MemberProperty{JsiiProperty: "apiGroup", GoGetter: "ApiGroup"}, + _jsii_.MemberProperty{JsiiProperty: "apiVersion", GoGetter: "ApiVersion"}, + _jsii_.MemberProperty{JsiiProperty: "chart", GoGetter: "AddHelm"}, + _jsii_.MemberProperty{JsiiProperty: "kind", GoGetter: "Kind"}, + _jsii_.MemberProperty{JsiiProperty: "metadata", GoGetter: "Metadata"}, + _jsii_.MemberProperty{JsiiProperty: "name", GoGetter: "Name"}, + _jsii_.MemberProperty{JsiiProperty: "node", GoGetter: "Node"}, + _jsii_.MemberMethod{JsiiMethod: "toJson", GoMethod: "ToJson"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + }, + func() interface{} { + j := jsiiProxy_KubeEndpointSliceList{} + _jsii_.InitJsiiProxy(&j.Type__cdk8sApiObject) + return &j + }, + ) + _jsii_.RegisterStruct( + "k8s.KubeEndpointSliceListProps", + reflect.TypeOf((*KubeEndpointSliceListProps)(nil)).Elem(), + ) + _jsii_.RegisterClass( + "k8s.KubeEndpointSliceListV1Beta1", + reflect.TypeOf((*KubeEndpointSliceListV1Beta1)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "addDependency", GoMethod: "AddDependency"}, + _jsii_.MemberMethod{JsiiMethod: "addJsonPatch", GoMethod: "AddJsonPatch"}, + _jsii_.MemberProperty{JsiiProperty: "apiGroup", GoGetter: "ApiGroup"}, + _jsii_.MemberProperty{JsiiProperty: "apiVersion", GoGetter: "ApiVersion"}, + _jsii_.MemberProperty{JsiiProperty: "chart", GoGetter: "AddHelm"}, + _jsii_.MemberProperty{JsiiProperty: "kind", GoGetter: "Kind"}, + _jsii_.MemberProperty{JsiiProperty: "metadata", GoGetter: "Metadata"}, + _jsii_.MemberProperty{JsiiProperty: "name", GoGetter: "Name"}, + _jsii_.MemberProperty{JsiiProperty: "node", GoGetter: "Node"}, + _jsii_.MemberMethod{JsiiMethod: "toJson", GoMethod: "ToJson"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + }, + func() interface{} { + j := jsiiProxy_KubeEndpointSliceListV1Beta1{} + _jsii_.InitJsiiProxy(&j.Type__cdk8sApiObject) + return &j + }, + ) + _jsii_.RegisterStruct( + "k8s.KubeEndpointSliceListV1Beta1Props", + reflect.TypeOf((*KubeEndpointSliceListV1Beta1Props)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.KubeEndpointSliceProps", + reflect.TypeOf((*KubeEndpointSliceProps)(nil)).Elem(), + ) + _jsii_.RegisterClass( + "k8s.KubeEndpointSliceV1Beta1", + reflect.TypeOf((*KubeEndpointSliceV1Beta1)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "addDependency", GoMethod: "AddDependency"}, + _jsii_.MemberMethod{JsiiMethod: "addJsonPatch", GoMethod: "AddJsonPatch"}, + _jsii_.MemberProperty{JsiiProperty: "apiGroup", GoGetter: "ApiGroup"}, + _jsii_.MemberProperty{JsiiProperty: "apiVersion", GoGetter: "ApiVersion"}, + _jsii_.MemberProperty{JsiiProperty: "chart", GoGetter: "AddHelm"}, + _jsii_.MemberProperty{JsiiProperty: "kind", GoGetter: "Kind"}, + _jsii_.MemberProperty{JsiiProperty: "metadata", GoGetter: "Metadata"}, + _jsii_.MemberProperty{JsiiProperty: "name", GoGetter: "Name"}, + _jsii_.MemberProperty{JsiiProperty: "node", GoGetter: "Node"}, + _jsii_.MemberMethod{JsiiMethod: "toJson", GoMethod: "ToJson"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + }, + func() interface{} { + j := jsiiProxy_KubeEndpointSliceV1Beta1{} + _jsii_.InitJsiiProxy(&j.Type__cdk8sApiObject) + return &j + }, + ) + _jsii_.RegisterStruct( + "k8s.KubeEndpointSliceV1Beta1Props", + reflect.TypeOf((*KubeEndpointSliceV1Beta1Props)(nil)).Elem(), + ) + _jsii_.RegisterClass( + "k8s.KubeEndpoints", + reflect.TypeOf((*KubeEndpoints)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "addDependency", GoMethod: "AddDependency"}, + _jsii_.MemberMethod{JsiiMethod: "addJsonPatch", GoMethod: "AddJsonPatch"}, + _jsii_.MemberProperty{JsiiProperty: "apiGroup", GoGetter: "ApiGroup"}, + _jsii_.MemberProperty{JsiiProperty: "apiVersion", GoGetter: "ApiVersion"}, + _jsii_.MemberProperty{JsiiProperty: "chart", GoGetter: "AddHelm"}, + _jsii_.MemberProperty{JsiiProperty: "kind", GoGetter: "Kind"}, + _jsii_.MemberProperty{JsiiProperty: "metadata", GoGetter: "Metadata"}, + _jsii_.MemberProperty{JsiiProperty: "name", GoGetter: "Name"}, + _jsii_.MemberProperty{JsiiProperty: "node", GoGetter: "Node"}, + _jsii_.MemberMethod{JsiiMethod: "toJson", GoMethod: "ToJson"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + }, + func() interface{} { + j := jsiiProxy_KubeEndpoints{} + _jsii_.InitJsiiProxy(&j.Type__cdk8sApiObject) + return &j + }, + ) + _jsii_.RegisterClass( + "k8s.KubeEndpointsList", + reflect.TypeOf((*KubeEndpointsList)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "addDependency", GoMethod: "AddDependency"}, + _jsii_.MemberMethod{JsiiMethod: "addJsonPatch", GoMethod: "AddJsonPatch"}, + _jsii_.MemberProperty{JsiiProperty: "apiGroup", GoGetter: "ApiGroup"}, + _jsii_.MemberProperty{JsiiProperty: "apiVersion", GoGetter: "ApiVersion"}, + _jsii_.MemberProperty{JsiiProperty: "chart", GoGetter: "AddHelm"}, + _jsii_.MemberProperty{JsiiProperty: "kind", GoGetter: "Kind"}, + _jsii_.MemberProperty{JsiiProperty: "metadata", GoGetter: "Metadata"}, + _jsii_.MemberProperty{JsiiProperty: "name", GoGetter: "Name"}, + _jsii_.MemberProperty{JsiiProperty: "node", GoGetter: "Node"}, + _jsii_.MemberMethod{JsiiMethod: "toJson", GoMethod: "ToJson"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + }, + func() interface{} { + j := jsiiProxy_KubeEndpointsList{} + _jsii_.InitJsiiProxy(&j.Type__cdk8sApiObject) + return &j + }, + ) + _jsii_.RegisterStruct( + "k8s.KubeEndpointsListProps", + reflect.TypeOf((*KubeEndpointsListProps)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.KubeEndpointsProps", + reflect.TypeOf((*KubeEndpointsProps)(nil)).Elem(), + ) + _jsii_.RegisterClass( + "k8s.KubeEvent", + reflect.TypeOf((*KubeEvent)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "addDependency", GoMethod: "AddDependency"}, + _jsii_.MemberMethod{JsiiMethod: "addJsonPatch", GoMethod: "AddJsonPatch"}, + _jsii_.MemberProperty{JsiiProperty: "apiGroup", GoGetter: "ApiGroup"}, + _jsii_.MemberProperty{JsiiProperty: "apiVersion", GoGetter: "ApiVersion"}, + _jsii_.MemberProperty{JsiiProperty: "chart", GoGetter: "AddHelm"}, + _jsii_.MemberProperty{JsiiProperty: "kind", GoGetter: "Kind"}, + _jsii_.MemberProperty{JsiiProperty: "metadata", GoGetter: "Metadata"}, + _jsii_.MemberProperty{JsiiProperty: "name", GoGetter: "Name"}, + _jsii_.MemberProperty{JsiiProperty: "node", GoGetter: "Node"}, + _jsii_.MemberMethod{JsiiMethod: "toJson", GoMethod: "ToJson"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + }, + func() interface{} { + j := jsiiProxy_KubeEvent{} + _jsii_.InitJsiiProxy(&j.Type__cdk8sApiObject) + return &j + }, + ) + _jsii_.RegisterClass( + "k8s.KubeEventList", + reflect.TypeOf((*KubeEventList)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "addDependency", GoMethod: "AddDependency"}, + _jsii_.MemberMethod{JsiiMethod: "addJsonPatch", GoMethod: "AddJsonPatch"}, + _jsii_.MemberProperty{JsiiProperty: "apiGroup", GoGetter: "ApiGroup"}, + _jsii_.MemberProperty{JsiiProperty: "apiVersion", GoGetter: "ApiVersion"}, + _jsii_.MemberProperty{JsiiProperty: "chart", GoGetter: "AddHelm"}, + _jsii_.MemberProperty{JsiiProperty: "kind", GoGetter: "Kind"}, + _jsii_.MemberProperty{JsiiProperty: "metadata", GoGetter: "Metadata"}, + _jsii_.MemberProperty{JsiiProperty: "name", GoGetter: "Name"}, + _jsii_.MemberProperty{JsiiProperty: "node", GoGetter: "Node"}, + _jsii_.MemberMethod{JsiiMethod: "toJson", GoMethod: "ToJson"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + }, + func() interface{} { + j := jsiiProxy_KubeEventList{} + _jsii_.InitJsiiProxy(&j.Type__cdk8sApiObject) + return &j + }, + ) + _jsii_.RegisterStruct( + "k8s.KubeEventListProps", + reflect.TypeOf((*KubeEventListProps)(nil)).Elem(), + ) + _jsii_.RegisterClass( + "k8s.KubeEventListV1Beta1", + reflect.TypeOf((*KubeEventListV1Beta1)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "addDependency", GoMethod: "AddDependency"}, + _jsii_.MemberMethod{JsiiMethod: "addJsonPatch", GoMethod: "AddJsonPatch"}, + _jsii_.MemberProperty{JsiiProperty: "apiGroup", GoGetter: "ApiGroup"}, + _jsii_.MemberProperty{JsiiProperty: "apiVersion", GoGetter: "ApiVersion"}, + _jsii_.MemberProperty{JsiiProperty: "chart", GoGetter: "AddHelm"}, + _jsii_.MemberProperty{JsiiProperty: "kind", GoGetter: "Kind"}, + _jsii_.MemberProperty{JsiiProperty: "metadata", GoGetter: "Metadata"}, + _jsii_.MemberProperty{JsiiProperty: "name", GoGetter: "Name"}, + _jsii_.MemberProperty{JsiiProperty: "node", GoGetter: "Node"}, + _jsii_.MemberMethod{JsiiMethod: "toJson", GoMethod: "ToJson"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + }, + func() interface{} { + j := jsiiProxy_KubeEventListV1Beta1{} + _jsii_.InitJsiiProxy(&j.Type__cdk8sApiObject) + return &j + }, + ) + _jsii_.RegisterStruct( + "k8s.KubeEventListV1Beta1Props", + reflect.TypeOf((*KubeEventListV1Beta1Props)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.KubeEventProps", + reflect.TypeOf((*KubeEventProps)(nil)).Elem(), + ) + _jsii_.RegisterClass( + "k8s.KubeEventV1Beta1", + reflect.TypeOf((*KubeEventV1Beta1)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "addDependency", GoMethod: "AddDependency"}, + _jsii_.MemberMethod{JsiiMethod: "addJsonPatch", GoMethod: "AddJsonPatch"}, + _jsii_.MemberProperty{JsiiProperty: "apiGroup", GoGetter: "ApiGroup"}, + _jsii_.MemberProperty{JsiiProperty: "apiVersion", GoGetter: "ApiVersion"}, + _jsii_.MemberProperty{JsiiProperty: "chart", GoGetter: "AddHelm"}, + _jsii_.MemberProperty{JsiiProperty: "kind", GoGetter: "Kind"}, + _jsii_.MemberProperty{JsiiProperty: "metadata", GoGetter: "Metadata"}, + _jsii_.MemberProperty{JsiiProperty: "name", GoGetter: "Name"}, + _jsii_.MemberProperty{JsiiProperty: "node", GoGetter: "Node"}, + _jsii_.MemberMethod{JsiiMethod: "toJson", GoMethod: "ToJson"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + }, + func() interface{} { + j := jsiiProxy_KubeEventV1Beta1{} + _jsii_.InitJsiiProxy(&j.Type__cdk8sApiObject) + return &j + }, + ) + _jsii_.RegisterStruct( + "k8s.KubeEventV1Beta1Props", + reflect.TypeOf((*KubeEventV1Beta1Props)(nil)).Elem(), + ) + _jsii_.RegisterClass( + "k8s.KubeEviction", + reflect.TypeOf((*KubeEviction)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "addDependency", GoMethod: "AddDependency"}, + _jsii_.MemberMethod{JsiiMethod: "addJsonPatch", GoMethod: "AddJsonPatch"}, + _jsii_.MemberProperty{JsiiProperty: "apiGroup", GoGetter: "ApiGroup"}, + _jsii_.MemberProperty{JsiiProperty: "apiVersion", GoGetter: "ApiVersion"}, + _jsii_.MemberProperty{JsiiProperty: "chart", GoGetter: "AddHelm"}, + _jsii_.MemberProperty{JsiiProperty: "kind", GoGetter: "Kind"}, + _jsii_.MemberProperty{JsiiProperty: "metadata", GoGetter: "Metadata"}, + _jsii_.MemberProperty{JsiiProperty: "name", GoGetter: "Name"}, + _jsii_.MemberProperty{JsiiProperty: "node", GoGetter: "Node"}, + _jsii_.MemberMethod{JsiiMethod: "toJson", GoMethod: "ToJson"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + }, + func() interface{} { + j := jsiiProxy_KubeEviction{} + _jsii_.InitJsiiProxy(&j.Type__cdk8sApiObject) + return &j + }, + ) + _jsii_.RegisterStruct( + "k8s.KubeEvictionProps", + reflect.TypeOf((*KubeEvictionProps)(nil)).Elem(), + ) + _jsii_.RegisterClass( + "k8s.KubeFlowSchemaListV1Beta1", + reflect.TypeOf((*KubeFlowSchemaListV1Beta1)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "addDependency", GoMethod: "AddDependency"}, + _jsii_.MemberMethod{JsiiMethod: "addJsonPatch", GoMethod: "AddJsonPatch"}, + _jsii_.MemberProperty{JsiiProperty: "apiGroup", GoGetter: "ApiGroup"}, + _jsii_.MemberProperty{JsiiProperty: "apiVersion", GoGetter: "ApiVersion"}, + _jsii_.MemberProperty{JsiiProperty: "chart", GoGetter: "AddHelm"}, + _jsii_.MemberProperty{JsiiProperty: "kind", GoGetter: "Kind"}, + _jsii_.MemberProperty{JsiiProperty: "metadata", GoGetter: "Metadata"}, + _jsii_.MemberProperty{JsiiProperty: "name", GoGetter: "Name"}, + _jsii_.MemberProperty{JsiiProperty: "node", GoGetter: "Node"}, + _jsii_.MemberMethod{JsiiMethod: "toJson", GoMethod: "ToJson"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + }, + func() interface{} { + j := jsiiProxy_KubeFlowSchemaListV1Beta1{} + _jsii_.InitJsiiProxy(&j.Type__cdk8sApiObject) + return &j + }, + ) + _jsii_.RegisterStruct( + "k8s.KubeFlowSchemaListV1Beta1Props", + reflect.TypeOf((*KubeFlowSchemaListV1Beta1Props)(nil)).Elem(), + ) + _jsii_.RegisterClass( + "k8s.KubeFlowSchemaV1Beta1", + reflect.TypeOf((*KubeFlowSchemaV1Beta1)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "addDependency", GoMethod: "AddDependency"}, + _jsii_.MemberMethod{JsiiMethod: "addJsonPatch", GoMethod: "AddJsonPatch"}, + _jsii_.MemberProperty{JsiiProperty: "apiGroup", GoGetter: "ApiGroup"}, + _jsii_.MemberProperty{JsiiProperty: "apiVersion", GoGetter: "ApiVersion"}, + _jsii_.MemberProperty{JsiiProperty: "chart", GoGetter: "AddHelm"}, + _jsii_.MemberProperty{JsiiProperty: "kind", GoGetter: "Kind"}, + _jsii_.MemberProperty{JsiiProperty: "metadata", GoGetter: "Metadata"}, + _jsii_.MemberProperty{JsiiProperty: "name", GoGetter: "Name"}, + _jsii_.MemberProperty{JsiiProperty: "node", GoGetter: "Node"}, + _jsii_.MemberMethod{JsiiMethod: "toJson", GoMethod: "ToJson"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + }, + func() interface{} { + j := jsiiProxy_KubeFlowSchemaV1Beta1{} + _jsii_.InitJsiiProxy(&j.Type__cdk8sApiObject) + return &j + }, + ) + _jsii_.RegisterStruct( + "k8s.KubeFlowSchemaV1Beta1Props", + reflect.TypeOf((*KubeFlowSchemaV1Beta1Props)(nil)).Elem(), + ) + _jsii_.RegisterClass( + "k8s.KubeHorizontalPodAutoscaler", + reflect.TypeOf((*KubeHorizontalPodAutoscaler)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "addDependency", GoMethod: "AddDependency"}, + _jsii_.MemberMethod{JsiiMethod: "addJsonPatch", GoMethod: "AddJsonPatch"}, + _jsii_.MemberProperty{JsiiProperty: "apiGroup", GoGetter: "ApiGroup"}, + _jsii_.MemberProperty{JsiiProperty: "apiVersion", GoGetter: "ApiVersion"}, + _jsii_.MemberProperty{JsiiProperty: "chart", GoGetter: "AddHelm"}, + _jsii_.MemberProperty{JsiiProperty: "kind", GoGetter: "Kind"}, + _jsii_.MemberProperty{JsiiProperty: "metadata", GoGetter: "Metadata"}, + _jsii_.MemberProperty{JsiiProperty: "name", GoGetter: "Name"}, + _jsii_.MemberProperty{JsiiProperty: "node", GoGetter: "Node"}, + _jsii_.MemberMethod{JsiiMethod: "toJson", GoMethod: "ToJson"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + }, + func() interface{} { + j := jsiiProxy_KubeHorizontalPodAutoscaler{} + _jsii_.InitJsiiProxy(&j.Type__cdk8sApiObject) + return &j + }, + ) + _jsii_.RegisterClass( + "k8s.KubeHorizontalPodAutoscalerList", + reflect.TypeOf((*KubeHorizontalPodAutoscalerList)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "addDependency", GoMethod: "AddDependency"}, + _jsii_.MemberMethod{JsiiMethod: "addJsonPatch", GoMethod: "AddJsonPatch"}, + _jsii_.MemberProperty{JsiiProperty: "apiGroup", GoGetter: "ApiGroup"}, + _jsii_.MemberProperty{JsiiProperty: "apiVersion", GoGetter: "ApiVersion"}, + _jsii_.MemberProperty{JsiiProperty: "chart", GoGetter: "AddHelm"}, + _jsii_.MemberProperty{JsiiProperty: "kind", GoGetter: "Kind"}, + _jsii_.MemberProperty{JsiiProperty: "metadata", GoGetter: "Metadata"}, + _jsii_.MemberProperty{JsiiProperty: "name", GoGetter: "Name"}, + _jsii_.MemberProperty{JsiiProperty: "node", GoGetter: "Node"}, + _jsii_.MemberMethod{JsiiMethod: "toJson", GoMethod: "ToJson"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + }, + func() interface{} { + j := jsiiProxy_KubeHorizontalPodAutoscalerList{} + _jsii_.InitJsiiProxy(&j.Type__cdk8sApiObject) + return &j + }, + ) + _jsii_.RegisterStruct( + "k8s.KubeHorizontalPodAutoscalerListProps", + reflect.TypeOf((*KubeHorizontalPodAutoscalerListProps)(nil)).Elem(), + ) + _jsii_.RegisterClass( + "k8s.KubeHorizontalPodAutoscalerListV2Beta1", + reflect.TypeOf((*KubeHorizontalPodAutoscalerListV2Beta1)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "addDependency", GoMethod: "AddDependency"}, + _jsii_.MemberMethod{JsiiMethod: "addJsonPatch", GoMethod: "AddJsonPatch"}, + _jsii_.MemberProperty{JsiiProperty: "apiGroup", GoGetter: "ApiGroup"}, + _jsii_.MemberProperty{JsiiProperty: "apiVersion", GoGetter: "ApiVersion"}, + _jsii_.MemberProperty{JsiiProperty: "chart", GoGetter: "AddHelm"}, + _jsii_.MemberProperty{JsiiProperty: "kind", GoGetter: "Kind"}, + _jsii_.MemberProperty{JsiiProperty: "metadata", GoGetter: "Metadata"}, + _jsii_.MemberProperty{JsiiProperty: "name", GoGetter: "Name"}, + _jsii_.MemberProperty{JsiiProperty: "node", GoGetter: "Node"}, + _jsii_.MemberMethod{JsiiMethod: "toJson", GoMethod: "ToJson"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + }, + func() interface{} { + j := jsiiProxy_KubeHorizontalPodAutoscalerListV2Beta1{} + _jsii_.InitJsiiProxy(&j.Type__cdk8sApiObject) + return &j + }, + ) + _jsii_.RegisterStruct( + "k8s.KubeHorizontalPodAutoscalerListV2Beta1Props", + reflect.TypeOf((*KubeHorizontalPodAutoscalerListV2Beta1Props)(nil)).Elem(), + ) + _jsii_.RegisterClass( + "k8s.KubeHorizontalPodAutoscalerListV2Beta2", + reflect.TypeOf((*KubeHorizontalPodAutoscalerListV2Beta2)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "addDependency", GoMethod: "AddDependency"}, + _jsii_.MemberMethod{JsiiMethod: "addJsonPatch", GoMethod: "AddJsonPatch"}, + _jsii_.MemberProperty{JsiiProperty: "apiGroup", GoGetter: "ApiGroup"}, + _jsii_.MemberProperty{JsiiProperty: "apiVersion", GoGetter: "ApiVersion"}, + _jsii_.MemberProperty{JsiiProperty: "chart", GoGetter: "AddHelm"}, + _jsii_.MemberProperty{JsiiProperty: "kind", GoGetter: "Kind"}, + _jsii_.MemberProperty{JsiiProperty: "metadata", GoGetter: "Metadata"}, + _jsii_.MemberProperty{JsiiProperty: "name", GoGetter: "Name"}, + _jsii_.MemberProperty{JsiiProperty: "node", GoGetter: "Node"}, + _jsii_.MemberMethod{JsiiMethod: "toJson", GoMethod: "ToJson"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + }, + func() interface{} { + j := jsiiProxy_KubeHorizontalPodAutoscalerListV2Beta2{} + _jsii_.InitJsiiProxy(&j.Type__cdk8sApiObject) + return &j + }, + ) + _jsii_.RegisterStruct( + "k8s.KubeHorizontalPodAutoscalerListV2Beta2Props", + reflect.TypeOf((*KubeHorizontalPodAutoscalerListV2Beta2Props)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.KubeHorizontalPodAutoscalerProps", + reflect.TypeOf((*KubeHorizontalPodAutoscalerProps)(nil)).Elem(), + ) + _jsii_.RegisterClass( + "k8s.KubeHorizontalPodAutoscalerV2Beta1", + reflect.TypeOf((*KubeHorizontalPodAutoscalerV2Beta1)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "addDependency", GoMethod: "AddDependency"}, + _jsii_.MemberMethod{JsiiMethod: "addJsonPatch", GoMethod: "AddJsonPatch"}, + _jsii_.MemberProperty{JsiiProperty: "apiGroup", GoGetter: "ApiGroup"}, + _jsii_.MemberProperty{JsiiProperty: "apiVersion", GoGetter: "ApiVersion"}, + _jsii_.MemberProperty{JsiiProperty: "chart", GoGetter: "AddHelm"}, + _jsii_.MemberProperty{JsiiProperty: "kind", GoGetter: "Kind"}, + _jsii_.MemberProperty{JsiiProperty: "metadata", GoGetter: "Metadata"}, + _jsii_.MemberProperty{JsiiProperty: "name", GoGetter: "Name"}, + _jsii_.MemberProperty{JsiiProperty: "node", GoGetter: "Node"}, + _jsii_.MemberMethod{JsiiMethod: "toJson", GoMethod: "ToJson"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + }, + func() interface{} { + j := jsiiProxy_KubeHorizontalPodAutoscalerV2Beta1{} + _jsii_.InitJsiiProxy(&j.Type__cdk8sApiObject) + return &j + }, + ) + _jsii_.RegisterStruct( + "k8s.KubeHorizontalPodAutoscalerV2Beta1Props", + reflect.TypeOf((*KubeHorizontalPodAutoscalerV2Beta1Props)(nil)).Elem(), + ) + _jsii_.RegisterClass( + "k8s.KubeHorizontalPodAutoscalerV2Beta2", + reflect.TypeOf((*KubeHorizontalPodAutoscalerV2Beta2)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "addDependency", GoMethod: "AddDependency"}, + _jsii_.MemberMethod{JsiiMethod: "addJsonPatch", GoMethod: "AddJsonPatch"}, + _jsii_.MemberProperty{JsiiProperty: "apiGroup", GoGetter: "ApiGroup"}, + _jsii_.MemberProperty{JsiiProperty: "apiVersion", GoGetter: "ApiVersion"}, + _jsii_.MemberProperty{JsiiProperty: "chart", GoGetter: "AddHelm"}, + _jsii_.MemberProperty{JsiiProperty: "kind", GoGetter: "Kind"}, + _jsii_.MemberProperty{JsiiProperty: "metadata", GoGetter: "Metadata"}, + _jsii_.MemberProperty{JsiiProperty: "name", GoGetter: "Name"}, + _jsii_.MemberProperty{JsiiProperty: "node", GoGetter: "Node"}, + _jsii_.MemberMethod{JsiiMethod: "toJson", GoMethod: "ToJson"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + }, + func() interface{} { + j := jsiiProxy_KubeHorizontalPodAutoscalerV2Beta2{} + _jsii_.InitJsiiProxy(&j.Type__cdk8sApiObject) + return &j + }, + ) + _jsii_.RegisterStruct( + "k8s.KubeHorizontalPodAutoscalerV2Beta2Props", + reflect.TypeOf((*KubeHorizontalPodAutoscalerV2Beta2Props)(nil)).Elem(), + ) + _jsii_.RegisterClass( + "k8s.KubeIngress", + reflect.TypeOf((*KubeIngress)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "addDependency", GoMethod: "AddDependency"}, + _jsii_.MemberMethod{JsiiMethod: "addJsonPatch", GoMethod: "AddJsonPatch"}, + _jsii_.MemberProperty{JsiiProperty: "apiGroup", GoGetter: "ApiGroup"}, + _jsii_.MemberProperty{JsiiProperty: "apiVersion", GoGetter: "ApiVersion"}, + _jsii_.MemberProperty{JsiiProperty: "chart", GoGetter: "AddHelm"}, + _jsii_.MemberProperty{JsiiProperty: "kind", GoGetter: "Kind"}, + _jsii_.MemberProperty{JsiiProperty: "metadata", GoGetter: "Metadata"}, + _jsii_.MemberProperty{JsiiProperty: "name", GoGetter: "Name"}, + _jsii_.MemberProperty{JsiiProperty: "node", GoGetter: "Node"}, + _jsii_.MemberMethod{JsiiMethod: "toJson", GoMethod: "ToJson"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + }, + func() interface{} { + j := jsiiProxy_KubeIngress{} + _jsii_.InitJsiiProxy(&j.Type__cdk8sApiObject) + return &j + }, + ) + _jsii_.RegisterClass( + "k8s.KubeIngressClass", + reflect.TypeOf((*KubeIngressClass)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "addDependency", GoMethod: "AddDependency"}, + _jsii_.MemberMethod{JsiiMethod: "addJsonPatch", GoMethod: "AddJsonPatch"}, + _jsii_.MemberProperty{JsiiProperty: "apiGroup", GoGetter: "ApiGroup"}, + _jsii_.MemberProperty{JsiiProperty: "apiVersion", GoGetter: "ApiVersion"}, + _jsii_.MemberProperty{JsiiProperty: "chart", GoGetter: "AddHelm"}, + _jsii_.MemberProperty{JsiiProperty: "kind", GoGetter: "Kind"}, + _jsii_.MemberProperty{JsiiProperty: "metadata", GoGetter: "Metadata"}, + _jsii_.MemberProperty{JsiiProperty: "name", GoGetter: "Name"}, + _jsii_.MemberProperty{JsiiProperty: "node", GoGetter: "Node"}, + _jsii_.MemberMethod{JsiiMethod: "toJson", GoMethod: "ToJson"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + }, + func() interface{} { + j := jsiiProxy_KubeIngressClass{} + _jsii_.InitJsiiProxy(&j.Type__cdk8sApiObject) + return &j + }, + ) + _jsii_.RegisterClass( + "k8s.KubeIngressClassList", + reflect.TypeOf((*KubeIngressClassList)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "addDependency", GoMethod: "AddDependency"}, + _jsii_.MemberMethod{JsiiMethod: "addJsonPatch", GoMethod: "AddJsonPatch"}, + _jsii_.MemberProperty{JsiiProperty: "apiGroup", GoGetter: "ApiGroup"}, + _jsii_.MemberProperty{JsiiProperty: "apiVersion", GoGetter: "ApiVersion"}, + _jsii_.MemberProperty{JsiiProperty: "chart", GoGetter: "AddHelm"}, + _jsii_.MemberProperty{JsiiProperty: "kind", GoGetter: "Kind"}, + _jsii_.MemberProperty{JsiiProperty: "metadata", GoGetter: "Metadata"}, + _jsii_.MemberProperty{JsiiProperty: "name", GoGetter: "Name"}, + _jsii_.MemberProperty{JsiiProperty: "node", GoGetter: "Node"}, + _jsii_.MemberMethod{JsiiMethod: "toJson", GoMethod: "ToJson"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + }, + func() interface{} { + j := jsiiProxy_KubeIngressClassList{} + _jsii_.InitJsiiProxy(&j.Type__cdk8sApiObject) + return &j + }, + ) + _jsii_.RegisterStruct( + "k8s.KubeIngressClassListProps", + reflect.TypeOf((*KubeIngressClassListProps)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.KubeIngressClassProps", + reflect.TypeOf((*KubeIngressClassProps)(nil)).Elem(), + ) + _jsii_.RegisterClass( + "k8s.KubeIngressList", + reflect.TypeOf((*KubeIngressList)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "addDependency", GoMethod: "AddDependency"}, + _jsii_.MemberMethod{JsiiMethod: "addJsonPatch", GoMethod: "AddJsonPatch"}, + _jsii_.MemberProperty{JsiiProperty: "apiGroup", GoGetter: "ApiGroup"}, + _jsii_.MemberProperty{JsiiProperty: "apiVersion", GoGetter: "ApiVersion"}, + _jsii_.MemberProperty{JsiiProperty: "chart", GoGetter: "AddHelm"}, + _jsii_.MemberProperty{JsiiProperty: "kind", GoGetter: "Kind"}, + _jsii_.MemberProperty{JsiiProperty: "metadata", GoGetter: "Metadata"}, + _jsii_.MemberProperty{JsiiProperty: "name", GoGetter: "Name"}, + _jsii_.MemberProperty{JsiiProperty: "node", GoGetter: "Node"}, + _jsii_.MemberMethod{JsiiMethod: "toJson", GoMethod: "ToJson"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + }, + func() interface{} { + j := jsiiProxy_KubeIngressList{} + _jsii_.InitJsiiProxy(&j.Type__cdk8sApiObject) + return &j + }, + ) + _jsii_.RegisterStruct( + "k8s.KubeIngressListProps", + reflect.TypeOf((*KubeIngressListProps)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.KubeIngressProps", + reflect.TypeOf((*KubeIngressProps)(nil)).Elem(), + ) + _jsii_.RegisterClass( + "k8s.KubeJob", + reflect.TypeOf((*KubeJob)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "addDependency", GoMethod: "AddDependency"}, + _jsii_.MemberMethod{JsiiMethod: "addJsonPatch", GoMethod: "AddJsonPatch"}, + _jsii_.MemberProperty{JsiiProperty: "apiGroup", GoGetter: "ApiGroup"}, + _jsii_.MemberProperty{JsiiProperty: "apiVersion", GoGetter: "ApiVersion"}, + _jsii_.MemberProperty{JsiiProperty: "chart", GoGetter: "AddHelm"}, + _jsii_.MemberProperty{JsiiProperty: "kind", GoGetter: "Kind"}, + _jsii_.MemberProperty{JsiiProperty: "metadata", GoGetter: "Metadata"}, + _jsii_.MemberProperty{JsiiProperty: "name", GoGetter: "Name"}, + _jsii_.MemberProperty{JsiiProperty: "node", GoGetter: "Node"}, + _jsii_.MemberMethod{JsiiMethod: "toJson", GoMethod: "ToJson"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + }, + func() interface{} { + j := jsiiProxy_KubeJob{} + _jsii_.InitJsiiProxy(&j.Type__cdk8sApiObject) + return &j + }, + ) + _jsii_.RegisterClass( + "k8s.KubeJobList", + reflect.TypeOf((*KubeJobList)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "addDependency", GoMethod: "AddDependency"}, + _jsii_.MemberMethod{JsiiMethod: "addJsonPatch", GoMethod: "AddJsonPatch"}, + _jsii_.MemberProperty{JsiiProperty: "apiGroup", GoGetter: "ApiGroup"}, + _jsii_.MemberProperty{JsiiProperty: "apiVersion", GoGetter: "ApiVersion"}, + _jsii_.MemberProperty{JsiiProperty: "chart", GoGetter: "AddHelm"}, + _jsii_.MemberProperty{JsiiProperty: "kind", GoGetter: "Kind"}, + _jsii_.MemberProperty{JsiiProperty: "metadata", GoGetter: "Metadata"}, + _jsii_.MemberProperty{JsiiProperty: "name", GoGetter: "Name"}, + _jsii_.MemberProperty{JsiiProperty: "node", GoGetter: "Node"}, + _jsii_.MemberMethod{JsiiMethod: "toJson", GoMethod: "ToJson"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + }, + func() interface{} { + j := jsiiProxy_KubeJobList{} + _jsii_.InitJsiiProxy(&j.Type__cdk8sApiObject) + return &j + }, + ) + _jsii_.RegisterStruct( + "k8s.KubeJobListProps", + reflect.TypeOf((*KubeJobListProps)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.KubeJobProps", + reflect.TypeOf((*KubeJobProps)(nil)).Elem(), + ) + _jsii_.RegisterClass( + "k8s.KubeLease", + reflect.TypeOf((*KubeLease)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "addDependency", GoMethod: "AddDependency"}, + _jsii_.MemberMethod{JsiiMethod: "addJsonPatch", GoMethod: "AddJsonPatch"}, + _jsii_.MemberProperty{JsiiProperty: "apiGroup", GoGetter: "ApiGroup"}, + _jsii_.MemberProperty{JsiiProperty: "apiVersion", GoGetter: "ApiVersion"}, + _jsii_.MemberProperty{JsiiProperty: "chart", GoGetter: "AddHelm"}, + _jsii_.MemberProperty{JsiiProperty: "kind", GoGetter: "Kind"}, + _jsii_.MemberProperty{JsiiProperty: "metadata", GoGetter: "Metadata"}, + _jsii_.MemberProperty{JsiiProperty: "name", GoGetter: "Name"}, + _jsii_.MemberProperty{JsiiProperty: "node", GoGetter: "Node"}, + _jsii_.MemberMethod{JsiiMethod: "toJson", GoMethod: "ToJson"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + }, + func() interface{} { + j := jsiiProxy_KubeLease{} + _jsii_.InitJsiiProxy(&j.Type__cdk8sApiObject) + return &j + }, + ) + _jsii_.RegisterClass( + "k8s.KubeLeaseList", + reflect.TypeOf((*KubeLeaseList)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "addDependency", GoMethod: "AddDependency"}, + _jsii_.MemberMethod{JsiiMethod: "addJsonPatch", GoMethod: "AddJsonPatch"}, + _jsii_.MemberProperty{JsiiProperty: "apiGroup", GoGetter: "ApiGroup"}, + _jsii_.MemberProperty{JsiiProperty: "apiVersion", GoGetter: "ApiVersion"}, + _jsii_.MemberProperty{JsiiProperty: "chart", GoGetter: "AddHelm"}, + _jsii_.MemberProperty{JsiiProperty: "kind", GoGetter: "Kind"}, + _jsii_.MemberProperty{JsiiProperty: "metadata", GoGetter: "Metadata"}, + _jsii_.MemberProperty{JsiiProperty: "name", GoGetter: "Name"}, + _jsii_.MemberProperty{JsiiProperty: "node", GoGetter: "Node"}, + _jsii_.MemberMethod{JsiiMethod: "toJson", GoMethod: "ToJson"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + }, + func() interface{} { + j := jsiiProxy_KubeLeaseList{} + _jsii_.InitJsiiProxy(&j.Type__cdk8sApiObject) + return &j + }, + ) + _jsii_.RegisterStruct( + "k8s.KubeLeaseListProps", + reflect.TypeOf((*KubeLeaseListProps)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.KubeLeaseProps", + reflect.TypeOf((*KubeLeaseProps)(nil)).Elem(), + ) + _jsii_.RegisterClass( + "k8s.KubeLimitRange", + reflect.TypeOf((*KubeLimitRange)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "addDependency", GoMethod: "AddDependency"}, + _jsii_.MemberMethod{JsiiMethod: "addJsonPatch", GoMethod: "AddJsonPatch"}, + _jsii_.MemberProperty{JsiiProperty: "apiGroup", GoGetter: "ApiGroup"}, + _jsii_.MemberProperty{JsiiProperty: "apiVersion", GoGetter: "ApiVersion"}, + _jsii_.MemberProperty{JsiiProperty: "chart", GoGetter: "AddHelm"}, + _jsii_.MemberProperty{JsiiProperty: "kind", GoGetter: "Kind"}, + _jsii_.MemberProperty{JsiiProperty: "metadata", GoGetter: "Metadata"}, + _jsii_.MemberProperty{JsiiProperty: "name", GoGetter: "Name"}, + _jsii_.MemberProperty{JsiiProperty: "node", GoGetter: "Node"}, + _jsii_.MemberMethod{JsiiMethod: "toJson", GoMethod: "ToJson"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + }, + func() interface{} { + j := jsiiProxy_KubeLimitRange{} + _jsii_.InitJsiiProxy(&j.Type__cdk8sApiObject) + return &j + }, + ) + _jsii_.RegisterClass( + "k8s.KubeLimitRangeList", + reflect.TypeOf((*KubeLimitRangeList)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "addDependency", GoMethod: "AddDependency"}, + _jsii_.MemberMethod{JsiiMethod: "addJsonPatch", GoMethod: "AddJsonPatch"}, + _jsii_.MemberProperty{JsiiProperty: "apiGroup", GoGetter: "ApiGroup"}, + _jsii_.MemberProperty{JsiiProperty: "apiVersion", GoGetter: "ApiVersion"}, + _jsii_.MemberProperty{JsiiProperty: "chart", GoGetter: "AddHelm"}, + _jsii_.MemberProperty{JsiiProperty: "kind", GoGetter: "Kind"}, + _jsii_.MemberProperty{JsiiProperty: "metadata", GoGetter: "Metadata"}, + _jsii_.MemberProperty{JsiiProperty: "name", GoGetter: "Name"}, + _jsii_.MemberProperty{JsiiProperty: "node", GoGetter: "Node"}, + _jsii_.MemberMethod{JsiiMethod: "toJson", GoMethod: "ToJson"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + }, + func() interface{} { + j := jsiiProxy_KubeLimitRangeList{} + _jsii_.InitJsiiProxy(&j.Type__cdk8sApiObject) + return &j + }, + ) + _jsii_.RegisterStruct( + "k8s.KubeLimitRangeListProps", + reflect.TypeOf((*KubeLimitRangeListProps)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.KubeLimitRangeProps", + reflect.TypeOf((*KubeLimitRangeProps)(nil)).Elem(), + ) + _jsii_.RegisterClass( + "k8s.KubeLocalSubjectAccessReview", + reflect.TypeOf((*KubeLocalSubjectAccessReview)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "addDependency", GoMethod: "AddDependency"}, + _jsii_.MemberMethod{JsiiMethod: "addJsonPatch", GoMethod: "AddJsonPatch"}, + _jsii_.MemberProperty{JsiiProperty: "apiGroup", GoGetter: "ApiGroup"}, + _jsii_.MemberProperty{JsiiProperty: "apiVersion", GoGetter: "ApiVersion"}, + _jsii_.MemberProperty{JsiiProperty: "chart", GoGetter: "AddHelm"}, + _jsii_.MemberProperty{JsiiProperty: "kind", GoGetter: "Kind"}, + _jsii_.MemberProperty{JsiiProperty: "metadata", GoGetter: "Metadata"}, + _jsii_.MemberProperty{JsiiProperty: "name", GoGetter: "Name"}, + _jsii_.MemberProperty{JsiiProperty: "node", GoGetter: "Node"}, + _jsii_.MemberMethod{JsiiMethod: "toJson", GoMethod: "ToJson"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + }, + func() interface{} { + j := jsiiProxy_KubeLocalSubjectAccessReview{} + _jsii_.InitJsiiProxy(&j.Type__cdk8sApiObject) + return &j + }, + ) + _jsii_.RegisterStruct( + "k8s.KubeLocalSubjectAccessReviewProps", + reflect.TypeOf((*KubeLocalSubjectAccessReviewProps)(nil)).Elem(), + ) + _jsii_.RegisterClass( + "k8s.KubeMutatingWebhookConfiguration", + reflect.TypeOf((*KubeMutatingWebhookConfiguration)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "addDependency", GoMethod: "AddDependency"}, + _jsii_.MemberMethod{JsiiMethod: "addJsonPatch", GoMethod: "AddJsonPatch"}, + _jsii_.MemberProperty{JsiiProperty: "apiGroup", GoGetter: "ApiGroup"}, + _jsii_.MemberProperty{JsiiProperty: "apiVersion", GoGetter: "ApiVersion"}, + _jsii_.MemberProperty{JsiiProperty: "chart", GoGetter: "AddHelm"}, + _jsii_.MemberProperty{JsiiProperty: "kind", GoGetter: "Kind"}, + _jsii_.MemberProperty{JsiiProperty: "metadata", GoGetter: "Metadata"}, + _jsii_.MemberProperty{JsiiProperty: "name", GoGetter: "Name"}, + _jsii_.MemberProperty{JsiiProperty: "node", GoGetter: "Node"}, + _jsii_.MemberMethod{JsiiMethod: "toJson", GoMethod: "ToJson"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + }, + func() interface{} { + j := jsiiProxy_KubeMutatingWebhookConfiguration{} + _jsii_.InitJsiiProxy(&j.Type__cdk8sApiObject) + return &j + }, + ) + _jsii_.RegisterClass( + "k8s.KubeMutatingWebhookConfigurationList", + reflect.TypeOf((*KubeMutatingWebhookConfigurationList)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "addDependency", GoMethod: "AddDependency"}, + _jsii_.MemberMethod{JsiiMethod: "addJsonPatch", GoMethod: "AddJsonPatch"}, + _jsii_.MemberProperty{JsiiProperty: "apiGroup", GoGetter: "ApiGroup"}, + _jsii_.MemberProperty{JsiiProperty: "apiVersion", GoGetter: "ApiVersion"}, + _jsii_.MemberProperty{JsiiProperty: "chart", GoGetter: "AddHelm"}, + _jsii_.MemberProperty{JsiiProperty: "kind", GoGetter: "Kind"}, + _jsii_.MemberProperty{JsiiProperty: "metadata", GoGetter: "Metadata"}, + _jsii_.MemberProperty{JsiiProperty: "name", GoGetter: "Name"}, + _jsii_.MemberProperty{JsiiProperty: "node", GoGetter: "Node"}, + _jsii_.MemberMethod{JsiiMethod: "toJson", GoMethod: "ToJson"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + }, + func() interface{} { + j := jsiiProxy_KubeMutatingWebhookConfigurationList{} + _jsii_.InitJsiiProxy(&j.Type__cdk8sApiObject) + return &j + }, + ) + _jsii_.RegisterStruct( + "k8s.KubeMutatingWebhookConfigurationListProps", + reflect.TypeOf((*KubeMutatingWebhookConfigurationListProps)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.KubeMutatingWebhookConfigurationProps", + reflect.TypeOf((*KubeMutatingWebhookConfigurationProps)(nil)).Elem(), + ) + _jsii_.RegisterClass( + "k8s.KubeNamespace", + reflect.TypeOf((*KubeNamespace)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "addDependency", GoMethod: "AddDependency"}, + _jsii_.MemberMethod{JsiiMethod: "addJsonPatch", GoMethod: "AddJsonPatch"}, + _jsii_.MemberProperty{JsiiProperty: "apiGroup", GoGetter: "ApiGroup"}, + _jsii_.MemberProperty{JsiiProperty: "apiVersion", GoGetter: "ApiVersion"}, + _jsii_.MemberProperty{JsiiProperty: "chart", GoGetter: "AddHelm"}, + _jsii_.MemberProperty{JsiiProperty: "kind", GoGetter: "Kind"}, + _jsii_.MemberProperty{JsiiProperty: "metadata", GoGetter: "Metadata"}, + _jsii_.MemberProperty{JsiiProperty: "name", GoGetter: "Name"}, + _jsii_.MemberProperty{JsiiProperty: "node", GoGetter: "Node"}, + _jsii_.MemberMethod{JsiiMethod: "toJson", GoMethod: "ToJson"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + }, + func() interface{} { + j := jsiiProxy_KubeNamespace{} + _jsii_.InitJsiiProxy(&j.Type__cdk8sApiObject) + return &j + }, + ) + _jsii_.RegisterClass( + "k8s.KubeNamespaceList", + reflect.TypeOf((*KubeNamespaceList)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "addDependency", GoMethod: "AddDependency"}, + _jsii_.MemberMethod{JsiiMethod: "addJsonPatch", GoMethod: "AddJsonPatch"}, + _jsii_.MemberProperty{JsiiProperty: "apiGroup", GoGetter: "ApiGroup"}, + _jsii_.MemberProperty{JsiiProperty: "apiVersion", GoGetter: "ApiVersion"}, + _jsii_.MemberProperty{JsiiProperty: "chart", GoGetter: "AddHelm"}, + _jsii_.MemberProperty{JsiiProperty: "kind", GoGetter: "Kind"}, + _jsii_.MemberProperty{JsiiProperty: "metadata", GoGetter: "Metadata"}, + _jsii_.MemberProperty{JsiiProperty: "name", GoGetter: "Name"}, + _jsii_.MemberProperty{JsiiProperty: "node", GoGetter: "Node"}, + _jsii_.MemberMethod{JsiiMethod: "toJson", GoMethod: "ToJson"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + }, + func() interface{} { + j := jsiiProxy_KubeNamespaceList{} + _jsii_.InitJsiiProxy(&j.Type__cdk8sApiObject) + return &j + }, + ) + _jsii_.RegisterStruct( + "k8s.KubeNamespaceListProps", + reflect.TypeOf((*KubeNamespaceListProps)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.KubeNamespaceProps", + reflect.TypeOf((*KubeNamespaceProps)(nil)).Elem(), + ) + _jsii_.RegisterClass( + "k8s.KubeNetworkPolicy", + reflect.TypeOf((*KubeNetworkPolicy)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "addDependency", GoMethod: "AddDependency"}, + _jsii_.MemberMethod{JsiiMethod: "addJsonPatch", GoMethod: "AddJsonPatch"}, + _jsii_.MemberProperty{JsiiProperty: "apiGroup", GoGetter: "ApiGroup"}, + _jsii_.MemberProperty{JsiiProperty: "apiVersion", GoGetter: "ApiVersion"}, + _jsii_.MemberProperty{JsiiProperty: "chart", GoGetter: "AddHelm"}, + _jsii_.MemberProperty{JsiiProperty: "kind", GoGetter: "Kind"}, + _jsii_.MemberProperty{JsiiProperty: "metadata", GoGetter: "Metadata"}, + _jsii_.MemberProperty{JsiiProperty: "name", GoGetter: "Name"}, + _jsii_.MemberProperty{JsiiProperty: "node", GoGetter: "Node"}, + _jsii_.MemberMethod{JsiiMethod: "toJson", GoMethod: "ToJson"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + }, + func() interface{} { + j := jsiiProxy_KubeNetworkPolicy{} + _jsii_.InitJsiiProxy(&j.Type__cdk8sApiObject) + return &j + }, + ) + _jsii_.RegisterClass( + "k8s.KubeNetworkPolicyList", + reflect.TypeOf((*KubeNetworkPolicyList)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "addDependency", GoMethod: "AddDependency"}, + _jsii_.MemberMethod{JsiiMethod: "addJsonPatch", GoMethod: "AddJsonPatch"}, + _jsii_.MemberProperty{JsiiProperty: "apiGroup", GoGetter: "ApiGroup"}, + _jsii_.MemberProperty{JsiiProperty: "apiVersion", GoGetter: "ApiVersion"}, + _jsii_.MemberProperty{JsiiProperty: "chart", GoGetter: "AddHelm"}, + _jsii_.MemberProperty{JsiiProperty: "kind", GoGetter: "Kind"}, + _jsii_.MemberProperty{JsiiProperty: "metadata", GoGetter: "Metadata"}, + _jsii_.MemberProperty{JsiiProperty: "name", GoGetter: "Name"}, + _jsii_.MemberProperty{JsiiProperty: "node", GoGetter: "Node"}, + _jsii_.MemberMethod{JsiiMethod: "toJson", GoMethod: "ToJson"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + }, + func() interface{} { + j := jsiiProxy_KubeNetworkPolicyList{} + _jsii_.InitJsiiProxy(&j.Type__cdk8sApiObject) + return &j + }, + ) + _jsii_.RegisterStruct( + "k8s.KubeNetworkPolicyListProps", + reflect.TypeOf((*KubeNetworkPolicyListProps)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.KubeNetworkPolicyProps", + reflect.TypeOf((*KubeNetworkPolicyProps)(nil)).Elem(), + ) + _jsii_.RegisterClass( + "k8s.KubeNode", + reflect.TypeOf((*KubeNode)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "addDependency", GoMethod: "AddDependency"}, + _jsii_.MemberMethod{JsiiMethod: "addJsonPatch", GoMethod: "AddJsonPatch"}, + _jsii_.MemberProperty{JsiiProperty: "apiGroup", GoGetter: "ApiGroup"}, + _jsii_.MemberProperty{JsiiProperty: "apiVersion", GoGetter: "ApiVersion"}, + _jsii_.MemberProperty{JsiiProperty: "chart", GoGetter: "AddHelm"}, + _jsii_.MemberProperty{JsiiProperty: "kind", GoGetter: "Kind"}, + _jsii_.MemberProperty{JsiiProperty: "metadata", GoGetter: "Metadata"}, + _jsii_.MemberProperty{JsiiProperty: "name", GoGetter: "Name"}, + _jsii_.MemberProperty{JsiiProperty: "node", GoGetter: "Node"}, + _jsii_.MemberMethod{JsiiMethod: "toJson", GoMethod: "ToJson"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + }, + func() interface{} { + j := jsiiProxy_KubeNode{} + _jsii_.InitJsiiProxy(&j.Type__cdk8sApiObject) + return &j + }, + ) + _jsii_.RegisterClass( + "k8s.KubeNodeList", + reflect.TypeOf((*KubeNodeList)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "addDependency", GoMethod: "AddDependency"}, + _jsii_.MemberMethod{JsiiMethod: "addJsonPatch", GoMethod: "AddJsonPatch"}, + _jsii_.MemberProperty{JsiiProperty: "apiGroup", GoGetter: "ApiGroup"}, + _jsii_.MemberProperty{JsiiProperty: "apiVersion", GoGetter: "ApiVersion"}, + _jsii_.MemberProperty{JsiiProperty: "chart", GoGetter: "AddHelm"}, + _jsii_.MemberProperty{JsiiProperty: "kind", GoGetter: "Kind"}, + _jsii_.MemberProperty{JsiiProperty: "metadata", GoGetter: "Metadata"}, + _jsii_.MemberProperty{JsiiProperty: "name", GoGetter: "Name"}, + _jsii_.MemberProperty{JsiiProperty: "node", GoGetter: "Node"}, + _jsii_.MemberMethod{JsiiMethod: "toJson", GoMethod: "ToJson"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + }, + func() interface{} { + j := jsiiProxy_KubeNodeList{} + _jsii_.InitJsiiProxy(&j.Type__cdk8sApiObject) + return &j + }, + ) + _jsii_.RegisterStruct( + "k8s.KubeNodeListProps", + reflect.TypeOf((*KubeNodeListProps)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.KubeNodeProps", + reflect.TypeOf((*KubeNodeProps)(nil)).Elem(), + ) + _jsii_.RegisterClass( + "k8s.KubePersistentVolume", + reflect.TypeOf((*KubePersistentVolume)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "addDependency", GoMethod: "AddDependency"}, + _jsii_.MemberMethod{JsiiMethod: "addJsonPatch", GoMethod: "AddJsonPatch"}, + _jsii_.MemberProperty{JsiiProperty: "apiGroup", GoGetter: "ApiGroup"}, + _jsii_.MemberProperty{JsiiProperty: "apiVersion", GoGetter: "ApiVersion"}, + _jsii_.MemberProperty{JsiiProperty: "chart", GoGetter: "AddHelm"}, + _jsii_.MemberProperty{JsiiProperty: "kind", GoGetter: "Kind"}, + _jsii_.MemberProperty{JsiiProperty: "metadata", GoGetter: "Metadata"}, + _jsii_.MemberProperty{JsiiProperty: "name", GoGetter: "Name"}, + _jsii_.MemberProperty{JsiiProperty: "node", GoGetter: "Node"}, + _jsii_.MemberMethod{JsiiMethod: "toJson", GoMethod: "ToJson"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + }, + func() interface{} { + j := jsiiProxy_KubePersistentVolume{} + _jsii_.InitJsiiProxy(&j.Type__cdk8sApiObject) + return &j + }, + ) + _jsii_.RegisterClass( + "k8s.KubePersistentVolumeClaim", + reflect.TypeOf((*KubePersistentVolumeClaim)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "addDependency", GoMethod: "AddDependency"}, + _jsii_.MemberMethod{JsiiMethod: "addJsonPatch", GoMethod: "AddJsonPatch"}, + _jsii_.MemberProperty{JsiiProperty: "apiGroup", GoGetter: "ApiGroup"}, + _jsii_.MemberProperty{JsiiProperty: "apiVersion", GoGetter: "ApiVersion"}, + _jsii_.MemberProperty{JsiiProperty: "chart", GoGetter: "AddHelm"}, + _jsii_.MemberProperty{JsiiProperty: "kind", GoGetter: "Kind"}, + _jsii_.MemberProperty{JsiiProperty: "metadata", GoGetter: "Metadata"}, + _jsii_.MemberProperty{JsiiProperty: "name", GoGetter: "Name"}, + _jsii_.MemberProperty{JsiiProperty: "node", GoGetter: "Node"}, + _jsii_.MemberMethod{JsiiMethod: "toJson", GoMethod: "ToJson"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + }, + func() interface{} { + j := jsiiProxy_KubePersistentVolumeClaim{} + _jsii_.InitJsiiProxy(&j.Type__cdk8sApiObject) + return &j + }, + ) + _jsii_.RegisterClass( + "k8s.KubePersistentVolumeClaimList", + reflect.TypeOf((*KubePersistentVolumeClaimList)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "addDependency", GoMethod: "AddDependency"}, + _jsii_.MemberMethod{JsiiMethod: "addJsonPatch", GoMethod: "AddJsonPatch"}, + _jsii_.MemberProperty{JsiiProperty: "apiGroup", GoGetter: "ApiGroup"}, + _jsii_.MemberProperty{JsiiProperty: "apiVersion", GoGetter: "ApiVersion"}, + _jsii_.MemberProperty{JsiiProperty: "chart", GoGetter: "AddHelm"}, + _jsii_.MemberProperty{JsiiProperty: "kind", GoGetter: "Kind"}, + _jsii_.MemberProperty{JsiiProperty: "metadata", GoGetter: "Metadata"}, + _jsii_.MemberProperty{JsiiProperty: "name", GoGetter: "Name"}, + _jsii_.MemberProperty{JsiiProperty: "node", GoGetter: "Node"}, + _jsii_.MemberMethod{JsiiMethod: "toJson", GoMethod: "ToJson"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + }, + func() interface{} { + j := jsiiProxy_KubePersistentVolumeClaimList{} + _jsii_.InitJsiiProxy(&j.Type__cdk8sApiObject) + return &j + }, + ) + _jsii_.RegisterStruct( + "k8s.KubePersistentVolumeClaimListProps", + reflect.TypeOf((*KubePersistentVolumeClaimListProps)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.KubePersistentVolumeClaimProps", + reflect.TypeOf((*KubePersistentVolumeClaimProps)(nil)).Elem(), + ) + _jsii_.RegisterClass( + "k8s.KubePersistentVolumeList", + reflect.TypeOf((*KubePersistentVolumeList)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "addDependency", GoMethod: "AddDependency"}, + _jsii_.MemberMethod{JsiiMethod: "addJsonPatch", GoMethod: "AddJsonPatch"}, + _jsii_.MemberProperty{JsiiProperty: "apiGroup", GoGetter: "ApiGroup"}, + _jsii_.MemberProperty{JsiiProperty: "apiVersion", GoGetter: "ApiVersion"}, + _jsii_.MemberProperty{JsiiProperty: "chart", GoGetter: "AddHelm"}, + _jsii_.MemberProperty{JsiiProperty: "kind", GoGetter: "Kind"}, + _jsii_.MemberProperty{JsiiProperty: "metadata", GoGetter: "Metadata"}, + _jsii_.MemberProperty{JsiiProperty: "name", GoGetter: "Name"}, + _jsii_.MemberProperty{JsiiProperty: "node", GoGetter: "Node"}, + _jsii_.MemberMethod{JsiiMethod: "toJson", GoMethod: "ToJson"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + }, + func() interface{} { + j := jsiiProxy_KubePersistentVolumeList{} + _jsii_.InitJsiiProxy(&j.Type__cdk8sApiObject) + return &j + }, + ) + _jsii_.RegisterStruct( + "k8s.KubePersistentVolumeListProps", + reflect.TypeOf((*KubePersistentVolumeListProps)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.KubePersistentVolumeProps", + reflect.TypeOf((*KubePersistentVolumeProps)(nil)).Elem(), + ) + _jsii_.RegisterClass( + "k8s.KubePod", + reflect.TypeOf((*KubePod)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "addDependency", GoMethod: "AddDependency"}, + _jsii_.MemberMethod{JsiiMethod: "addJsonPatch", GoMethod: "AddJsonPatch"}, + _jsii_.MemberProperty{JsiiProperty: "apiGroup", GoGetter: "ApiGroup"}, + _jsii_.MemberProperty{JsiiProperty: "apiVersion", GoGetter: "ApiVersion"}, + _jsii_.MemberProperty{JsiiProperty: "chart", GoGetter: "AddHelm"}, + _jsii_.MemberProperty{JsiiProperty: "kind", GoGetter: "Kind"}, + _jsii_.MemberProperty{JsiiProperty: "metadata", GoGetter: "Metadata"}, + _jsii_.MemberProperty{JsiiProperty: "name", GoGetter: "Name"}, + _jsii_.MemberProperty{JsiiProperty: "node", GoGetter: "Node"}, + _jsii_.MemberMethod{JsiiMethod: "toJson", GoMethod: "ToJson"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + }, + func() interface{} { + j := jsiiProxy_KubePod{} + _jsii_.InitJsiiProxy(&j.Type__cdk8sApiObject) + return &j + }, + ) + _jsii_.RegisterClass( + "k8s.KubePodDisruptionBudget", + reflect.TypeOf((*KubePodDisruptionBudget)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "addDependency", GoMethod: "AddDependency"}, + _jsii_.MemberMethod{JsiiMethod: "addJsonPatch", GoMethod: "AddJsonPatch"}, + _jsii_.MemberProperty{JsiiProperty: "apiGroup", GoGetter: "ApiGroup"}, + _jsii_.MemberProperty{JsiiProperty: "apiVersion", GoGetter: "ApiVersion"}, + _jsii_.MemberProperty{JsiiProperty: "chart", GoGetter: "AddHelm"}, + _jsii_.MemberProperty{JsiiProperty: "kind", GoGetter: "Kind"}, + _jsii_.MemberProperty{JsiiProperty: "metadata", GoGetter: "Metadata"}, + _jsii_.MemberProperty{JsiiProperty: "name", GoGetter: "Name"}, + _jsii_.MemberProperty{JsiiProperty: "node", GoGetter: "Node"}, + _jsii_.MemberMethod{JsiiMethod: "toJson", GoMethod: "ToJson"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + }, + func() interface{} { + j := jsiiProxy_KubePodDisruptionBudget{} + _jsii_.InitJsiiProxy(&j.Type__cdk8sApiObject) + return &j + }, + ) + _jsii_.RegisterClass( + "k8s.KubePodDisruptionBudgetList", + reflect.TypeOf((*KubePodDisruptionBudgetList)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "addDependency", GoMethod: "AddDependency"}, + _jsii_.MemberMethod{JsiiMethod: "addJsonPatch", GoMethod: "AddJsonPatch"}, + _jsii_.MemberProperty{JsiiProperty: "apiGroup", GoGetter: "ApiGroup"}, + _jsii_.MemberProperty{JsiiProperty: "apiVersion", GoGetter: "ApiVersion"}, + _jsii_.MemberProperty{JsiiProperty: "chart", GoGetter: "AddHelm"}, + _jsii_.MemberProperty{JsiiProperty: "kind", GoGetter: "Kind"}, + _jsii_.MemberProperty{JsiiProperty: "metadata", GoGetter: "Metadata"}, + _jsii_.MemberProperty{JsiiProperty: "name", GoGetter: "Name"}, + _jsii_.MemberProperty{JsiiProperty: "node", GoGetter: "Node"}, + _jsii_.MemberMethod{JsiiMethod: "toJson", GoMethod: "ToJson"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + }, + func() interface{} { + j := jsiiProxy_KubePodDisruptionBudgetList{} + _jsii_.InitJsiiProxy(&j.Type__cdk8sApiObject) + return &j + }, + ) + _jsii_.RegisterStruct( + "k8s.KubePodDisruptionBudgetListProps", + reflect.TypeOf((*KubePodDisruptionBudgetListProps)(nil)).Elem(), + ) + _jsii_.RegisterClass( + "k8s.KubePodDisruptionBudgetListV1Beta1", + reflect.TypeOf((*KubePodDisruptionBudgetListV1Beta1)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "addDependency", GoMethod: "AddDependency"}, + _jsii_.MemberMethod{JsiiMethod: "addJsonPatch", GoMethod: "AddJsonPatch"}, + _jsii_.MemberProperty{JsiiProperty: "apiGroup", GoGetter: "ApiGroup"}, + _jsii_.MemberProperty{JsiiProperty: "apiVersion", GoGetter: "ApiVersion"}, + _jsii_.MemberProperty{JsiiProperty: "chart", GoGetter: "AddHelm"}, + _jsii_.MemberProperty{JsiiProperty: "kind", GoGetter: "Kind"}, + _jsii_.MemberProperty{JsiiProperty: "metadata", GoGetter: "Metadata"}, + _jsii_.MemberProperty{JsiiProperty: "name", GoGetter: "Name"}, + _jsii_.MemberProperty{JsiiProperty: "node", GoGetter: "Node"}, + _jsii_.MemberMethod{JsiiMethod: "toJson", GoMethod: "ToJson"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + }, + func() interface{} { + j := jsiiProxy_KubePodDisruptionBudgetListV1Beta1{} + _jsii_.InitJsiiProxy(&j.Type__cdk8sApiObject) + return &j + }, + ) + _jsii_.RegisterStruct( + "k8s.KubePodDisruptionBudgetListV1Beta1Props", + reflect.TypeOf((*KubePodDisruptionBudgetListV1Beta1Props)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.KubePodDisruptionBudgetProps", + reflect.TypeOf((*KubePodDisruptionBudgetProps)(nil)).Elem(), + ) + _jsii_.RegisterClass( + "k8s.KubePodDisruptionBudgetV1Beta1", + reflect.TypeOf((*KubePodDisruptionBudgetV1Beta1)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "addDependency", GoMethod: "AddDependency"}, + _jsii_.MemberMethod{JsiiMethod: "addJsonPatch", GoMethod: "AddJsonPatch"}, + _jsii_.MemberProperty{JsiiProperty: "apiGroup", GoGetter: "ApiGroup"}, + _jsii_.MemberProperty{JsiiProperty: "apiVersion", GoGetter: "ApiVersion"}, + _jsii_.MemberProperty{JsiiProperty: "chart", GoGetter: "AddHelm"}, + _jsii_.MemberProperty{JsiiProperty: "kind", GoGetter: "Kind"}, + _jsii_.MemberProperty{JsiiProperty: "metadata", GoGetter: "Metadata"}, + _jsii_.MemberProperty{JsiiProperty: "name", GoGetter: "Name"}, + _jsii_.MemberProperty{JsiiProperty: "node", GoGetter: "Node"}, + _jsii_.MemberMethod{JsiiMethod: "toJson", GoMethod: "ToJson"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + }, + func() interface{} { + j := jsiiProxy_KubePodDisruptionBudgetV1Beta1{} + _jsii_.InitJsiiProxy(&j.Type__cdk8sApiObject) + return &j + }, + ) + _jsii_.RegisterStruct( + "k8s.KubePodDisruptionBudgetV1Beta1Props", + reflect.TypeOf((*KubePodDisruptionBudgetV1Beta1Props)(nil)).Elem(), + ) + _jsii_.RegisterClass( + "k8s.KubePodList", + reflect.TypeOf((*KubePodList)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "addDependency", GoMethod: "AddDependency"}, + _jsii_.MemberMethod{JsiiMethod: "addJsonPatch", GoMethod: "AddJsonPatch"}, + _jsii_.MemberProperty{JsiiProperty: "apiGroup", GoGetter: "ApiGroup"}, + _jsii_.MemberProperty{JsiiProperty: "apiVersion", GoGetter: "ApiVersion"}, + _jsii_.MemberProperty{JsiiProperty: "chart", GoGetter: "AddHelm"}, + _jsii_.MemberProperty{JsiiProperty: "kind", GoGetter: "Kind"}, + _jsii_.MemberProperty{JsiiProperty: "metadata", GoGetter: "Metadata"}, + _jsii_.MemberProperty{JsiiProperty: "name", GoGetter: "Name"}, + _jsii_.MemberProperty{JsiiProperty: "node", GoGetter: "Node"}, + _jsii_.MemberMethod{JsiiMethod: "toJson", GoMethod: "ToJson"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + }, + func() interface{} { + j := jsiiProxy_KubePodList{} + _jsii_.InitJsiiProxy(&j.Type__cdk8sApiObject) + return &j + }, + ) + _jsii_.RegisterStruct( + "k8s.KubePodListProps", + reflect.TypeOf((*KubePodListProps)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.KubePodProps", + reflect.TypeOf((*KubePodProps)(nil)).Elem(), + ) + _jsii_.RegisterClass( + "k8s.KubePodSecurityPolicyListV1Beta1", + reflect.TypeOf((*KubePodSecurityPolicyListV1Beta1)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "addDependency", GoMethod: "AddDependency"}, + _jsii_.MemberMethod{JsiiMethod: "addJsonPatch", GoMethod: "AddJsonPatch"}, + _jsii_.MemberProperty{JsiiProperty: "apiGroup", GoGetter: "ApiGroup"}, + _jsii_.MemberProperty{JsiiProperty: "apiVersion", GoGetter: "ApiVersion"}, + _jsii_.MemberProperty{JsiiProperty: "chart", GoGetter: "AddHelm"}, + _jsii_.MemberProperty{JsiiProperty: "kind", GoGetter: "Kind"}, + _jsii_.MemberProperty{JsiiProperty: "metadata", GoGetter: "Metadata"}, + _jsii_.MemberProperty{JsiiProperty: "name", GoGetter: "Name"}, + _jsii_.MemberProperty{JsiiProperty: "node", GoGetter: "Node"}, + _jsii_.MemberMethod{JsiiMethod: "toJson", GoMethod: "ToJson"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + }, + func() interface{} { + j := jsiiProxy_KubePodSecurityPolicyListV1Beta1{} + _jsii_.InitJsiiProxy(&j.Type__cdk8sApiObject) + return &j + }, + ) + _jsii_.RegisterStruct( + "k8s.KubePodSecurityPolicyListV1Beta1Props", + reflect.TypeOf((*KubePodSecurityPolicyListV1Beta1Props)(nil)).Elem(), + ) + _jsii_.RegisterClass( + "k8s.KubePodSecurityPolicyV1Beta1", + reflect.TypeOf((*KubePodSecurityPolicyV1Beta1)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "addDependency", GoMethod: "AddDependency"}, + _jsii_.MemberMethod{JsiiMethod: "addJsonPatch", GoMethod: "AddJsonPatch"}, + _jsii_.MemberProperty{JsiiProperty: "apiGroup", GoGetter: "ApiGroup"}, + _jsii_.MemberProperty{JsiiProperty: "apiVersion", GoGetter: "ApiVersion"}, + _jsii_.MemberProperty{JsiiProperty: "chart", GoGetter: "AddHelm"}, + _jsii_.MemberProperty{JsiiProperty: "kind", GoGetter: "Kind"}, + _jsii_.MemberProperty{JsiiProperty: "metadata", GoGetter: "Metadata"}, + _jsii_.MemberProperty{JsiiProperty: "name", GoGetter: "Name"}, + _jsii_.MemberProperty{JsiiProperty: "node", GoGetter: "Node"}, + _jsii_.MemberMethod{JsiiMethod: "toJson", GoMethod: "ToJson"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + }, + func() interface{} { + j := jsiiProxy_KubePodSecurityPolicyV1Beta1{} + _jsii_.InitJsiiProxy(&j.Type__cdk8sApiObject) + return &j + }, + ) + _jsii_.RegisterStruct( + "k8s.KubePodSecurityPolicyV1Beta1Props", + reflect.TypeOf((*KubePodSecurityPolicyV1Beta1Props)(nil)).Elem(), + ) + _jsii_.RegisterClass( + "k8s.KubePodTemplate", + reflect.TypeOf((*KubePodTemplate)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "addDependency", GoMethod: "AddDependency"}, + _jsii_.MemberMethod{JsiiMethod: "addJsonPatch", GoMethod: "AddJsonPatch"}, + _jsii_.MemberProperty{JsiiProperty: "apiGroup", GoGetter: "ApiGroup"}, + _jsii_.MemberProperty{JsiiProperty: "apiVersion", GoGetter: "ApiVersion"}, + _jsii_.MemberProperty{JsiiProperty: "chart", GoGetter: "AddHelm"}, + _jsii_.MemberProperty{JsiiProperty: "kind", GoGetter: "Kind"}, + _jsii_.MemberProperty{JsiiProperty: "metadata", GoGetter: "Metadata"}, + _jsii_.MemberProperty{JsiiProperty: "name", GoGetter: "Name"}, + _jsii_.MemberProperty{JsiiProperty: "node", GoGetter: "Node"}, + _jsii_.MemberMethod{JsiiMethod: "toJson", GoMethod: "ToJson"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + }, + func() interface{} { + j := jsiiProxy_KubePodTemplate{} + _jsii_.InitJsiiProxy(&j.Type__cdk8sApiObject) + return &j + }, + ) + _jsii_.RegisterClass( + "k8s.KubePodTemplateList", + reflect.TypeOf((*KubePodTemplateList)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "addDependency", GoMethod: "AddDependency"}, + _jsii_.MemberMethod{JsiiMethod: "addJsonPatch", GoMethod: "AddJsonPatch"}, + _jsii_.MemberProperty{JsiiProperty: "apiGroup", GoGetter: "ApiGroup"}, + _jsii_.MemberProperty{JsiiProperty: "apiVersion", GoGetter: "ApiVersion"}, + _jsii_.MemberProperty{JsiiProperty: "chart", GoGetter: "AddHelm"}, + _jsii_.MemberProperty{JsiiProperty: "kind", GoGetter: "Kind"}, + _jsii_.MemberProperty{JsiiProperty: "metadata", GoGetter: "Metadata"}, + _jsii_.MemberProperty{JsiiProperty: "name", GoGetter: "Name"}, + _jsii_.MemberProperty{JsiiProperty: "node", GoGetter: "Node"}, + _jsii_.MemberMethod{JsiiMethod: "toJson", GoMethod: "ToJson"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + }, + func() interface{} { + j := jsiiProxy_KubePodTemplateList{} + _jsii_.InitJsiiProxy(&j.Type__cdk8sApiObject) + return &j + }, + ) + _jsii_.RegisterStruct( + "k8s.KubePodTemplateListProps", + reflect.TypeOf((*KubePodTemplateListProps)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.KubePodTemplateProps", + reflect.TypeOf((*KubePodTemplateProps)(nil)).Elem(), + ) + _jsii_.RegisterClass( + "k8s.KubePriorityClass", + reflect.TypeOf((*KubePriorityClass)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "addDependency", GoMethod: "AddDependency"}, + _jsii_.MemberMethod{JsiiMethod: "addJsonPatch", GoMethod: "AddJsonPatch"}, + _jsii_.MemberProperty{JsiiProperty: "apiGroup", GoGetter: "ApiGroup"}, + _jsii_.MemberProperty{JsiiProperty: "apiVersion", GoGetter: "ApiVersion"}, + _jsii_.MemberProperty{JsiiProperty: "chart", GoGetter: "AddHelm"}, + _jsii_.MemberProperty{JsiiProperty: "kind", GoGetter: "Kind"}, + _jsii_.MemberProperty{JsiiProperty: "metadata", GoGetter: "Metadata"}, + _jsii_.MemberProperty{JsiiProperty: "name", GoGetter: "Name"}, + _jsii_.MemberProperty{JsiiProperty: "node", GoGetter: "Node"}, + _jsii_.MemberMethod{JsiiMethod: "toJson", GoMethod: "ToJson"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + }, + func() interface{} { + j := jsiiProxy_KubePriorityClass{} + _jsii_.InitJsiiProxy(&j.Type__cdk8sApiObject) + return &j + }, + ) + _jsii_.RegisterClass( + "k8s.KubePriorityClassList", + reflect.TypeOf((*KubePriorityClassList)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "addDependency", GoMethod: "AddDependency"}, + _jsii_.MemberMethod{JsiiMethod: "addJsonPatch", GoMethod: "AddJsonPatch"}, + _jsii_.MemberProperty{JsiiProperty: "apiGroup", GoGetter: "ApiGroup"}, + _jsii_.MemberProperty{JsiiProperty: "apiVersion", GoGetter: "ApiVersion"}, + _jsii_.MemberProperty{JsiiProperty: "chart", GoGetter: "AddHelm"}, + _jsii_.MemberProperty{JsiiProperty: "kind", GoGetter: "Kind"}, + _jsii_.MemberProperty{JsiiProperty: "metadata", GoGetter: "Metadata"}, + _jsii_.MemberProperty{JsiiProperty: "name", GoGetter: "Name"}, + _jsii_.MemberProperty{JsiiProperty: "node", GoGetter: "Node"}, + _jsii_.MemberMethod{JsiiMethod: "toJson", GoMethod: "ToJson"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + }, + func() interface{} { + j := jsiiProxy_KubePriorityClassList{} + _jsii_.InitJsiiProxy(&j.Type__cdk8sApiObject) + return &j + }, + ) + _jsii_.RegisterStruct( + "k8s.KubePriorityClassListProps", + reflect.TypeOf((*KubePriorityClassListProps)(nil)).Elem(), + ) + _jsii_.RegisterClass( + "k8s.KubePriorityClassListV1Alpha1", + reflect.TypeOf((*KubePriorityClassListV1Alpha1)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "addDependency", GoMethod: "AddDependency"}, + _jsii_.MemberMethod{JsiiMethod: "addJsonPatch", GoMethod: "AddJsonPatch"}, + _jsii_.MemberProperty{JsiiProperty: "apiGroup", GoGetter: "ApiGroup"}, + _jsii_.MemberProperty{JsiiProperty: "apiVersion", GoGetter: "ApiVersion"}, + _jsii_.MemberProperty{JsiiProperty: "chart", GoGetter: "AddHelm"}, + _jsii_.MemberProperty{JsiiProperty: "kind", GoGetter: "Kind"}, + _jsii_.MemberProperty{JsiiProperty: "metadata", GoGetter: "Metadata"}, + _jsii_.MemberProperty{JsiiProperty: "name", GoGetter: "Name"}, + _jsii_.MemberProperty{JsiiProperty: "node", GoGetter: "Node"}, + _jsii_.MemberMethod{JsiiMethod: "toJson", GoMethod: "ToJson"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + }, + func() interface{} { + j := jsiiProxy_KubePriorityClassListV1Alpha1{} + _jsii_.InitJsiiProxy(&j.Type__cdk8sApiObject) + return &j + }, + ) + _jsii_.RegisterStruct( + "k8s.KubePriorityClassListV1Alpha1Props", + reflect.TypeOf((*KubePriorityClassListV1Alpha1Props)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.KubePriorityClassProps", + reflect.TypeOf((*KubePriorityClassProps)(nil)).Elem(), + ) + _jsii_.RegisterClass( + "k8s.KubePriorityClassV1Alpha1", + reflect.TypeOf((*KubePriorityClassV1Alpha1)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "addDependency", GoMethod: "AddDependency"}, + _jsii_.MemberMethod{JsiiMethod: "addJsonPatch", GoMethod: "AddJsonPatch"}, + _jsii_.MemberProperty{JsiiProperty: "apiGroup", GoGetter: "ApiGroup"}, + _jsii_.MemberProperty{JsiiProperty: "apiVersion", GoGetter: "ApiVersion"}, + _jsii_.MemberProperty{JsiiProperty: "chart", GoGetter: "AddHelm"}, + _jsii_.MemberProperty{JsiiProperty: "kind", GoGetter: "Kind"}, + _jsii_.MemberProperty{JsiiProperty: "metadata", GoGetter: "Metadata"}, + _jsii_.MemberProperty{JsiiProperty: "name", GoGetter: "Name"}, + _jsii_.MemberProperty{JsiiProperty: "node", GoGetter: "Node"}, + _jsii_.MemberMethod{JsiiMethod: "toJson", GoMethod: "ToJson"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + }, + func() interface{} { + j := jsiiProxy_KubePriorityClassV1Alpha1{} + _jsii_.InitJsiiProxy(&j.Type__cdk8sApiObject) + return &j + }, + ) + _jsii_.RegisterStruct( + "k8s.KubePriorityClassV1Alpha1Props", + reflect.TypeOf((*KubePriorityClassV1Alpha1Props)(nil)).Elem(), + ) + _jsii_.RegisterClass( + "k8s.KubePriorityLevelConfigurationListV1Beta1", + reflect.TypeOf((*KubePriorityLevelConfigurationListV1Beta1)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "addDependency", GoMethod: "AddDependency"}, + _jsii_.MemberMethod{JsiiMethod: "addJsonPatch", GoMethod: "AddJsonPatch"}, + _jsii_.MemberProperty{JsiiProperty: "apiGroup", GoGetter: "ApiGroup"}, + _jsii_.MemberProperty{JsiiProperty: "apiVersion", GoGetter: "ApiVersion"}, + _jsii_.MemberProperty{JsiiProperty: "chart", GoGetter: "AddHelm"}, + _jsii_.MemberProperty{JsiiProperty: "kind", GoGetter: "Kind"}, + _jsii_.MemberProperty{JsiiProperty: "metadata", GoGetter: "Metadata"}, + _jsii_.MemberProperty{JsiiProperty: "name", GoGetter: "Name"}, + _jsii_.MemberProperty{JsiiProperty: "node", GoGetter: "Node"}, + _jsii_.MemberMethod{JsiiMethod: "toJson", GoMethod: "ToJson"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + }, + func() interface{} { + j := jsiiProxy_KubePriorityLevelConfigurationListV1Beta1{} + _jsii_.InitJsiiProxy(&j.Type__cdk8sApiObject) + return &j + }, + ) + _jsii_.RegisterStruct( + "k8s.KubePriorityLevelConfigurationListV1Beta1Props", + reflect.TypeOf((*KubePriorityLevelConfigurationListV1Beta1Props)(nil)).Elem(), + ) + _jsii_.RegisterClass( + "k8s.KubePriorityLevelConfigurationV1Beta1", + reflect.TypeOf((*KubePriorityLevelConfigurationV1Beta1)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "addDependency", GoMethod: "AddDependency"}, + _jsii_.MemberMethod{JsiiMethod: "addJsonPatch", GoMethod: "AddJsonPatch"}, + _jsii_.MemberProperty{JsiiProperty: "apiGroup", GoGetter: "ApiGroup"}, + _jsii_.MemberProperty{JsiiProperty: "apiVersion", GoGetter: "ApiVersion"}, + _jsii_.MemberProperty{JsiiProperty: "chart", GoGetter: "AddHelm"}, + _jsii_.MemberProperty{JsiiProperty: "kind", GoGetter: "Kind"}, + _jsii_.MemberProperty{JsiiProperty: "metadata", GoGetter: "Metadata"}, + _jsii_.MemberProperty{JsiiProperty: "name", GoGetter: "Name"}, + _jsii_.MemberProperty{JsiiProperty: "node", GoGetter: "Node"}, + _jsii_.MemberMethod{JsiiMethod: "toJson", GoMethod: "ToJson"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + }, + func() interface{} { + j := jsiiProxy_KubePriorityLevelConfigurationV1Beta1{} + _jsii_.InitJsiiProxy(&j.Type__cdk8sApiObject) + return &j + }, + ) + _jsii_.RegisterStruct( + "k8s.KubePriorityLevelConfigurationV1Beta1Props", + reflect.TypeOf((*KubePriorityLevelConfigurationV1Beta1Props)(nil)).Elem(), + ) + _jsii_.RegisterClass( + "k8s.KubeReplicaSet", + reflect.TypeOf((*KubeReplicaSet)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "addDependency", GoMethod: "AddDependency"}, + _jsii_.MemberMethod{JsiiMethod: "addJsonPatch", GoMethod: "AddJsonPatch"}, + _jsii_.MemberProperty{JsiiProperty: "apiGroup", GoGetter: "ApiGroup"}, + _jsii_.MemberProperty{JsiiProperty: "apiVersion", GoGetter: "ApiVersion"}, + _jsii_.MemberProperty{JsiiProperty: "chart", GoGetter: "AddHelm"}, + _jsii_.MemberProperty{JsiiProperty: "kind", GoGetter: "Kind"}, + _jsii_.MemberProperty{JsiiProperty: "metadata", GoGetter: "Metadata"}, + _jsii_.MemberProperty{JsiiProperty: "name", GoGetter: "Name"}, + _jsii_.MemberProperty{JsiiProperty: "node", GoGetter: "Node"}, + _jsii_.MemberMethod{JsiiMethod: "toJson", GoMethod: "ToJson"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + }, + func() interface{} { + j := jsiiProxy_KubeReplicaSet{} + _jsii_.InitJsiiProxy(&j.Type__cdk8sApiObject) + return &j + }, + ) + _jsii_.RegisterClass( + "k8s.KubeReplicaSetList", + reflect.TypeOf((*KubeReplicaSetList)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "addDependency", GoMethod: "AddDependency"}, + _jsii_.MemberMethod{JsiiMethod: "addJsonPatch", GoMethod: "AddJsonPatch"}, + _jsii_.MemberProperty{JsiiProperty: "apiGroup", GoGetter: "ApiGroup"}, + _jsii_.MemberProperty{JsiiProperty: "apiVersion", GoGetter: "ApiVersion"}, + _jsii_.MemberProperty{JsiiProperty: "chart", GoGetter: "AddHelm"}, + _jsii_.MemberProperty{JsiiProperty: "kind", GoGetter: "Kind"}, + _jsii_.MemberProperty{JsiiProperty: "metadata", GoGetter: "Metadata"}, + _jsii_.MemberProperty{JsiiProperty: "name", GoGetter: "Name"}, + _jsii_.MemberProperty{JsiiProperty: "node", GoGetter: "Node"}, + _jsii_.MemberMethod{JsiiMethod: "toJson", GoMethod: "ToJson"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + }, + func() interface{} { + j := jsiiProxy_KubeReplicaSetList{} + _jsii_.InitJsiiProxy(&j.Type__cdk8sApiObject) + return &j + }, + ) + _jsii_.RegisterStruct( + "k8s.KubeReplicaSetListProps", + reflect.TypeOf((*KubeReplicaSetListProps)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.KubeReplicaSetProps", + reflect.TypeOf((*KubeReplicaSetProps)(nil)).Elem(), + ) + _jsii_.RegisterClass( + "k8s.KubeReplicationController", + reflect.TypeOf((*KubeReplicationController)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "addDependency", GoMethod: "AddDependency"}, + _jsii_.MemberMethod{JsiiMethod: "addJsonPatch", GoMethod: "AddJsonPatch"}, + _jsii_.MemberProperty{JsiiProperty: "apiGroup", GoGetter: "ApiGroup"}, + _jsii_.MemberProperty{JsiiProperty: "apiVersion", GoGetter: "ApiVersion"}, + _jsii_.MemberProperty{JsiiProperty: "chart", GoGetter: "AddHelm"}, + _jsii_.MemberProperty{JsiiProperty: "kind", GoGetter: "Kind"}, + _jsii_.MemberProperty{JsiiProperty: "metadata", GoGetter: "Metadata"}, + _jsii_.MemberProperty{JsiiProperty: "name", GoGetter: "Name"}, + _jsii_.MemberProperty{JsiiProperty: "node", GoGetter: "Node"}, + _jsii_.MemberMethod{JsiiMethod: "toJson", GoMethod: "ToJson"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + }, + func() interface{} { + j := jsiiProxy_KubeReplicationController{} + _jsii_.InitJsiiProxy(&j.Type__cdk8sApiObject) + return &j + }, + ) + _jsii_.RegisterClass( + "k8s.KubeReplicationControllerList", + reflect.TypeOf((*KubeReplicationControllerList)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "addDependency", GoMethod: "AddDependency"}, + _jsii_.MemberMethod{JsiiMethod: "addJsonPatch", GoMethod: "AddJsonPatch"}, + _jsii_.MemberProperty{JsiiProperty: "apiGroup", GoGetter: "ApiGroup"}, + _jsii_.MemberProperty{JsiiProperty: "apiVersion", GoGetter: "ApiVersion"}, + _jsii_.MemberProperty{JsiiProperty: "chart", GoGetter: "AddHelm"}, + _jsii_.MemberProperty{JsiiProperty: "kind", GoGetter: "Kind"}, + _jsii_.MemberProperty{JsiiProperty: "metadata", GoGetter: "Metadata"}, + _jsii_.MemberProperty{JsiiProperty: "name", GoGetter: "Name"}, + _jsii_.MemberProperty{JsiiProperty: "node", GoGetter: "Node"}, + _jsii_.MemberMethod{JsiiMethod: "toJson", GoMethod: "ToJson"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + }, + func() interface{} { + j := jsiiProxy_KubeReplicationControllerList{} + _jsii_.InitJsiiProxy(&j.Type__cdk8sApiObject) + return &j + }, + ) + _jsii_.RegisterStruct( + "k8s.KubeReplicationControllerListProps", + reflect.TypeOf((*KubeReplicationControllerListProps)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.KubeReplicationControllerProps", + reflect.TypeOf((*KubeReplicationControllerProps)(nil)).Elem(), + ) + _jsii_.RegisterClass( + "k8s.KubeResourceQuota", + reflect.TypeOf((*KubeResourceQuota)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "addDependency", GoMethod: "AddDependency"}, + _jsii_.MemberMethod{JsiiMethod: "addJsonPatch", GoMethod: "AddJsonPatch"}, + _jsii_.MemberProperty{JsiiProperty: "apiGroup", GoGetter: "ApiGroup"}, + _jsii_.MemberProperty{JsiiProperty: "apiVersion", GoGetter: "ApiVersion"}, + _jsii_.MemberProperty{JsiiProperty: "chart", GoGetter: "AddHelm"}, + _jsii_.MemberProperty{JsiiProperty: "kind", GoGetter: "Kind"}, + _jsii_.MemberProperty{JsiiProperty: "metadata", GoGetter: "Metadata"}, + _jsii_.MemberProperty{JsiiProperty: "name", GoGetter: "Name"}, + _jsii_.MemberProperty{JsiiProperty: "node", GoGetter: "Node"}, + _jsii_.MemberMethod{JsiiMethod: "toJson", GoMethod: "ToJson"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + }, + func() interface{} { + j := jsiiProxy_KubeResourceQuota{} + _jsii_.InitJsiiProxy(&j.Type__cdk8sApiObject) + return &j + }, + ) + _jsii_.RegisterClass( + "k8s.KubeResourceQuotaList", + reflect.TypeOf((*KubeResourceQuotaList)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "addDependency", GoMethod: "AddDependency"}, + _jsii_.MemberMethod{JsiiMethod: "addJsonPatch", GoMethod: "AddJsonPatch"}, + _jsii_.MemberProperty{JsiiProperty: "apiGroup", GoGetter: "ApiGroup"}, + _jsii_.MemberProperty{JsiiProperty: "apiVersion", GoGetter: "ApiVersion"}, + _jsii_.MemberProperty{JsiiProperty: "chart", GoGetter: "AddHelm"}, + _jsii_.MemberProperty{JsiiProperty: "kind", GoGetter: "Kind"}, + _jsii_.MemberProperty{JsiiProperty: "metadata", GoGetter: "Metadata"}, + _jsii_.MemberProperty{JsiiProperty: "name", GoGetter: "Name"}, + _jsii_.MemberProperty{JsiiProperty: "node", GoGetter: "Node"}, + _jsii_.MemberMethod{JsiiMethod: "toJson", GoMethod: "ToJson"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + }, + func() interface{} { + j := jsiiProxy_KubeResourceQuotaList{} + _jsii_.InitJsiiProxy(&j.Type__cdk8sApiObject) + return &j + }, + ) + _jsii_.RegisterStruct( + "k8s.KubeResourceQuotaListProps", + reflect.TypeOf((*KubeResourceQuotaListProps)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.KubeResourceQuotaProps", + reflect.TypeOf((*KubeResourceQuotaProps)(nil)).Elem(), + ) + _jsii_.RegisterClass( + "k8s.KubeRole", + reflect.TypeOf((*KubeRole)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "addDependency", GoMethod: "AddDependency"}, + _jsii_.MemberMethod{JsiiMethod: "addJsonPatch", GoMethod: "AddJsonPatch"}, + _jsii_.MemberProperty{JsiiProperty: "apiGroup", GoGetter: "ApiGroup"}, + _jsii_.MemberProperty{JsiiProperty: "apiVersion", GoGetter: "ApiVersion"}, + _jsii_.MemberProperty{JsiiProperty: "chart", GoGetter: "AddHelm"}, + _jsii_.MemberProperty{JsiiProperty: "kind", GoGetter: "Kind"}, + _jsii_.MemberProperty{JsiiProperty: "metadata", GoGetter: "Metadata"}, + _jsii_.MemberProperty{JsiiProperty: "name", GoGetter: "Name"}, + _jsii_.MemberProperty{JsiiProperty: "node", GoGetter: "Node"}, + _jsii_.MemberMethod{JsiiMethod: "toJson", GoMethod: "ToJson"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + }, + func() interface{} { + j := jsiiProxy_KubeRole{} + _jsii_.InitJsiiProxy(&j.Type__cdk8sApiObject) + return &j + }, + ) + _jsii_.RegisterClass( + "k8s.KubeRoleBinding", + reflect.TypeOf((*KubeRoleBinding)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "addDependency", GoMethod: "AddDependency"}, + _jsii_.MemberMethod{JsiiMethod: "addJsonPatch", GoMethod: "AddJsonPatch"}, + _jsii_.MemberProperty{JsiiProperty: "apiGroup", GoGetter: "ApiGroup"}, + _jsii_.MemberProperty{JsiiProperty: "apiVersion", GoGetter: "ApiVersion"}, + _jsii_.MemberProperty{JsiiProperty: "chart", GoGetter: "AddHelm"}, + _jsii_.MemberProperty{JsiiProperty: "kind", GoGetter: "Kind"}, + _jsii_.MemberProperty{JsiiProperty: "metadata", GoGetter: "Metadata"}, + _jsii_.MemberProperty{JsiiProperty: "name", GoGetter: "Name"}, + _jsii_.MemberProperty{JsiiProperty: "node", GoGetter: "Node"}, + _jsii_.MemberMethod{JsiiMethod: "toJson", GoMethod: "ToJson"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + }, + func() interface{} { + j := jsiiProxy_KubeRoleBinding{} + _jsii_.InitJsiiProxy(&j.Type__cdk8sApiObject) + return &j + }, + ) + _jsii_.RegisterClass( + "k8s.KubeRoleBindingList", + reflect.TypeOf((*KubeRoleBindingList)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "addDependency", GoMethod: "AddDependency"}, + _jsii_.MemberMethod{JsiiMethod: "addJsonPatch", GoMethod: "AddJsonPatch"}, + _jsii_.MemberProperty{JsiiProperty: "apiGroup", GoGetter: "ApiGroup"}, + _jsii_.MemberProperty{JsiiProperty: "apiVersion", GoGetter: "ApiVersion"}, + _jsii_.MemberProperty{JsiiProperty: "chart", GoGetter: "AddHelm"}, + _jsii_.MemberProperty{JsiiProperty: "kind", GoGetter: "Kind"}, + _jsii_.MemberProperty{JsiiProperty: "metadata", GoGetter: "Metadata"}, + _jsii_.MemberProperty{JsiiProperty: "name", GoGetter: "Name"}, + _jsii_.MemberProperty{JsiiProperty: "node", GoGetter: "Node"}, + _jsii_.MemberMethod{JsiiMethod: "toJson", GoMethod: "ToJson"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + }, + func() interface{} { + j := jsiiProxy_KubeRoleBindingList{} + _jsii_.InitJsiiProxy(&j.Type__cdk8sApiObject) + return &j + }, + ) + _jsii_.RegisterStruct( + "k8s.KubeRoleBindingListProps", + reflect.TypeOf((*KubeRoleBindingListProps)(nil)).Elem(), + ) + _jsii_.RegisterClass( + "k8s.KubeRoleBindingListV1Alpha1", + reflect.TypeOf((*KubeRoleBindingListV1Alpha1)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "addDependency", GoMethod: "AddDependency"}, + _jsii_.MemberMethod{JsiiMethod: "addJsonPatch", GoMethod: "AddJsonPatch"}, + _jsii_.MemberProperty{JsiiProperty: "apiGroup", GoGetter: "ApiGroup"}, + _jsii_.MemberProperty{JsiiProperty: "apiVersion", GoGetter: "ApiVersion"}, + _jsii_.MemberProperty{JsiiProperty: "chart", GoGetter: "AddHelm"}, + _jsii_.MemberProperty{JsiiProperty: "kind", GoGetter: "Kind"}, + _jsii_.MemberProperty{JsiiProperty: "metadata", GoGetter: "Metadata"}, + _jsii_.MemberProperty{JsiiProperty: "name", GoGetter: "Name"}, + _jsii_.MemberProperty{JsiiProperty: "node", GoGetter: "Node"}, + _jsii_.MemberMethod{JsiiMethod: "toJson", GoMethod: "ToJson"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + }, + func() interface{} { + j := jsiiProxy_KubeRoleBindingListV1Alpha1{} + _jsii_.InitJsiiProxy(&j.Type__cdk8sApiObject) + return &j + }, + ) + _jsii_.RegisterStruct( + "k8s.KubeRoleBindingListV1Alpha1Props", + reflect.TypeOf((*KubeRoleBindingListV1Alpha1Props)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.KubeRoleBindingProps", + reflect.TypeOf((*KubeRoleBindingProps)(nil)).Elem(), + ) + _jsii_.RegisterClass( + "k8s.KubeRoleBindingV1Alpha1", + reflect.TypeOf((*KubeRoleBindingV1Alpha1)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "addDependency", GoMethod: "AddDependency"}, + _jsii_.MemberMethod{JsiiMethod: "addJsonPatch", GoMethod: "AddJsonPatch"}, + _jsii_.MemberProperty{JsiiProperty: "apiGroup", GoGetter: "ApiGroup"}, + _jsii_.MemberProperty{JsiiProperty: "apiVersion", GoGetter: "ApiVersion"}, + _jsii_.MemberProperty{JsiiProperty: "chart", GoGetter: "AddHelm"}, + _jsii_.MemberProperty{JsiiProperty: "kind", GoGetter: "Kind"}, + _jsii_.MemberProperty{JsiiProperty: "metadata", GoGetter: "Metadata"}, + _jsii_.MemberProperty{JsiiProperty: "name", GoGetter: "Name"}, + _jsii_.MemberProperty{JsiiProperty: "node", GoGetter: "Node"}, + _jsii_.MemberMethod{JsiiMethod: "toJson", GoMethod: "ToJson"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + }, + func() interface{} { + j := jsiiProxy_KubeRoleBindingV1Alpha1{} + _jsii_.InitJsiiProxy(&j.Type__cdk8sApiObject) + return &j + }, + ) + _jsii_.RegisterStruct( + "k8s.KubeRoleBindingV1Alpha1Props", + reflect.TypeOf((*KubeRoleBindingV1Alpha1Props)(nil)).Elem(), + ) + _jsii_.RegisterClass( + "k8s.KubeRoleList", + reflect.TypeOf((*KubeRoleList)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "addDependency", GoMethod: "AddDependency"}, + _jsii_.MemberMethod{JsiiMethod: "addJsonPatch", GoMethod: "AddJsonPatch"}, + _jsii_.MemberProperty{JsiiProperty: "apiGroup", GoGetter: "ApiGroup"}, + _jsii_.MemberProperty{JsiiProperty: "apiVersion", GoGetter: "ApiVersion"}, + _jsii_.MemberProperty{JsiiProperty: "chart", GoGetter: "AddHelm"}, + _jsii_.MemberProperty{JsiiProperty: "kind", GoGetter: "Kind"}, + _jsii_.MemberProperty{JsiiProperty: "metadata", GoGetter: "Metadata"}, + _jsii_.MemberProperty{JsiiProperty: "name", GoGetter: "Name"}, + _jsii_.MemberProperty{JsiiProperty: "node", GoGetter: "Node"}, + _jsii_.MemberMethod{JsiiMethod: "toJson", GoMethod: "ToJson"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + }, + func() interface{} { + j := jsiiProxy_KubeRoleList{} + _jsii_.InitJsiiProxy(&j.Type__cdk8sApiObject) + return &j + }, + ) + _jsii_.RegisterStruct( + "k8s.KubeRoleListProps", + reflect.TypeOf((*KubeRoleListProps)(nil)).Elem(), + ) + _jsii_.RegisterClass( + "k8s.KubeRoleListV1Alpha1", + reflect.TypeOf((*KubeRoleListV1Alpha1)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "addDependency", GoMethod: "AddDependency"}, + _jsii_.MemberMethod{JsiiMethod: "addJsonPatch", GoMethod: "AddJsonPatch"}, + _jsii_.MemberProperty{JsiiProperty: "apiGroup", GoGetter: "ApiGroup"}, + _jsii_.MemberProperty{JsiiProperty: "apiVersion", GoGetter: "ApiVersion"}, + _jsii_.MemberProperty{JsiiProperty: "chart", GoGetter: "AddHelm"}, + _jsii_.MemberProperty{JsiiProperty: "kind", GoGetter: "Kind"}, + _jsii_.MemberProperty{JsiiProperty: "metadata", GoGetter: "Metadata"}, + _jsii_.MemberProperty{JsiiProperty: "name", GoGetter: "Name"}, + _jsii_.MemberProperty{JsiiProperty: "node", GoGetter: "Node"}, + _jsii_.MemberMethod{JsiiMethod: "toJson", GoMethod: "ToJson"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + }, + func() interface{} { + j := jsiiProxy_KubeRoleListV1Alpha1{} + _jsii_.InitJsiiProxy(&j.Type__cdk8sApiObject) + return &j + }, + ) + _jsii_.RegisterStruct( + "k8s.KubeRoleListV1Alpha1Props", + reflect.TypeOf((*KubeRoleListV1Alpha1Props)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.KubeRoleProps", + reflect.TypeOf((*KubeRoleProps)(nil)).Elem(), + ) + _jsii_.RegisterClass( + "k8s.KubeRoleV1Alpha1", + reflect.TypeOf((*KubeRoleV1Alpha1)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "addDependency", GoMethod: "AddDependency"}, + _jsii_.MemberMethod{JsiiMethod: "addJsonPatch", GoMethod: "AddJsonPatch"}, + _jsii_.MemberProperty{JsiiProperty: "apiGroup", GoGetter: "ApiGroup"}, + _jsii_.MemberProperty{JsiiProperty: "apiVersion", GoGetter: "ApiVersion"}, + _jsii_.MemberProperty{JsiiProperty: "chart", GoGetter: "AddHelm"}, + _jsii_.MemberProperty{JsiiProperty: "kind", GoGetter: "Kind"}, + _jsii_.MemberProperty{JsiiProperty: "metadata", GoGetter: "Metadata"}, + _jsii_.MemberProperty{JsiiProperty: "name", GoGetter: "Name"}, + _jsii_.MemberProperty{JsiiProperty: "node", GoGetter: "Node"}, + _jsii_.MemberMethod{JsiiMethod: "toJson", GoMethod: "ToJson"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + }, + func() interface{} { + j := jsiiProxy_KubeRoleV1Alpha1{} + _jsii_.InitJsiiProxy(&j.Type__cdk8sApiObject) + return &j + }, + ) + _jsii_.RegisterStruct( + "k8s.KubeRoleV1Alpha1Props", + reflect.TypeOf((*KubeRoleV1Alpha1Props)(nil)).Elem(), + ) + _jsii_.RegisterClass( + "k8s.KubeRuntimeClass", + reflect.TypeOf((*KubeRuntimeClass)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "addDependency", GoMethod: "AddDependency"}, + _jsii_.MemberMethod{JsiiMethod: "addJsonPatch", GoMethod: "AddJsonPatch"}, + _jsii_.MemberProperty{JsiiProperty: "apiGroup", GoGetter: "ApiGroup"}, + _jsii_.MemberProperty{JsiiProperty: "apiVersion", GoGetter: "ApiVersion"}, + _jsii_.MemberProperty{JsiiProperty: "chart", GoGetter: "AddHelm"}, + _jsii_.MemberProperty{JsiiProperty: "kind", GoGetter: "Kind"}, + _jsii_.MemberProperty{JsiiProperty: "metadata", GoGetter: "Metadata"}, + _jsii_.MemberProperty{JsiiProperty: "name", GoGetter: "Name"}, + _jsii_.MemberProperty{JsiiProperty: "node", GoGetter: "Node"}, + _jsii_.MemberMethod{JsiiMethod: "toJson", GoMethod: "ToJson"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + }, + func() interface{} { + j := jsiiProxy_KubeRuntimeClass{} + _jsii_.InitJsiiProxy(&j.Type__cdk8sApiObject) + return &j + }, + ) + _jsii_.RegisterClass( + "k8s.KubeRuntimeClassList", + reflect.TypeOf((*KubeRuntimeClassList)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "addDependency", GoMethod: "AddDependency"}, + _jsii_.MemberMethod{JsiiMethod: "addJsonPatch", GoMethod: "AddJsonPatch"}, + _jsii_.MemberProperty{JsiiProperty: "apiGroup", GoGetter: "ApiGroup"}, + _jsii_.MemberProperty{JsiiProperty: "apiVersion", GoGetter: "ApiVersion"}, + _jsii_.MemberProperty{JsiiProperty: "chart", GoGetter: "AddHelm"}, + _jsii_.MemberProperty{JsiiProperty: "kind", GoGetter: "Kind"}, + _jsii_.MemberProperty{JsiiProperty: "metadata", GoGetter: "Metadata"}, + _jsii_.MemberProperty{JsiiProperty: "name", GoGetter: "Name"}, + _jsii_.MemberProperty{JsiiProperty: "node", GoGetter: "Node"}, + _jsii_.MemberMethod{JsiiMethod: "toJson", GoMethod: "ToJson"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + }, + func() interface{} { + j := jsiiProxy_KubeRuntimeClassList{} + _jsii_.InitJsiiProxy(&j.Type__cdk8sApiObject) + return &j + }, + ) + _jsii_.RegisterStruct( + "k8s.KubeRuntimeClassListProps", + reflect.TypeOf((*KubeRuntimeClassListProps)(nil)).Elem(), + ) + _jsii_.RegisterClass( + "k8s.KubeRuntimeClassListV1Alpha1", + reflect.TypeOf((*KubeRuntimeClassListV1Alpha1)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "addDependency", GoMethod: "AddDependency"}, + _jsii_.MemberMethod{JsiiMethod: "addJsonPatch", GoMethod: "AddJsonPatch"}, + _jsii_.MemberProperty{JsiiProperty: "apiGroup", GoGetter: "ApiGroup"}, + _jsii_.MemberProperty{JsiiProperty: "apiVersion", GoGetter: "ApiVersion"}, + _jsii_.MemberProperty{JsiiProperty: "chart", GoGetter: "AddHelm"}, + _jsii_.MemberProperty{JsiiProperty: "kind", GoGetter: "Kind"}, + _jsii_.MemberProperty{JsiiProperty: "metadata", GoGetter: "Metadata"}, + _jsii_.MemberProperty{JsiiProperty: "name", GoGetter: "Name"}, + _jsii_.MemberProperty{JsiiProperty: "node", GoGetter: "Node"}, + _jsii_.MemberMethod{JsiiMethod: "toJson", GoMethod: "ToJson"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + }, + func() interface{} { + j := jsiiProxy_KubeRuntimeClassListV1Alpha1{} + _jsii_.InitJsiiProxy(&j.Type__cdk8sApiObject) + return &j + }, + ) + _jsii_.RegisterStruct( + "k8s.KubeRuntimeClassListV1Alpha1Props", + reflect.TypeOf((*KubeRuntimeClassListV1Alpha1Props)(nil)).Elem(), + ) + _jsii_.RegisterClass( + "k8s.KubeRuntimeClassListV1Beta1", + reflect.TypeOf((*KubeRuntimeClassListV1Beta1)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "addDependency", GoMethod: "AddDependency"}, + _jsii_.MemberMethod{JsiiMethod: "addJsonPatch", GoMethod: "AddJsonPatch"}, + _jsii_.MemberProperty{JsiiProperty: "apiGroup", GoGetter: "ApiGroup"}, + _jsii_.MemberProperty{JsiiProperty: "apiVersion", GoGetter: "ApiVersion"}, + _jsii_.MemberProperty{JsiiProperty: "chart", GoGetter: "AddHelm"}, + _jsii_.MemberProperty{JsiiProperty: "kind", GoGetter: "Kind"}, + _jsii_.MemberProperty{JsiiProperty: "metadata", GoGetter: "Metadata"}, + _jsii_.MemberProperty{JsiiProperty: "name", GoGetter: "Name"}, + _jsii_.MemberProperty{JsiiProperty: "node", GoGetter: "Node"}, + _jsii_.MemberMethod{JsiiMethod: "toJson", GoMethod: "ToJson"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + }, + func() interface{} { + j := jsiiProxy_KubeRuntimeClassListV1Beta1{} + _jsii_.InitJsiiProxy(&j.Type__cdk8sApiObject) + return &j + }, + ) + _jsii_.RegisterStruct( + "k8s.KubeRuntimeClassListV1Beta1Props", + reflect.TypeOf((*KubeRuntimeClassListV1Beta1Props)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.KubeRuntimeClassProps", + reflect.TypeOf((*KubeRuntimeClassProps)(nil)).Elem(), + ) + _jsii_.RegisterClass( + "k8s.KubeRuntimeClassV1Alpha1", + reflect.TypeOf((*KubeRuntimeClassV1Alpha1)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "addDependency", GoMethod: "AddDependency"}, + _jsii_.MemberMethod{JsiiMethod: "addJsonPatch", GoMethod: "AddJsonPatch"}, + _jsii_.MemberProperty{JsiiProperty: "apiGroup", GoGetter: "ApiGroup"}, + _jsii_.MemberProperty{JsiiProperty: "apiVersion", GoGetter: "ApiVersion"}, + _jsii_.MemberProperty{JsiiProperty: "chart", GoGetter: "AddHelm"}, + _jsii_.MemberProperty{JsiiProperty: "kind", GoGetter: "Kind"}, + _jsii_.MemberProperty{JsiiProperty: "metadata", GoGetter: "Metadata"}, + _jsii_.MemberProperty{JsiiProperty: "name", GoGetter: "Name"}, + _jsii_.MemberProperty{JsiiProperty: "node", GoGetter: "Node"}, + _jsii_.MemberMethod{JsiiMethod: "toJson", GoMethod: "ToJson"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + }, + func() interface{} { + j := jsiiProxy_KubeRuntimeClassV1Alpha1{} + _jsii_.InitJsiiProxy(&j.Type__cdk8sApiObject) + return &j + }, + ) + _jsii_.RegisterStruct( + "k8s.KubeRuntimeClassV1Alpha1Props", + reflect.TypeOf((*KubeRuntimeClassV1Alpha1Props)(nil)).Elem(), + ) + _jsii_.RegisterClass( + "k8s.KubeRuntimeClassV1Beta1", + reflect.TypeOf((*KubeRuntimeClassV1Beta1)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "addDependency", GoMethod: "AddDependency"}, + _jsii_.MemberMethod{JsiiMethod: "addJsonPatch", GoMethod: "AddJsonPatch"}, + _jsii_.MemberProperty{JsiiProperty: "apiGroup", GoGetter: "ApiGroup"}, + _jsii_.MemberProperty{JsiiProperty: "apiVersion", GoGetter: "ApiVersion"}, + _jsii_.MemberProperty{JsiiProperty: "chart", GoGetter: "AddHelm"}, + _jsii_.MemberProperty{JsiiProperty: "kind", GoGetter: "Kind"}, + _jsii_.MemberProperty{JsiiProperty: "metadata", GoGetter: "Metadata"}, + _jsii_.MemberProperty{JsiiProperty: "name", GoGetter: "Name"}, + _jsii_.MemberProperty{JsiiProperty: "node", GoGetter: "Node"}, + _jsii_.MemberMethod{JsiiMethod: "toJson", GoMethod: "ToJson"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + }, + func() interface{} { + j := jsiiProxy_KubeRuntimeClassV1Beta1{} + _jsii_.InitJsiiProxy(&j.Type__cdk8sApiObject) + return &j + }, + ) + _jsii_.RegisterStruct( + "k8s.KubeRuntimeClassV1Beta1Props", + reflect.TypeOf((*KubeRuntimeClassV1Beta1Props)(nil)).Elem(), + ) + _jsii_.RegisterClass( + "k8s.KubeScale", + reflect.TypeOf((*KubeScale)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "addDependency", GoMethod: "AddDependency"}, + _jsii_.MemberMethod{JsiiMethod: "addJsonPatch", GoMethod: "AddJsonPatch"}, + _jsii_.MemberProperty{JsiiProperty: "apiGroup", GoGetter: "ApiGroup"}, + _jsii_.MemberProperty{JsiiProperty: "apiVersion", GoGetter: "ApiVersion"}, + _jsii_.MemberProperty{JsiiProperty: "chart", GoGetter: "AddHelm"}, + _jsii_.MemberProperty{JsiiProperty: "kind", GoGetter: "Kind"}, + _jsii_.MemberProperty{JsiiProperty: "metadata", GoGetter: "Metadata"}, + _jsii_.MemberProperty{JsiiProperty: "name", GoGetter: "Name"}, + _jsii_.MemberProperty{JsiiProperty: "node", GoGetter: "Node"}, + _jsii_.MemberMethod{JsiiMethod: "toJson", GoMethod: "ToJson"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + }, + func() interface{} { + j := jsiiProxy_KubeScale{} + _jsii_.InitJsiiProxy(&j.Type__cdk8sApiObject) + return &j + }, + ) + _jsii_.RegisterStruct( + "k8s.KubeScaleProps", + reflect.TypeOf((*KubeScaleProps)(nil)).Elem(), + ) + _jsii_.RegisterClass( + "k8s.KubeSecret", + reflect.TypeOf((*KubeSecret)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "addDependency", GoMethod: "AddDependency"}, + _jsii_.MemberMethod{JsiiMethod: "addJsonPatch", GoMethod: "AddJsonPatch"}, + _jsii_.MemberProperty{JsiiProperty: "apiGroup", GoGetter: "ApiGroup"}, + _jsii_.MemberProperty{JsiiProperty: "apiVersion", GoGetter: "ApiVersion"}, + _jsii_.MemberProperty{JsiiProperty: "chart", GoGetter: "AddHelm"}, + _jsii_.MemberProperty{JsiiProperty: "kind", GoGetter: "Kind"}, + _jsii_.MemberProperty{JsiiProperty: "metadata", GoGetter: "Metadata"}, + _jsii_.MemberProperty{JsiiProperty: "name", GoGetter: "Name"}, + _jsii_.MemberProperty{JsiiProperty: "node", GoGetter: "Node"}, + _jsii_.MemberMethod{JsiiMethod: "toJson", GoMethod: "ToJson"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + }, + func() interface{} { + j := jsiiProxy_KubeSecret{} + _jsii_.InitJsiiProxy(&j.Type__cdk8sApiObject) + return &j + }, + ) + _jsii_.RegisterClass( + "k8s.KubeSecretList", + reflect.TypeOf((*KubeSecretList)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "addDependency", GoMethod: "AddDependency"}, + _jsii_.MemberMethod{JsiiMethod: "addJsonPatch", GoMethod: "AddJsonPatch"}, + _jsii_.MemberProperty{JsiiProperty: "apiGroup", GoGetter: "ApiGroup"}, + _jsii_.MemberProperty{JsiiProperty: "apiVersion", GoGetter: "ApiVersion"}, + _jsii_.MemberProperty{JsiiProperty: "chart", GoGetter: "AddHelm"}, + _jsii_.MemberProperty{JsiiProperty: "kind", GoGetter: "Kind"}, + _jsii_.MemberProperty{JsiiProperty: "metadata", GoGetter: "Metadata"}, + _jsii_.MemberProperty{JsiiProperty: "name", GoGetter: "Name"}, + _jsii_.MemberProperty{JsiiProperty: "node", GoGetter: "Node"}, + _jsii_.MemberMethod{JsiiMethod: "toJson", GoMethod: "ToJson"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + }, + func() interface{} { + j := jsiiProxy_KubeSecretList{} + _jsii_.InitJsiiProxy(&j.Type__cdk8sApiObject) + return &j + }, + ) + _jsii_.RegisterStruct( + "k8s.KubeSecretListProps", + reflect.TypeOf((*KubeSecretListProps)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.KubeSecretProps", + reflect.TypeOf((*KubeSecretProps)(nil)).Elem(), + ) + _jsii_.RegisterClass( + "k8s.KubeSelfSubjectAccessReview", + reflect.TypeOf((*KubeSelfSubjectAccessReview)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "addDependency", GoMethod: "AddDependency"}, + _jsii_.MemberMethod{JsiiMethod: "addJsonPatch", GoMethod: "AddJsonPatch"}, + _jsii_.MemberProperty{JsiiProperty: "apiGroup", GoGetter: "ApiGroup"}, + _jsii_.MemberProperty{JsiiProperty: "apiVersion", GoGetter: "ApiVersion"}, + _jsii_.MemberProperty{JsiiProperty: "chart", GoGetter: "AddHelm"}, + _jsii_.MemberProperty{JsiiProperty: "kind", GoGetter: "Kind"}, + _jsii_.MemberProperty{JsiiProperty: "metadata", GoGetter: "Metadata"}, + _jsii_.MemberProperty{JsiiProperty: "name", GoGetter: "Name"}, + _jsii_.MemberProperty{JsiiProperty: "node", GoGetter: "Node"}, + _jsii_.MemberMethod{JsiiMethod: "toJson", GoMethod: "ToJson"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + }, + func() interface{} { + j := jsiiProxy_KubeSelfSubjectAccessReview{} + _jsii_.InitJsiiProxy(&j.Type__cdk8sApiObject) + return &j + }, + ) + _jsii_.RegisterStruct( + "k8s.KubeSelfSubjectAccessReviewProps", + reflect.TypeOf((*KubeSelfSubjectAccessReviewProps)(nil)).Elem(), + ) + _jsii_.RegisterClass( + "k8s.KubeSelfSubjectRulesReview", + reflect.TypeOf((*KubeSelfSubjectRulesReview)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "addDependency", GoMethod: "AddDependency"}, + _jsii_.MemberMethod{JsiiMethod: "addJsonPatch", GoMethod: "AddJsonPatch"}, + _jsii_.MemberProperty{JsiiProperty: "apiGroup", GoGetter: "ApiGroup"}, + _jsii_.MemberProperty{JsiiProperty: "apiVersion", GoGetter: "ApiVersion"}, + _jsii_.MemberProperty{JsiiProperty: "chart", GoGetter: "AddHelm"}, + _jsii_.MemberProperty{JsiiProperty: "kind", GoGetter: "Kind"}, + _jsii_.MemberProperty{JsiiProperty: "metadata", GoGetter: "Metadata"}, + _jsii_.MemberProperty{JsiiProperty: "name", GoGetter: "Name"}, + _jsii_.MemberProperty{JsiiProperty: "node", GoGetter: "Node"}, + _jsii_.MemberMethod{JsiiMethod: "toJson", GoMethod: "ToJson"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + }, + func() interface{} { + j := jsiiProxy_KubeSelfSubjectRulesReview{} + _jsii_.InitJsiiProxy(&j.Type__cdk8sApiObject) + return &j + }, + ) + _jsii_.RegisterStruct( + "k8s.KubeSelfSubjectRulesReviewProps", + reflect.TypeOf((*KubeSelfSubjectRulesReviewProps)(nil)).Elem(), + ) + _jsii_.RegisterClass( + "k8s.KubeService", + reflect.TypeOf((*KubeService)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "addDependency", GoMethod: "AddDependency"}, + _jsii_.MemberMethod{JsiiMethod: "addJsonPatch", GoMethod: "AddJsonPatch"}, + _jsii_.MemberProperty{JsiiProperty: "apiGroup", GoGetter: "ApiGroup"}, + _jsii_.MemberProperty{JsiiProperty: "apiVersion", GoGetter: "ApiVersion"}, + _jsii_.MemberProperty{JsiiProperty: "chart", GoGetter: "AddHelm"}, + _jsii_.MemberProperty{JsiiProperty: "kind", GoGetter: "Kind"}, + _jsii_.MemberProperty{JsiiProperty: "metadata", GoGetter: "Metadata"}, + _jsii_.MemberProperty{JsiiProperty: "name", GoGetter: "Name"}, + _jsii_.MemberProperty{JsiiProperty: "node", GoGetter: "Node"}, + _jsii_.MemberMethod{JsiiMethod: "toJson", GoMethod: "ToJson"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + }, + func() interface{} { + j := jsiiProxy_KubeService{} + _jsii_.InitJsiiProxy(&j.Type__cdk8sApiObject) + return &j + }, + ) + _jsii_.RegisterClass( + "k8s.KubeServiceAccount", + reflect.TypeOf((*KubeServiceAccount)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "addDependency", GoMethod: "AddDependency"}, + _jsii_.MemberMethod{JsiiMethod: "addJsonPatch", GoMethod: "AddJsonPatch"}, + _jsii_.MemberProperty{JsiiProperty: "apiGroup", GoGetter: "ApiGroup"}, + _jsii_.MemberProperty{JsiiProperty: "apiVersion", GoGetter: "ApiVersion"}, + _jsii_.MemberProperty{JsiiProperty: "chart", GoGetter: "AddHelm"}, + _jsii_.MemberProperty{JsiiProperty: "kind", GoGetter: "Kind"}, + _jsii_.MemberProperty{JsiiProperty: "metadata", GoGetter: "Metadata"}, + _jsii_.MemberProperty{JsiiProperty: "name", GoGetter: "Name"}, + _jsii_.MemberProperty{JsiiProperty: "node", GoGetter: "Node"}, + _jsii_.MemberMethod{JsiiMethod: "toJson", GoMethod: "ToJson"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + }, + func() interface{} { + j := jsiiProxy_KubeServiceAccount{} + _jsii_.InitJsiiProxy(&j.Type__cdk8sApiObject) + return &j + }, + ) + _jsii_.RegisterClass( + "k8s.KubeServiceAccountList", + reflect.TypeOf((*KubeServiceAccountList)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "addDependency", GoMethod: "AddDependency"}, + _jsii_.MemberMethod{JsiiMethod: "addJsonPatch", GoMethod: "AddJsonPatch"}, + _jsii_.MemberProperty{JsiiProperty: "apiGroup", GoGetter: "ApiGroup"}, + _jsii_.MemberProperty{JsiiProperty: "apiVersion", GoGetter: "ApiVersion"}, + _jsii_.MemberProperty{JsiiProperty: "chart", GoGetter: "AddHelm"}, + _jsii_.MemberProperty{JsiiProperty: "kind", GoGetter: "Kind"}, + _jsii_.MemberProperty{JsiiProperty: "metadata", GoGetter: "Metadata"}, + _jsii_.MemberProperty{JsiiProperty: "name", GoGetter: "Name"}, + _jsii_.MemberProperty{JsiiProperty: "node", GoGetter: "Node"}, + _jsii_.MemberMethod{JsiiMethod: "toJson", GoMethod: "ToJson"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + }, + func() interface{} { + j := jsiiProxy_KubeServiceAccountList{} + _jsii_.InitJsiiProxy(&j.Type__cdk8sApiObject) + return &j + }, + ) + _jsii_.RegisterStruct( + "k8s.KubeServiceAccountListProps", + reflect.TypeOf((*KubeServiceAccountListProps)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.KubeServiceAccountProps", + reflect.TypeOf((*KubeServiceAccountProps)(nil)).Elem(), + ) + _jsii_.RegisterClass( + "k8s.KubeServiceList", + reflect.TypeOf((*KubeServiceList)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "addDependency", GoMethod: "AddDependency"}, + _jsii_.MemberMethod{JsiiMethod: "addJsonPatch", GoMethod: "AddJsonPatch"}, + _jsii_.MemberProperty{JsiiProperty: "apiGroup", GoGetter: "ApiGroup"}, + _jsii_.MemberProperty{JsiiProperty: "apiVersion", GoGetter: "ApiVersion"}, + _jsii_.MemberProperty{JsiiProperty: "chart", GoGetter: "AddHelm"}, + _jsii_.MemberProperty{JsiiProperty: "kind", GoGetter: "Kind"}, + _jsii_.MemberProperty{JsiiProperty: "metadata", GoGetter: "Metadata"}, + _jsii_.MemberProperty{JsiiProperty: "name", GoGetter: "Name"}, + _jsii_.MemberProperty{JsiiProperty: "node", GoGetter: "Node"}, + _jsii_.MemberMethod{JsiiMethod: "toJson", GoMethod: "ToJson"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + }, + func() interface{} { + j := jsiiProxy_KubeServiceList{} + _jsii_.InitJsiiProxy(&j.Type__cdk8sApiObject) + return &j + }, + ) + _jsii_.RegisterStruct( + "k8s.KubeServiceListProps", + reflect.TypeOf((*KubeServiceListProps)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.KubeServiceProps", + reflect.TypeOf((*KubeServiceProps)(nil)).Elem(), + ) + _jsii_.RegisterClass( + "k8s.KubeStatefulSet", + reflect.TypeOf((*KubeStatefulSet)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "addDependency", GoMethod: "AddDependency"}, + _jsii_.MemberMethod{JsiiMethod: "addJsonPatch", GoMethod: "AddJsonPatch"}, + _jsii_.MemberProperty{JsiiProperty: "apiGroup", GoGetter: "ApiGroup"}, + _jsii_.MemberProperty{JsiiProperty: "apiVersion", GoGetter: "ApiVersion"}, + _jsii_.MemberProperty{JsiiProperty: "chart", GoGetter: "AddHelm"}, + _jsii_.MemberProperty{JsiiProperty: "kind", GoGetter: "Kind"}, + _jsii_.MemberProperty{JsiiProperty: "metadata", GoGetter: "Metadata"}, + _jsii_.MemberProperty{JsiiProperty: "name", GoGetter: "Name"}, + _jsii_.MemberProperty{JsiiProperty: "node", GoGetter: "Node"}, + _jsii_.MemberMethod{JsiiMethod: "toJson", GoMethod: "ToJson"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + }, + func() interface{} { + j := jsiiProxy_KubeStatefulSet{} + _jsii_.InitJsiiProxy(&j.Type__cdk8sApiObject) + return &j + }, + ) + _jsii_.RegisterClass( + "k8s.KubeStatefulSetList", + reflect.TypeOf((*KubeStatefulSetList)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "addDependency", GoMethod: "AddDependency"}, + _jsii_.MemberMethod{JsiiMethod: "addJsonPatch", GoMethod: "AddJsonPatch"}, + _jsii_.MemberProperty{JsiiProperty: "apiGroup", GoGetter: "ApiGroup"}, + _jsii_.MemberProperty{JsiiProperty: "apiVersion", GoGetter: "ApiVersion"}, + _jsii_.MemberProperty{JsiiProperty: "chart", GoGetter: "AddHelm"}, + _jsii_.MemberProperty{JsiiProperty: "kind", GoGetter: "Kind"}, + _jsii_.MemberProperty{JsiiProperty: "metadata", GoGetter: "Metadata"}, + _jsii_.MemberProperty{JsiiProperty: "name", GoGetter: "Name"}, + _jsii_.MemberProperty{JsiiProperty: "node", GoGetter: "Node"}, + _jsii_.MemberMethod{JsiiMethod: "toJson", GoMethod: "ToJson"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + }, + func() interface{} { + j := jsiiProxy_KubeStatefulSetList{} + _jsii_.InitJsiiProxy(&j.Type__cdk8sApiObject) + return &j + }, + ) + _jsii_.RegisterStruct( + "k8s.KubeStatefulSetListProps", + reflect.TypeOf((*KubeStatefulSetListProps)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.KubeStatefulSetProps", + reflect.TypeOf((*KubeStatefulSetProps)(nil)).Elem(), + ) + _jsii_.RegisterClass( + "k8s.KubeStatus", + reflect.TypeOf((*KubeStatus)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "addDependency", GoMethod: "AddDependency"}, + _jsii_.MemberMethod{JsiiMethod: "addJsonPatch", GoMethod: "AddJsonPatch"}, + _jsii_.MemberProperty{JsiiProperty: "apiGroup", GoGetter: "ApiGroup"}, + _jsii_.MemberProperty{JsiiProperty: "apiVersion", GoGetter: "ApiVersion"}, + _jsii_.MemberProperty{JsiiProperty: "chart", GoGetter: "AddHelm"}, + _jsii_.MemberProperty{JsiiProperty: "kind", GoGetter: "Kind"}, + _jsii_.MemberProperty{JsiiProperty: "metadata", GoGetter: "Metadata"}, + _jsii_.MemberProperty{JsiiProperty: "name", GoGetter: "Name"}, + _jsii_.MemberProperty{JsiiProperty: "node", GoGetter: "Node"}, + _jsii_.MemberMethod{JsiiMethod: "toJson", GoMethod: "ToJson"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + }, + func() interface{} { + j := jsiiProxy_KubeStatus{} + _jsii_.InitJsiiProxy(&j.Type__cdk8sApiObject) + return &j + }, + ) + _jsii_.RegisterStruct( + "k8s.KubeStatusProps", + reflect.TypeOf((*KubeStatusProps)(nil)).Elem(), + ) + _jsii_.RegisterClass( + "k8s.KubeStorageClass", + reflect.TypeOf((*KubeStorageClass)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "addDependency", GoMethod: "AddDependency"}, + _jsii_.MemberMethod{JsiiMethod: "addJsonPatch", GoMethod: "AddJsonPatch"}, + _jsii_.MemberProperty{JsiiProperty: "apiGroup", GoGetter: "ApiGroup"}, + _jsii_.MemberProperty{JsiiProperty: "apiVersion", GoGetter: "ApiVersion"}, + _jsii_.MemberProperty{JsiiProperty: "chart", GoGetter: "AddHelm"}, + _jsii_.MemberProperty{JsiiProperty: "kind", GoGetter: "Kind"}, + _jsii_.MemberProperty{JsiiProperty: "metadata", GoGetter: "Metadata"}, + _jsii_.MemberProperty{JsiiProperty: "name", GoGetter: "Name"}, + _jsii_.MemberProperty{JsiiProperty: "node", GoGetter: "Node"}, + _jsii_.MemberMethod{JsiiMethod: "toJson", GoMethod: "ToJson"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + }, + func() interface{} { + j := jsiiProxy_KubeStorageClass{} + _jsii_.InitJsiiProxy(&j.Type__cdk8sApiObject) + return &j + }, + ) + _jsii_.RegisterClass( + "k8s.KubeStorageClassList", + reflect.TypeOf((*KubeStorageClassList)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "addDependency", GoMethod: "AddDependency"}, + _jsii_.MemberMethod{JsiiMethod: "addJsonPatch", GoMethod: "AddJsonPatch"}, + _jsii_.MemberProperty{JsiiProperty: "apiGroup", GoGetter: "ApiGroup"}, + _jsii_.MemberProperty{JsiiProperty: "apiVersion", GoGetter: "ApiVersion"}, + _jsii_.MemberProperty{JsiiProperty: "chart", GoGetter: "AddHelm"}, + _jsii_.MemberProperty{JsiiProperty: "kind", GoGetter: "Kind"}, + _jsii_.MemberProperty{JsiiProperty: "metadata", GoGetter: "Metadata"}, + _jsii_.MemberProperty{JsiiProperty: "name", GoGetter: "Name"}, + _jsii_.MemberProperty{JsiiProperty: "node", GoGetter: "Node"}, + _jsii_.MemberMethod{JsiiMethod: "toJson", GoMethod: "ToJson"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + }, + func() interface{} { + j := jsiiProxy_KubeStorageClassList{} + _jsii_.InitJsiiProxy(&j.Type__cdk8sApiObject) + return &j + }, + ) + _jsii_.RegisterStruct( + "k8s.KubeStorageClassListProps", + reflect.TypeOf((*KubeStorageClassListProps)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.KubeStorageClassProps", + reflect.TypeOf((*KubeStorageClassProps)(nil)).Elem(), + ) + _jsii_.RegisterClass( + "k8s.KubeStorageVersionListV1Alpha1", + reflect.TypeOf((*KubeStorageVersionListV1Alpha1)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "addDependency", GoMethod: "AddDependency"}, + _jsii_.MemberMethod{JsiiMethod: "addJsonPatch", GoMethod: "AddJsonPatch"}, + _jsii_.MemberProperty{JsiiProperty: "apiGroup", GoGetter: "ApiGroup"}, + _jsii_.MemberProperty{JsiiProperty: "apiVersion", GoGetter: "ApiVersion"}, + _jsii_.MemberProperty{JsiiProperty: "chart", GoGetter: "AddHelm"}, + _jsii_.MemberProperty{JsiiProperty: "kind", GoGetter: "Kind"}, + _jsii_.MemberProperty{JsiiProperty: "metadata", GoGetter: "Metadata"}, + _jsii_.MemberProperty{JsiiProperty: "name", GoGetter: "Name"}, + _jsii_.MemberProperty{JsiiProperty: "node", GoGetter: "Node"}, + _jsii_.MemberMethod{JsiiMethod: "toJson", GoMethod: "ToJson"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + }, + func() interface{} { + j := jsiiProxy_KubeStorageVersionListV1Alpha1{} + _jsii_.InitJsiiProxy(&j.Type__cdk8sApiObject) + return &j + }, + ) + _jsii_.RegisterStruct( + "k8s.KubeStorageVersionListV1Alpha1Props", + reflect.TypeOf((*KubeStorageVersionListV1Alpha1Props)(nil)).Elem(), + ) + _jsii_.RegisterClass( + "k8s.KubeStorageVersionV1Alpha1", + reflect.TypeOf((*KubeStorageVersionV1Alpha1)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "addDependency", GoMethod: "AddDependency"}, + _jsii_.MemberMethod{JsiiMethod: "addJsonPatch", GoMethod: "AddJsonPatch"}, + _jsii_.MemberProperty{JsiiProperty: "apiGroup", GoGetter: "ApiGroup"}, + _jsii_.MemberProperty{JsiiProperty: "apiVersion", GoGetter: "ApiVersion"}, + _jsii_.MemberProperty{JsiiProperty: "chart", GoGetter: "AddHelm"}, + _jsii_.MemberProperty{JsiiProperty: "kind", GoGetter: "Kind"}, + _jsii_.MemberProperty{JsiiProperty: "metadata", GoGetter: "Metadata"}, + _jsii_.MemberProperty{JsiiProperty: "name", GoGetter: "Name"}, + _jsii_.MemberProperty{JsiiProperty: "node", GoGetter: "Node"}, + _jsii_.MemberMethod{JsiiMethod: "toJson", GoMethod: "ToJson"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + }, + func() interface{} { + j := jsiiProxy_KubeStorageVersionV1Alpha1{} + _jsii_.InitJsiiProxy(&j.Type__cdk8sApiObject) + return &j + }, + ) + _jsii_.RegisterStruct( + "k8s.KubeStorageVersionV1Alpha1Props", + reflect.TypeOf((*KubeStorageVersionV1Alpha1Props)(nil)).Elem(), + ) + _jsii_.RegisterClass( + "k8s.KubeSubjectAccessReview", + reflect.TypeOf((*KubeSubjectAccessReview)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "addDependency", GoMethod: "AddDependency"}, + _jsii_.MemberMethod{JsiiMethod: "addJsonPatch", GoMethod: "AddJsonPatch"}, + _jsii_.MemberProperty{JsiiProperty: "apiGroup", GoGetter: "ApiGroup"}, + _jsii_.MemberProperty{JsiiProperty: "apiVersion", GoGetter: "ApiVersion"}, + _jsii_.MemberProperty{JsiiProperty: "chart", GoGetter: "AddHelm"}, + _jsii_.MemberProperty{JsiiProperty: "kind", GoGetter: "Kind"}, + _jsii_.MemberProperty{JsiiProperty: "metadata", GoGetter: "Metadata"}, + _jsii_.MemberProperty{JsiiProperty: "name", GoGetter: "Name"}, + _jsii_.MemberProperty{JsiiProperty: "node", GoGetter: "Node"}, + _jsii_.MemberMethod{JsiiMethod: "toJson", GoMethod: "ToJson"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + }, + func() interface{} { + j := jsiiProxy_KubeSubjectAccessReview{} + _jsii_.InitJsiiProxy(&j.Type__cdk8sApiObject) + return &j + }, + ) + _jsii_.RegisterStruct( + "k8s.KubeSubjectAccessReviewProps", + reflect.TypeOf((*KubeSubjectAccessReviewProps)(nil)).Elem(), + ) + _jsii_.RegisterClass( + "k8s.KubeTokenRequest", + reflect.TypeOf((*KubeTokenRequest)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "addDependency", GoMethod: "AddDependency"}, + _jsii_.MemberMethod{JsiiMethod: "addJsonPatch", GoMethod: "AddJsonPatch"}, + _jsii_.MemberProperty{JsiiProperty: "apiGroup", GoGetter: "ApiGroup"}, + _jsii_.MemberProperty{JsiiProperty: "apiVersion", GoGetter: "ApiVersion"}, + _jsii_.MemberProperty{JsiiProperty: "chart", GoGetter: "AddHelm"}, + _jsii_.MemberProperty{JsiiProperty: "kind", GoGetter: "Kind"}, + _jsii_.MemberProperty{JsiiProperty: "metadata", GoGetter: "Metadata"}, + _jsii_.MemberProperty{JsiiProperty: "name", GoGetter: "Name"}, + _jsii_.MemberProperty{JsiiProperty: "node", GoGetter: "Node"}, + _jsii_.MemberMethod{JsiiMethod: "toJson", GoMethod: "ToJson"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + }, + func() interface{} { + j := jsiiProxy_KubeTokenRequest{} + _jsii_.InitJsiiProxy(&j.Type__cdk8sApiObject) + return &j + }, + ) + _jsii_.RegisterStruct( + "k8s.KubeTokenRequestProps", + reflect.TypeOf((*KubeTokenRequestProps)(nil)).Elem(), + ) + _jsii_.RegisterClass( + "k8s.KubeTokenReview", + reflect.TypeOf((*KubeTokenReview)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "addDependency", GoMethod: "AddDependency"}, + _jsii_.MemberMethod{JsiiMethod: "addJsonPatch", GoMethod: "AddJsonPatch"}, + _jsii_.MemberProperty{JsiiProperty: "apiGroup", GoGetter: "ApiGroup"}, + _jsii_.MemberProperty{JsiiProperty: "apiVersion", GoGetter: "ApiVersion"}, + _jsii_.MemberProperty{JsiiProperty: "chart", GoGetter: "AddHelm"}, + _jsii_.MemberProperty{JsiiProperty: "kind", GoGetter: "Kind"}, + _jsii_.MemberProperty{JsiiProperty: "metadata", GoGetter: "Metadata"}, + _jsii_.MemberProperty{JsiiProperty: "name", GoGetter: "Name"}, + _jsii_.MemberProperty{JsiiProperty: "node", GoGetter: "Node"}, + _jsii_.MemberMethod{JsiiMethod: "toJson", GoMethod: "ToJson"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + }, + func() interface{} { + j := jsiiProxy_KubeTokenReview{} + _jsii_.InitJsiiProxy(&j.Type__cdk8sApiObject) + return &j + }, + ) + _jsii_.RegisterStruct( + "k8s.KubeTokenReviewProps", + reflect.TypeOf((*KubeTokenReviewProps)(nil)).Elem(), + ) + _jsii_.RegisterClass( + "k8s.KubeValidatingWebhookConfiguration", + reflect.TypeOf((*KubeValidatingWebhookConfiguration)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "addDependency", GoMethod: "AddDependency"}, + _jsii_.MemberMethod{JsiiMethod: "addJsonPatch", GoMethod: "AddJsonPatch"}, + _jsii_.MemberProperty{JsiiProperty: "apiGroup", GoGetter: "ApiGroup"}, + _jsii_.MemberProperty{JsiiProperty: "apiVersion", GoGetter: "ApiVersion"}, + _jsii_.MemberProperty{JsiiProperty: "chart", GoGetter: "AddHelm"}, + _jsii_.MemberProperty{JsiiProperty: "kind", GoGetter: "Kind"}, + _jsii_.MemberProperty{JsiiProperty: "metadata", GoGetter: "Metadata"}, + _jsii_.MemberProperty{JsiiProperty: "name", GoGetter: "Name"}, + _jsii_.MemberProperty{JsiiProperty: "node", GoGetter: "Node"}, + _jsii_.MemberMethod{JsiiMethod: "toJson", GoMethod: "ToJson"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + }, + func() interface{} { + j := jsiiProxy_KubeValidatingWebhookConfiguration{} + _jsii_.InitJsiiProxy(&j.Type__cdk8sApiObject) + return &j + }, + ) + _jsii_.RegisterClass( + "k8s.KubeValidatingWebhookConfigurationList", + reflect.TypeOf((*KubeValidatingWebhookConfigurationList)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "addDependency", GoMethod: "AddDependency"}, + _jsii_.MemberMethod{JsiiMethod: "addJsonPatch", GoMethod: "AddJsonPatch"}, + _jsii_.MemberProperty{JsiiProperty: "apiGroup", GoGetter: "ApiGroup"}, + _jsii_.MemberProperty{JsiiProperty: "apiVersion", GoGetter: "ApiVersion"}, + _jsii_.MemberProperty{JsiiProperty: "chart", GoGetter: "AddHelm"}, + _jsii_.MemberProperty{JsiiProperty: "kind", GoGetter: "Kind"}, + _jsii_.MemberProperty{JsiiProperty: "metadata", GoGetter: "Metadata"}, + _jsii_.MemberProperty{JsiiProperty: "name", GoGetter: "Name"}, + _jsii_.MemberProperty{JsiiProperty: "node", GoGetter: "Node"}, + _jsii_.MemberMethod{JsiiMethod: "toJson", GoMethod: "ToJson"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + }, + func() interface{} { + j := jsiiProxy_KubeValidatingWebhookConfigurationList{} + _jsii_.InitJsiiProxy(&j.Type__cdk8sApiObject) + return &j + }, + ) + _jsii_.RegisterStruct( + "k8s.KubeValidatingWebhookConfigurationListProps", + reflect.TypeOf((*KubeValidatingWebhookConfigurationListProps)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.KubeValidatingWebhookConfigurationProps", + reflect.TypeOf((*KubeValidatingWebhookConfigurationProps)(nil)).Elem(), + ) + _jsii_.RegisterClass( + "k8s.KubeVolumeAttachment", + reflect.TypeOf((*KubeVolumeAttachment)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "addDependency", GoMethod: "AddDependency"}, + _jsii_.MemberMethod{JsiiMethod: "addJsonPatch", GoMethod: "AddJsonPatch"}, + _jsii_.MemberProperty{JsiiProperty: "apiGroup", GoGetter: "ApiGroup"}, + _jsii_.MemberProperty{JsiiProperty: "apiVersion", GoGetter: "ApiVersion"}, + _jsii_.MemberProperty{JsiiProperty: "chart", GoGetter: "AddHelm"}, + _jsii_.MemberProperty{JsiiProperty: "kind", GoGetter: "Kind"}, + _jsii_.MemberProperty{JsiiProperty: "metadata", GoGetter: "Metadata"}, + _jsii_.MemberProperty{JsiiProperty: "name", GoGetter: "Name"}, + _jsii_.MemberProperty{JsiiProperty: "node", GoGetter: "Node"}, + _jsii_.MemberMethod{JsiiMethod: "toJson", GoMethod: "ToJson"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + }, + func() interface{} { + j := jsiiProxy_KubeVolumeAttachment{} + _jsii_.InitJsiiProxy(&j.Type__cdk8sApiObject) + return &j + }, + ) + _jsii_.RegisterClass( + "k8s.KubeVolumeAttachmentList", + reflect.TypeOf((*KubeVolumeAttachmentList)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "addDependency", GoMethod: "AddDependency"}, + _jsii_.MemberMethod{JsiiMethod: "addJsonPatch", GoMethod: "AddJsonPatch"}, + _jsii_.MemberProperty{JsiiProperty: "apiGroup", GoGetter: "ApiGroup"}, + _jsii_.MemberProperty{JsiiProperty: "apiVersion", GoGetter: "ApiVersion"}, + _jsii_.MemberProperty{JsiiProperty: "chart", GoGetter: "AddHelm"}, + _jsii_.MemberProperty{JsiiProperty: "kind", GoGetter: "Kind"}, + _jsii_.MemberProperty{JsiiProperty: "metadata", GoGetter: "Metadata"}, + _jsii_.MemberProperty{JsiiProperty: "name", GoGetter: "Name"}, + _jsii_.MemberProperty{JsiiProperty: "node", GoGetter: "Node"}, + _jsii_.MemberMethod{JsiiMethod: "toJson", GoMethod: "ToJson"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + }, + func() interface{} { + j := jsiiProxy_KubeVolumeAttachmentList{} + _jsii_.InitJsiiProxy(&j.Type__cdk8sApiObject) + return &j + }, + ) + _jsii_.RegisterStruct( + "k8s.KubeVolumeAttachmentListProps", + reflect.TypeOf((*KubeVolumeAttachmentListProps)(nil)).Elem(), + ) + _jsii_.RegisterClass( + "k8s.KubeVolumeAttachmentListV1Alpha1", + reflect.TypeOf((*KubeVolumeAttachmentListV1Alpha1)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "addDependency", GoMethod: "AddDependency"}, + _jsii_.MemberMethod{JsiiMethod: "addJsonPatch", GoMethod: "AddJsonPatch"}, + _jsii_.MemberProperty{JsiiProperty: "apiGroup", GoGetter: "ApiGroup"}, + _jsii_.MemberProperty{JsiiProperty: "apiVersion", GoGetter: "ApiVersion"}, + _jsii_.MemberProperty{JsiiProperty: "chart", GoGetter: "AddHelm"}, + _jsii_.MemberProperty{JsiiProperty: "kind", GoGetter: "Kind"}, + _jsii_.MemberProperty{JsiiProperty: "metadata", GoGetter: "Metadata"}, + _jsii_.MemberProperty{JsiiProperty: "name", GoGetter: "Name"}, + _jsii_.MemberProperty{JsiiProperty: "node", GoGetter: "Node"}, + _jsii_.MemberMethod{JsiiMethod: "toJson", GoMethod: "ToJson"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + }, + func() interface{} { + j := jsiiProxy_KubeVolumeAttachmentListV1Alpha1{} + _jsii_.InitJsiiProxy(&j.Type__cdk8sApiObject) + return &j + }, + ) + _jsii_.RegisterStruct( + "k8s.KubeVolumeAttachmentListV1Alpha1Props", + reflect.TypeOf((*KubeVolumeAttachmentListV1Alpha1Props)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.KubeVolumeAttachmentProps", + reflect.TypeOf((*KubeVolumeAttachmentProps)(nil)).Elem(), + ) + _jsii_.RegisterClass( + "k8s.KubeVolumeAttachmentV1Alpha1", + reflect.TypeOf((*KubeVolumeAttachmentV1Alpha1)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "addDependency", GoMethod: "AddDependency"}, + _jsii_.MemberMethod{JsiiMethod: "addJsonPatch", GoMethod: "AddJsonPatch"}, + _jsii_.MemberProperty{JsiiProperty: "apiGroup", GoGetter: "ApiGroup"}, + _jsii_.MemberProperty{JsiiProperty: "apiVersion", GoGetter: "ApiVersion"}, + _jsii_.MemberProperty{JsiiProperty: "chart", GoGetter: "AddHelm"}, + _jsii_.MemberProperty{JsiiProperty: "kind", GoGetter: "Kind"}, + _jsii_.MemberProperty{JsiiProperty: "metadata", GoGetter: "Metadata"}, + _jsii_.MemberProperty{JsiiProperty: "name", GoGetter: "Name"}, + _jsii_.MemberProperty{JsiiProperty: "node", GoGetter: "Node"}, + _jsii_.MemberMethod{JsiiMethod: "toJson", GoMethod: "ToJson"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + }, + func() interface{} { + j := jsiiProxy_KubeVolumeAttachmentV1Alpha1{} + _jsii_.InitJsiiProxy(&j.Type__cdk8sApiObject) + return &j + }, + ) + _jsii_.RegisterStruct( + "k8s.KubeVolumeAttachmentV1Alpha1Props", + reflect.TypeOf((*KubeVolumeAttachmentV1Alpha1Props)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.LabelSelector", + reflect.TypeOf((*LabelSelector)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.LabelSelectorRequirement", + reflect.TypeOf((*LabelSelectorRequirement)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.LeaseSpec", + reflect.TypeOf((*LeaseSpec)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.Lifecycle", + reflect.TypeOf((*Lifecycle)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.LimitRangeItem", + reflect.TypeOf((*LimitRangeItem)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.LimitRangeSpec", + reflect.TypeOf((*LimitRangeSpec)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.LimitResponseV1Beta1", + reflect.TypeOf((*LimitResponseV1Beta1)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.LimitedPriorityLevelConfigurationV1Beta1", + reflect.TypeOf((*LimitedPriorityLevelConfigurationV1Beta1)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.ListMeta", + reflect.TypeOf((*ListMeta)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.LocalObjectReference", + reflect.TypeOf((*LocalObjectReference)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.LocalVolumeSource", + reflect.TypeOf((*LocalVolumeSource)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.ManagedFieldsEntry", + reflect.TypeOf((*ManagedFieldsEntry)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.MetricIdentifierV2Beta2", + reflect.TypeOf((*MetricIdentifierV2Beta2)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.MetricSpecV2Beta1", + reflect.TypeOf((*MetricSpecV2Beta1)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.MetricSpecV2Beta2", + reflect.TypeOf((*MetricSpecV2Beta2)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.MetricTargetV2Beta2", + reflect.TypeOf((*MetricTargetV2Beta2)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.MutatingWebhook", + reflect.TypeOf((*MutatingWebhook)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.NamespaceSpec", + reflect.TypeOf((*NamespaceSpec)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.NetworkPolicyEgressRule", + reflect.TypeOf((*NetworkPolicyEgressRule)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.NetworkPolicyIngressRule", + reflect.TypeOf((*NetworkPolicyIngressRule)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.NetworkPolicyPeer", + reflect.TypeOf((*NetworkPolicyPeer)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.NetworkPolicyPort", + reflect.TypeOf((*NetworkPolicyPort)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.NetworkPolicySpec", + reflect.TypeOf((*NetworkPolicySpec)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.NfsVolumeSource", + reflect.TypeOf((*NfsVolumeSource)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.NodeAffinity", + reflect.TypeOf((*NodeAffinity)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.NodeConfigSource", + reflect.TypeOf((*NodeConfigSource)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.NodeSelector", + reflect.TypeOf((*NodeSelector)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.NodeSelectorRequirement", + reflect.TypeOf((*NodeSelectorRequirement)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.NodeSelectorTerm", + reflect.TypeOf((*NodeSelectorTerm)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.NodeSpec", + reflect.TypeOf((*NodeSpec)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.NonResourceAttributes", + reflect.TypeOf((*NonResourceAttributes)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.NonResourcePolicyRuleV1Beta1", + reflect.TypeOf((*NonResourcePolicyRuleV1Beta1)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.ObjectFieldSelector", + reflect.TypeOf((*ObjectFieldSelector)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.ObjectMeta", + reflect.TypeOf((*ObjectMeta)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.ObjectMetricSourceV2Beta1", + reflect.TypeOf((*ObjectMetricSourceV2Beta1)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.ObjectMetricSourceV2Beta2", + reflect.TypeOf((*ObjectMetricSourceV2Beta2)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.ObjectReference", + reflect.TypeOf((*ObjectReference)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.Overhead", + reflect.TypeOf((*Overhead)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.OverheadV1Alpha1", + reflect.TypeOf((*OverheadV1Alpha1)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.OverheadV1Beta1", + reflect.TypeOf((*OverheadV1Beta1)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.OwnerReference", + reflect.TypeOf((*OwnerReference)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.PersistentVolumeClaimSpec", + reflect.TypeOf((*PersistentVolumeClaimSpec)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.PersistentVolumeClaimTemplate", + reflect.TypeOf((*PersistentVolumeClaimTemplate)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.PersistentVolumeClaimVolumeSource", + reflect.TypeOf((*PersistentVolumeClaimVolumeSource)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.PersistentVolumeSpec", + reflect.TypeOf((*PersistentVolumeSpec)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.PhotonPersistentDiskVolumeSource", + reflect.TypeOf((*PhotonPersistentDiskVolumeSource)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.PodAffinity", + reflect.TypeOf((*PodAffinity)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.PodAffinityTerm", + reflect.TypeOf((*PodAffinityTerm)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.PodAntiAffinity", + reflect.TypeOf((*PodAntiAffinity)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.PodDisruptionBudgetSpec", + reflect.TypeOf((*PodDisruptionBudgetSpec)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.PodDisruptionBudgetSpecV1Beta1", + reflect.TypeOf((*PodDisruptionBudgetSpecV1Beta1)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.PodDnsConfig", + reflect.TypeOf((*PodDnsConfig)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.PodDnsConfigOption", + reflect.TypeOf((*PodDnsConfigOption)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.PodReadinessGate", + reflect.TypeOf((*PodReadinessGate)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.PodSecurityContext", + reflect.TypeOf((*PodSecurityContext)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.PodSecurityPolicySpecV1Beta1", + reflect.TypeOf((*PodSecurityPolicySpecV1Beta1)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.PodSpec", + reflect.TypeOf((*PodSpec)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.PodTemplateSpec", + reflect.TypeOf((*PodTemplateSpec)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.PodsMetricSourceV2Beta1", + reflect.TypeOf((*PodsMetricSourceV2Beta1)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.PodsMetricSourceV2Beta2", + reflect.TypeOf((*PodsMetricSourceV2Beta2)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.PolicyRule", + reflect.TypeOf((*PolicyRule)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.PolicyRuleV1Alpha1", + reflect.TypeOf((*PolicyRuleV1Alpha1)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.PolicyRulesWithSubjectsV1Beta1", + reflect.TypeOf((*PolicyRulesWithSubjectsV1Beta1)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.PortworxVolumeSource", + reflect.TypeOf((*PortworxVolumeSource)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.Preconditions", + reflect.TypeOf((*Preconditions)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.PreferredSchedulingTerm", + reflect.TypeOf((*PreferredSchedulingTerm)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.PriorityLevelConfigurationReferenceV1Beta1", + reflect.TypeOf((*PriorityLevelConfigurationReferenceV1Beta1)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.PriorityLevelConfigurationSpecV1Beta1", + reflect.TypeOf((*PriorityLevelConfigurationSpecV1Beta1)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.Probe", + reflect.TypeOf((*Probe)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.ProjectedVolumeSource", + reflect.TypeOf((*ProjectedVolumeSource)(nil)).Elem(), + ) + _jsii_.RegisterClass( + "k8s.Quantity", + reflect.TypeOf((*Quantity)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberProperty{JsiiProperty: "value", GoGetter: "Value"}, + }, + func() interface{} { + return &jsiiProxy_Quantity{} + }, + ) + _jsii_.RegisterStruct( + "k8s.QueuingConfigurationV1Beta1", + reflect.TypeOf((*QueuingConfigurationV1Beta1)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.QuobyteVolumeSource", + reflect.TypeOf((*QuobyteVolumeSource)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.RbdPersistentVolumeSource", + reflect.TypeOf((*RbdPersistentVolumeSource)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.RbdVolumeSource", + reflect.TypeOf((*RbdVolumeSource)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.ReplicaSetSpec", + reflect.TypeOf((*ReplicaSetSpec)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.ReplicationControllerSpec", + reflect.TypeOf((*ReplicationControllerSpec)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.ResourceAttributes", + reflect.TypeOf((*ResourceAttributes)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.ResourceFieldSelector", + reflect.TypeOf((*ResourceFieldSelector)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.ResourceMetricSourceV2Beta1", + reflect.TypeOf((*ResourceMetricSourceV2Beta1)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.ResourceMetricSourceV2Beta2", + reflect.TypeOf((*ResourceMetricSourceV2Beta2)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.ResourcePolicyRuleV1Beta1", + reflect.TypeOf((*ResourcePolicyRuleV1Beta1)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.ResourceQuotaSpec", + reflect.TypeOf((*ResourceQuotaSpec)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.ResourceRequirements", + reflect.TypeOf((*ResourceRequirements)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.RoleRef", + reflect.TypeOf((*RoleRef)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.RoleRefV1Alpha1", + reflect.TypeOf((*RoleRefV1Alpha1)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.RollingUpdateDaemonSet", + reflect.TypeOf((*RollingUpdateDaemonSet)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.RollingUpdateDeployment", + reflect.TypeOf((*RollingUpdateDeployment)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.RollingUpdateStatefulSetStrategy", + reflect.TypeOf((*RollingUpdateStatefulSetStrategy)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.RuleWithOperations", + reflect.TypeOf((*RuleWithOperations)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.RunAsGroupStrategyOptionsV1Beta1", + reflect.TypeOf((*RunAsGroupStrategyOptionsV1Beta1)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.RunAsUserStrategyOptionsV1Beta1", + reflect.TypeOf((*RunAsUserStrategyOptionsV1Beta1)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.RuntimeClassSpecV1Alpha1", + reflect.TypeOf((*RuntimeClassSpecV1Alpha1)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.RuntimeClassStrategyOptionsV1Beta1", + reflect.TypeOf((*RuntimeClassStrategyOptionsV1Beta1)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.ScaleIoPersistentVolumeSource", + reflect.TypeOf((*ScaleIoPersistentVolumeSource)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.ScaleIoVolumeSource", + reflect.TypeOf((*ScaleIoVolumeSource)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.ScaleSpec", + reflect.TypeOf((*ScaleSpec)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.Scheduling", + reflect.TypeOf((*Scheduling)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.SchedulingV1Alpha1", + reflect.TypeOf((*SchedulingV1Alpha1)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.SchedulingV1Beta1", + reflect.TypeOf((*SchedulingV1Beta1)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.ScopeSelector", + reflect.TypeOf((*ScopeSelector)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.ScopedResourceSelectorRequirement", + reflect.TypeOf((*ScopedResourceSelectorRequirement)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.SeLinuxOptions", + reflect.TypeOf((*SeLinuxOptions)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.SeLinuxStrategyOptionsV1Beta1", + reflect.TypeOf((*SeLinuxStrategyOptionsV1Beta1)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.SeccompProfile", + reflect.TypeOf((*SeccompProfile)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.SecretEnvSource", + reflect.TypeOf((*SecretEnvSource)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.SecretKeySelector", + reflect.TypeOf((*SecretKeySelector)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.SecretProjection", + reflect.TypeOf((*SecretProjection)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.SecretReference", + reflect.TypeOf((*SecretReference)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.SecretVolumeSource", + reflect.TypeOf((*SecretVolumeSource)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.SecurityContext", + reflect.TypeOf((*SecurityContext)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.SelfSubjectAccessReviewSpec", + reflect.TypeOf((*SelfSubjectAccessReviewSpec)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.SelfSubjectRulesReviewSpec", + reflect.TypeOf((*SelfSubjectRulesReviewSpec)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.ServiceAccountSubjectV1Beta1", + reflect.TypeOf((*ServiceAccountSubjectV1Beta1)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.ServiceAccountTokenProjection", + reflect.TypeOf((*ServiceAccountTokenProjection)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.ServiceBackendPort", + reflect.TypeOf((*ServiceBackendPort)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.ServicePort", + reflect.TypeOf((*ServicePort)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.ServiceReference", + reflect.TypeOf((*ServiceReference)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.ServiceSpec", + reflect.TypeOf((*ServiceSpec)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.SessionAffinityConfig", + reflect.TypeOf((*SessionAffinityConfig)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.StatefulSetSpec", + reflect.TypeOf((*StatefulSetSpec)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.StatefulSetUpdateStrategy", + reflect.TypeOf((*StatefulSetUpdateStrategy)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.StatusCause", + reflect.TypeOf((*StatusCause)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.StatusDetails", + reflect.TypeOf((*StatusDetails)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.StorageOsPersistentVolumeSource", + reflect.TypeOf((*StorageOsPersistentVolumeSource)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.StorageOsVolumeSource", + reflect.TypeOf((*StorageOsVolumeSource)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.Subject", + reflect.TypeOf((*Subject)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.SubjectAccessReviewSpec", + reflect.TypeOf((*SubjectAccessReviewSpec)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.SubjectV1Alpha1", + reflect.TypeOf((*SubjectV1Alpha1)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.SubjectV1Beta1", + reflect.TypeOf((*SubjectV1Beta1)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.SupplementalGroupsStrategyOptionsV1Beta1", + reflect.TypeOf((*SupplementalGroupsStrategyOptionsV1Beta1)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.Sysctl", + reflect.TypeOf((*Sysctl)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.Taint", + reflect.TypeOf((*Taint)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.TcpSocketAction", + reflect.TypeOf((*TcpSocketAction)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.TokenRequest", + reflect.TypeOf((*TokenRequest)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.TokenRequestSpec", + reflect.TypeOf((*TokenRequestSpec)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.TokenReviewSpec", + reflect.TypeOf((*TokenReviewSpec)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.Toleration", + reflect.TypeOf((*Toleration)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.TopologySelectorLabelRequirement", + reflect.TypeOf((*TopologySelectorLabelRequirement)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.TopologySelectorTerm", + reflect.TypeOf((*TopologySelectorTerm)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.TopologySpreadConstraint", + reflect.TypeOf((*TopologySpreadConstraint)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.TypedLocalObjectReference", + reflect.TypeOf((*TypedLocalObjectReference)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.UserSubjectV1Beta1", + reflect.TypeOf((*UserSubjectV1Beta1)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.ValidatingWebhook", + reflect.TypeOf((*ValidatingWebhook)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.Volume", + reflect.TypeOf((*Volume)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.VolumeAttachmentSource", + reflect.TypeOf((*VolumeAttachmentSource)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.VolumeAttachmentSourceV1Alpha1", + reflect.TypeOf((*VolumeAttachmentSourceV1Alpha1)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.VolumeAttachmentSpec", + reflect.TypeOf((*VolumeAttachmentSpec)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.VolumeAttachmentSpecV1Alpha1", + reflect.TypeOf((*VolumeAttachmentSpecV1Alpha1)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.VolumeDevice", + reflect.TypeOf((*VolumeDevice)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.VolumeMount", + reflect.TypeOf((*VolumeMount)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.VolumeNodeAffinity", + reflect.TypeOf((*VolumeNodeAffinity)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.VolumeNodeResources", + reflect.TypeOf((*VolumeNodeResources)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.VolumeProjection", + reflect.TypeOf((*VolumeProjection)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.VsphereVirtualDiskVolumeSource", + reflect.TypeOf((*VsphereVirtualDiskVolumeSource)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.WebhookClientConfig", + reflect.TypeOf((*WebhookClientConfig)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.WebhookConversion", + reflect.TypeOf((*WebhookConversion)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.WeightedPodAffinityTerm", + reflect.TypeOf((*WeightedPodAffinityTerm)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "k8s.WindowsSecurityContextOptions", + reflect.TypeOf((*WindowsSecurityContextOptions)(nil)).Elem(), + ) +} diff --git a/env/imports/k8s/networkchaos/chaosmeshorg/chaosmeshorg.go b/env/imports/k8s/networkchaos/chaosmeshorg/chaosmeshorg.go new file mode 100644 index 000000000..ecbe12a48 --- /dev/null +++ b/env/imports/k8s/networkchaos/chaosmeshorg/chaosmeshorg.go @@ -0,0 +1,565 @@ +// chaos-meshorg +package chaosmeshorg + +import ( + _jsii_ "github.com/aws/jsii-runtime-go/runtime" + _init_ "github.com/smartcontractkit/chainlink-testing-framework/env/imports/k8s/networkchaos/chaosmeshorg/jsii" + + "github.com/aws/constructs-go/constructs/v10" + "github.com/cdk8s-team/cdk8s-core-go/cdk8s/v2" + "github.com/smartcontractkit/chainlink-testing-framework/env/imports/k8s/networkchaos/chaosmeshorg/internal" +) + +// NetworkChaos is the Schema for the networkchaos API. +type NetworkChaos interface { + cdk8s.ApiObject + // The group portion of the API version (e.g. `authorization.k8s.io`). + ApiGroup() *string + // The object's API version (e.g. `authorization.k8s.io/v1`). + ApiVersion() *string + // The chart in which this object is defined. + Chart() cdk8s.Chart + // The object kind. + Kind() *string + // Metadata associated with this API object. + Metadata() cdk8s.ApiObjectMetadataDefinition + // The name of the API object. + // + // If a name is specified in `metadata.name` this will be the name returned. + // Otherwise, a name will be generated by calling + // `Chart.of(this).generatedObjectName(this)`, which by default uses the + // construct path to generate a DNS-compatible name for the resource. + Name() *string + // The tree node. + Node() constructs.Node + // Create a dependency between this ApiObject and other constructs. + // + // These can be other ApiObjects, Charts, or custom. + AddDependency(dependencies ...constructs.IConstruct) + // Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. + // + // Example: + // kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true)); + // + AddJsonPatch(ops ...cdk8s.JsonPatch) + // Renders the object to Kubernetes JSON. + ToJson() interface{} + // Returns a string representation of this construct. + ToString() *string +} + +// The jsii proxy struct for NetworkChaos +type jsiiProxy_NetworkChaos struct { + internal.Type__cdk8sApiObject +} + +func (j *jsiiProxy_NetworkChaos) ApiGroup() *string { + var returns *string + _jsii_.Get( + j, + "apiGroup", + &returns, + ) + return returns +} + +func (j *jsiiProxy_NetworkChaos) ApiVersion() *string { + var returns *string + _jsii_.Get( + j, + "apiVersion", + &returns, + ) + return returns +} + +func (j *jsiiProxy_NetworkChaos) Chart() cdk8s.Chart { + var returns cdk8s.Chart + _jsii_.Get( + j, + "chart", + &returns, + ) + return returns +} + +func (j *jsiiProxy_NetworkChaos) Kind() *string { + var returns *string + _jsii_.Get( + j, + "kind", + &returns, + ) + return returns +} + +func (j *jsiiProxy_NetworkChaos) Metadata() cdk8s.ApiObjectMetadataDefinition { + var returns cdk8s.ApiObjectMetadataDefinition + _jsii_.Get( + j, + "metadata", + &returns, + ) + return returns +} + +func (j *jsiiProxy_NetworkChaos) Name() *string { + var returns *string + _jsii_.Get( + j, + "name", + &returns, + ) + return returns +} + +func (j *jsiiProxy_NetworkChaos) Node() constructs.Node { + var returns constructs.Node + _jsii_.Get( + j, + "node", + &returns, + ) + return returns +} + +// Defines a "NetworkChaos" API object. +func NewNetworkChaos(scope constructs.Construct, id *string, props *NetworkChaosProps) NetworkChaos { + _init_.Initialize() + + j := jsiiProxy_NetworkChaos{} + + _jsii_.Create( + "chaos-meshorg.NetworkChaos", + []interface{}{scope, id, props}, + &j, + ) + + return &j +} + +// Defines a "NetworkChaos" API object. +func NewNetworkChaos_Override(n NetworkChaos, scope constructs.Construct, id *string, props *NetworkChaosProps) { + _init_.Initialize() + + _jsii_.Create( + "chaos-meshorg.NetworkChaos", + []interface{}{scope, id, props}, + n, + ) +} + +// Checks if `x` is a construct. +// +// Use this method instead of `instanceof` to properly detect `Construct` +// instances, even when the construct library is symlinked. +// +// Explanation: in JavaScript, multiple copies of the `constructs` library on +// disk are seen as independent, completely different libraries. As a +// consequence, the class `Construct` in each copy of the `constructs` library +// is seen as a different class, and an instance of one class will not test as +// `instanceof` the other class. `npm install` will not create installations +// like this, but users may manually symlink construct libraries together or +// use a monorepo tool: in those cases, multiple copies of the `constructs` +// library can be accidentally installed, and `instanceof` will behave +// unpredictably. It is safest to avoid using `instanceof`, and using +// this type-testing method instead. +// +// Returns: true if `x` is an object created from a class which extends `Construct`. +func NetworkChaos_IsConstruct(x interface{}) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "chaos-meshorg.NetworkChaos", + "isConstruct", + []interface{}{x}, + &returns, + ) + + return returns +} + +// Renders a Kubernetes manifest for "NetworkChaos". +// +// This can be used to inline resource manifests inside other objects (e.g. as templates). +func NetworkChaos_Manifest(props *NetworkChaosProps) interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "chaos-meshorg.NetworkChaos", + "manifest", + []interface{}{props}, + &returns, + ) + + return returns +} + +// Returns the `ApiObject` named `Resource` which is a child of the given construct. +// +// If `c` is an `ApiObject`, it is returned directly. Throws an +// exception if the construct does not have a child named `Default` _or_ if +// this child is not an `ApiObject`. +func NetworkChaos_Of(c constructs.IConstruct) cdk8s.ApiObject { + _init_.Initialize() + + var returns cdk8s.ApiObject + + _jsii_.StaticInvoke( + "chaos-meshorg.NetworkChaos", + "of", + []interface{}{c}, + &returns, + ) + + return returns +} + +func NetworkChaos_GVK() *cdk8s.GroupVersionKind { + _init_.Initialize() + var returns *cdk8s.GroupVersionKind + _jsii_.StaticGet( + "chaos-meshorg.NetworkChaos", + "GVK", + &returns, + ) + return returns +} + +func (n *jsiiProxy_NetworkChaos) AddDependency(dependencies ...constructs.IConstruct) { + args := []interface{}{} + for _, a := range dependencies { + args = append(args, a) + } + + _jsii_.InvokeVoid( + n, + "addDependency", + args, + ) +} + +func (n *jsiiProxy_NetworkChaos) AddJsonPatch(ops ...cdk8s.JsonPatch) { + args := []interface{}{} + for _, a := range ops { + args = append(args, a) + } + + _jsii_.InvokeVoid( + n, + "addJsonPatch", + args, + ) +} + +func (n *jsiiProxy_NetworkChaos) ToJson() interface{} { + var returns interface{} + + _jsii_.Invoke( + n, + "toJson", + nil, // no parameters + &returns, + ) + + return returns +} + +func (n *jsiiProxy_NetworkChaos) ToString() *string { + var returns *string + + _jsii_.Invoke( + n, + "toString", + nil, // no parameters + &returns, + ) + + return returns +} + +// NetworkChaos is the Schema for the networkchaos API. +type NetworkChaosProps struct { + // Spec defines the behavior of a pod chaos experiment. + Spec *NetworkChaosSpec `field:"required" json:"spec" yaml:"spec"` + Metadata *cdk8s.ApiObjectMetadata `field:"optional" json:"metadata" yaml:"metadata"` +} + +// Spec defines the behavior of a pod chaos experiment. +type NetworkChaosSpec struct { + // Action defines the specific network chaos action. + // + // Supported action: partition, netem, delay, loss, duplicate, corrupt Default action: delay. + Action NetworkChaosSpecAction `field:"required" json:"action" yaml:"action"` + // Mode defines the mode to run chaos action. + // + // Supported mode: one / all / fixed / fixed-percent / random-max-percent. + Mode NetworkChaosSpecMode `field:"required" json:"mode" yaml:"mode"` + // Selector is used to select pods that are used to inject chaos action. + Selector *NetworkChaosSpecSelector `field:"required" json:"selector" yaml:"selector"` + // Bandwidth represents the detail about bandwidth control action. + Bandwidth *NetworkChaosSpecBandwidth `field:"optional" json:"bandwidth" yaml:"bandwidth"` + // Corrupt represents the detail about corrupt action. + Corrupt *NetworkChaosSpecCorrupt `field:"optional" json:"corrupt" yaml:"corrupt"` + // Delay represents the detail about delay action. + Delay *NetworkChaosSpecDelay `field:"optional" json:"delay" yaml:"delay"` + // Direction represents the direction, this applies on netem and network partition action. + Direction NetworkChaosSpecDirection `field:"optional" json:"direction" yaml:"direction"` + // DuplicateSpec represents the detail about loss action. + Duplicate *NetworkChaosSpecDuplicate `field:"optional" json:"duplicate" yaml:"duplicate"` + // Duration represents the duration of the chaos action. + Duration *string `field:"optional" json:"duration" yaml:"duration"` + // ExternalTargets represents network targets outside k8s. + ExternalTargets *[]*string `field:"optional" json:"externalTargets" yaml:"externalTargets"` + // Loss represents the detail about loss action. + Loss *NetworkChaosSpecLoss `field:"optional" json:"loss" yaml:"loss"` + // Target represents network target, this applies on netem and network partition action. + Target *NetworkChaosSpecTarget `field:"optional" json:"target" yaml:"target"` + // Value is required when the mode is set to `FixedPodMode` / `FixedPercentPodMod` / `RandomMaxPercentPodMod`. + // + // If `FixedPodMode`, provide an integer of pods to do chaos action. If `FixedPercentPodMod`, provide a number from 0-100 to specify the percent of pods the server can do chaos action. IF `RandomMaxPercentPodMod`, provide a number from 0-100 to specify the max percent of pods to do chaos action + Value *string `field:"optional" json:"value" yaml:"value"` +} + +// Action defines the specific network chaos action. +// +// Supported action: partition, netem, delay, loss, duplicate, corrupt Default action: delay. +type NetworkChaosSpecAction string + +const ( + // netem. + NetworkChaosSpecAction_NETEM NetworkChaosSpecAction = "NETEM" + // delay. + NetworkChaosSpecAction_DELAY NetworkChaosSpecAction = "DELAY" + // loss. + NetworkChaosSpecAction_LOSS NetworkChaosSpecAction = "LOSS" + // duplicate. + NetworkChaosSpecAction_DUPLICATE NetworkChaosSpecAction = "DUPLICATE" + // corrupt. + NetworkChaosSpecAction_CORRUPT NetworkChaosSpecAction = "CORRUPT" + // partition. + NetworkChaosSpecAction_PARTITION NetworkChaosSpecAction = "PARTITION" + // bandwidth. + NetworkChaosSpecAction_BANDWIDTH NetworkChaosSpecAction = "BANDWIDTH" +) + +// Bandwidth represents the detail about bandwidth control action. +type NetworkChaosSpecBandwidth struct { + // Buffer is the maximum amount of bytes that tokens can be available for instantaneously. + Buffer *float64 `field:"required" json:"buffer" yaml:"buffer"` + // Limit is the number of bytes that can be queued waiting for tokens to become available. + Limit *float64 `field:"required" json:"limit" yaml:"limit"` + // Rate is the speed knob. + // + // Allows bps, kbps, mbps, gbps, tbps unit. bps means bytes per second. + Rate *string `field:"required" json:"rate" yaml:"rate"` + // Minburst specifies the size of the peakrate bucket. + // + // For perfect accuracy, should be set to the MTU of the interface. If a peakrate is needed, but some burstiness is acceptable, this size can be raised. A 3000 byte minburst allows around 3mbit/s of peakrate, given 1000 byte packets. + Minburst *float64 `field:"optional" json:"minburst" yaml:"minburst"` + // Peakrate is the maximum depletion rate of the bucket. + // + // The peakrate does not need to be set, it is only necessary if perfect millisecond timescale shaping is required. + Peakrate *float64 `field:"optional" json:"peakrate" yaml:"peakrate"` +} + +// Corrupt represents the detail about corrupt action. +type NetworkChaosSpecCorrupt struct { + Corrupt *string `field:"required" json:"corrupt" yaml:"corrupt"` + Correlation *string `field:"optional" json:"correlation" yaml:"correlation"` +} + +// Delay represents the detail about delay action. +type NetworkChaosSpecDelay struct { + Latency *string `field:"required" json:"latency" yaml:"latency"` + Correlation *string `field:"optional" json:"correlation" yaml:"correlation"` + Jitter *string `field:"optional" json:"jitter" yaml:"jitter"` + // ReorderSpec defines details of packet reorder. + Reorder *NetworkChaosSpecDelayReorder `field:"optional" json:"reorder" yaml:"reorder"` +} + +// ReorderSpec defines details of packet reorder. +type NetworkChaosSpecDelayReorder struct { + Gap *float64 `field:"required" json:"gap" yaml:"gap"` + Reorder *string `field:"required" json:"reorder" yaml:"reorder"` + Correlation *string `field:"optional" json:"correlation" yaml:"correlation"` +} + +// Direction represents the direction, this applies on netem and network partition action. +type NetworkChaosSpecDirection string + +const ( + // to. + NetworkChaosSpecDirection_TO NetworkChaosSpecDirection = "TO" + // from. + NetworkChaosSpecDirection_FROM NetworkChaosSpecDirection = "FROM" + // both. + NetworkChaosSpecDirection_BOTH NetworkChaosSpecDirection = "BOTH" + NetworkChaosSpecDirection_VALUE_ NetworkChaosSpecDirection = "VALUE_" +) + +// DuplicateSpec represents the detail about loss action. +type NetworkChaosSpecDuplicate struct { + Duplicate *string `field:"required" json:"duplicate" yaml:"duplicate"` + Correlation *string `field:"optional" json:"correlation" yaml:"correlation"` +} + +// Loss represents the detail about loss action. +type NetworkChaosSpecLoss struct { + Loss *string `field:"required" json:"loss" yaml:"loss"` + Correlation *string `field:"optional" json:"correlation" yaml:"correlation"` +} + +// Mode defines the mode to run chaos action. +// +// Supported mode: one / all / fixed / fixed-percent / random-max-percent. +type NetworkChaosSpecMode string + +const ( + // one. + NetworkChaosSpecMode_ONE NetworkChaosSpecMode = "ONE" + // all. + NetworkChaosSpecMode_ALL NetworkChaosSpecMode = "ALL" + // fixed. + NetworkChaosSpecMode_FIXED NetworkChaosSpecMode = "FIXED" + // fixed-percent. + NetworkChaosSpecMode_FIXED_PERCENT NetworkChaosSpecMode = "FIXED_PERCENT" + // random-max-percent. + NetworkChaosSpecMode_RANDOM_MAX_PERCENT NetworkChaosSpecMode = "RANDOM_MAX_PERCENT" +) + +// Selector is used to select pods that are used to inject chaos action. +type NetworkChaosSpecSelector struct { + // Map of string keys and values that can be used to select objects. + // + // A selector based on annotations. + AnnotationSelectors *map[string]*string `field:"optional" json:"annotationSelectors" yaml:"annotationSelectors"` + // a slice of label selector expressions that can be used to select objects. + // + // A list of selectors based on set-based label expressions. + ExpressionSelectors *[]*NetworkChaosSpecSelectorExpressionSelectors `field:"optional" json:"expressionSelectors" yaml:"expressionSelectors"` + // Map of string keys and values that can be used to select objects. + // + // A selector based on fields. + FieldSelectors *map[string]*string `field:"optional" json:"fieldSelectors" yaml:"fieldSelectors"` + // Map of string keys and values that can be used to select objects. + // + // A selector based on labels. + LabelSelectors *map[string]*string `field:"optional" json:"labelSelectors" yaml:"labelSelectors"` + // Namespaces is a set of namespace to which objects belong. + Namespaces *[]*string `field:"optional" json:"namespaces" yaml:"namespaces"` + // Nodes is a set of node name and objects must belong to these nodes. + Nodes *[]*string `field:"optional" json:"nodes" yaml:"nodes"` + // Map of string keys and values that can be used to select nodes. + // + // Selector which must match a node's labels, and objects must belong to these selected nodes. + NodeSelectors *map[string]*string `field:"optional" json:"nodeSelectors" yaml:"nodeSelectors"` + // PodPhaseSelectors is a set of condition of a pod at the current time. + // + // supported value: Pending / Running / Succeeded / Failed / Unknown. + PodPhaseSelectors *[]*string `field:"optional" json:"podPhaseSelectors" yaml:"podPhaseSelectors"` + // Pods is a map of string keys and a set values that used to select pods. + // + // The key defines the namespace which pods belong, and the each values is a set of pod names. + Pods *map[string]*[]*string `field:"optional" json:"pods" yaml:"pods"` +} + +// A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. +type NetworkChaosSpecSelectorExpressionSelectors struct { + // key is the label key that the selector applies to. + Key *string `field:"required" json:"key" yaml:"key"` + // operator represents a key's relationship to a set of values. + // + // Valid operators are In, NotIn, Exists and DoesNotExist. + Operator *string `field:"required" json:"operator" yaml:"operator"` + // 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. + Values *[]*string `field:"optional" json:"values" yaml:"values"` +} + +// Target represents network target, this applies on netem and network partition action. +type NetworkChaosSpecTarget struct { + // Mode defines the mode to run chaos action. + // + // Supported mode: one / all / fixed / fixed-percent / random-max-percent. + Mode NetworkChaosSpecTargetMode `field:"required" json:"mode" yaml:"mode"` + // Selector is used to select pods that are used to inject chaos action. + Selector *NetworkChaosSpecTargetSelector `field:"required" json:"selector" yaml:"selector"` + // Value is required when the mode is set to `FixedPodMode` / `FixedPercentPodMod` / `RandomMaxPercentPodMod`. + // + // If `FixedPodMode`, provide an integer of pods to do chaos action. If `FixedPercentPodMod`, provide a number from 0-100 to specify the percent of pods the server can do chaos action. IF `RandomMaxPercentPodMod`, provide a number from 0-100 to specify the max percent of pods to do chaos action + Value *string `field:"optional" json:"value" yaml:"value"` +} + +// Mode defines the mode to run chaos action. +// +// Supported mode: one / all / fixed / fixed-percent / random-max-percent. +type NetworkChaosSpecTargetMode string + +const ( + // one. + NetworkChaosSpecTargetMode_ONE NetworkChaosSpecTargetMode = "ONE" + // all. + NetworkChaosSpecTargetMode_ALL NetworkChaosSpecTargetMode = "ALL" + // fixed. + NetworkChaosSpecTargetMode_FIXED NetworkChaosSpecTargetMode = "FIXED" + // fixed-percent. + NetworkChaosSpecTargetMode_FIXED_PERCENT NetworkChaosSpecTargetMode = "FIXED_PERCENT" + // random-max-percent. + NetworkChaosSpecTargetMode_RANDOM_MAX_PERCENT NetworkChaosSpecTargetMode = "RANDOM_MAX_PERCENT" +) + +// Selector is used to select pods that are used to inject chaos action. +type NetworkChaosSpecTargetSelector struct { + // Map of string keys and values that can be used to select objects. + // + // A selector based on annotations. + AnnotationSelectors *map[string]*string `field:"optional" json:"annotationSelectors" yaml:"annotationSelectors"` + // a slice of label selector expressions that can be used to select objects. + // + // A list of selectors based on set-based label expressions. + ExpressionSelectors *[]*NetworkChaosSpecTargetSelectorExpressionSelectors `field:"optional" json:"expressionSelectors" yaml:"expressionSelectors"` + // Map of string keys and values that can be used to select objects. + // + // A selector based on fields. + FieldSelectors *map[string]*string `field:"optional" json:"fieldSelectors" yaml:"fieldSelectors"` + // Map of string keys and values that can be used to select objects. + // + // A selector based on labels. + LabelSelectors *map[string]*string `field:"optional" json:"labelSelectors" yaml:"labelSelectors"` + // Namespaces is a set of namespace to which objects belong. + Namespaces *[]*string `field:"optional" json:"namespaces" yaml:"namespaces"` + // Nodes is a set of node name and objects must belong to these nodes. + Nodes *[]*string `field:"optional" json:"nodes" yaml:"nodes"` + // Map of string keys and values that can be used to select nodes. + // + // Selector which must match a node's labels, and objects must belong to these selected nodes. + NodeSelectors *map[string]*string `field:"optional" json:"nodeSelectors" yaml:"nodeSelectors"` + // PodPhaseSelectors is a set of condition of a pod at the current time. + // + // supported value: Pending / Running / Succeeded / Failed / Unknown. + PodPhaseSelectors *[]*string `field:"optional" json:"podPhaseSelectors" yaml:"podPhaseSelectors"` + // Pods is a map of string keys and a set values that used to select pods. + // + // The key defines the namespace which pods belong, and the each values is a set of pod names. + Pods *map[string]*[]*string `field:"optional" json:"pods" yaml:"pods"` +} + +// A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. +type NetworkChaosSpecTargetSelectorExpressionSelectors struct { + // key is the label key that the selector applies to. + Key *string `field:"required" json:"key" yaml:"key"` + // operator represents a key's relationship to a set of values. + // + // Valid operators are In, NotIn, Exists and DoesNotExist. + Operator *string `field:"required" json:"operator" yaml:"operator"` + // 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. + Values *[]*string `field:"optional" json:"values" yaml:"values"` +} diff --git a/env/imports/k8s/networkchaos/chaosmeshorg/chaosmeshorg.init.go b/env/imports/k8s/networkchaos/chaosmeshorg/chaosmeshorg.init.go new file mode 100644 index 000000000..9ea4a0874 --- /dev/null +++ b/env/imports/k8s/networkchaos/chaosmeshorg/chaosmeshorg.init.go @@ -0,0 +1,129 @@ +package chaosmeshorg + +import ( + "reflect" + + _jsii_ "github.com/aws/jsii-runtime-go/runtime" +) + +func init() { + _jsii_.RegisterClass( + "chaos-meshorg.NetworkChaos", + reflect.TypeOf((*NetworkChaos)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "addDependency", GoMethod: "AddDependency"}, + _jsii_.MemberMethod{JsiiMethod: "addJsonPatch", GoMethod: "AddJsonPatch"}, + _jsii_.MemberProperty{JsiiProperty: "apiGroup", GoGetter: "ApiGroup"}, + _jsii_.MemberProperty{JsiiProperty: "apiVersion", GoGetter: "ApiVersion"}, + _jsii_.MemberProperty{JsiiProperty: "chart", GoGetter: "Chart"}, + _jsii_.MemberProperty{JsiiProperty: "kind", GoGetter: "Kind"}, + _jsii_.MemberProperty{JsiiProperty: "metadata", GoGetter: "Metadata"}, + _jsii_.MemberProperty{JsiiProperty: "name", GoGetter: "Name"}, + _jsii_.MemberProperty{JsiiProperty: "node", GoGetter: "Node"}, + _jsii_.MemberMethod{JsiiMethod: "toJson", GoMethod: "ToJson"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + }, + func() interface{} { + j := jsiiProxy_NetworkChaos{} + _jsii_.InitJsiiProxy(&j.Type__cdk8sApiObject) + return &j + }, + ) + _jsii_.RegisterStruct( + "chaos-meshorg.NetworkChaosProps", + reflect.TypeOf((*NetworkChaosProps)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "chaos-meshorg.NetworkChaosSpec", + reflect.TypeOf((*NetworkChaosSpec)(nil)).Elem(), + ) + _jsii_.RegisterEnum( + "chaos-meshorg.NetworkChaosSpecAction", + reflect.TypeOf((*NetworkChaosSpecAction)(nil)).Elem(), + map[string]interface{}{ + "NETEM": NetworkChaosSpecAction_NETEM, + "DELAY": NetworkChaosSpecAction_DELAY, + "LOSS": NetworkChaosSpecAction_LOSS, + "DUPLICATE": NetworkChaosSpecAction_DUPLICATE, + "CORRUPT": NetworkChaosSpecAction_CORRUPT, + "PARTITION": NetworkChaosSpecAction_PARTITION, + "BANDWIDTH": NetworkChaosSpecAction_BANDWIDTH, + }, + ) + _jsii_.RegisterStruct( + "chaos-meshorg.NetworkChaosSpecBandwidth", + reflect.TypeOf((*NetworkChaosSpecBandwidth)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "chaos-meshorg.NetworkChaosSpecCorrupt", + reflect.TypeOf((*NetworkChaosSpecCorrupt)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "chaos-meshorg.NetworkChaosSpecDelay", + reflect.TypeOf((*NetworkChaosSpecDelay)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "chaos-meshorg.NetworkChaosSpecDelayReorder", + reflect.TypeOf((*NetworkChaosSpecDelayReorder)(nil)).Elem(), + ) + _jsii_.RegisterEnum( + "chaos-meshorg.NetworkChaosSpecDirection", + reflect.TypeOf((*NetworkChaosSpecDirection)(nil)).Elem(), + map[string]interface{}{ + "TO": NetworkChaosSpecDirection_TO, + "FROM": NetworkChaosSpecDirection_FROM, + "BOTH": NetworkChaosSpecDirection_BOTH, + "VALUE_": NetworkChaosSpecDirection_VALUE_, + }, + ) + _jsii_.RegisterStruct( + "chaos-meshorg.NetworkChaosSpecDuplicate", + reflect.TypeOf((*NetworkChaosSpecDuplicate)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "chaos-meshorg.NetworkChaosSpecLoss", + reflect.TypeOf((*NetworkChaosSpecLoss)(nil)).Elem(), + ) + _jsii_.RegisterEnum( + "chaos-meshorg.NetworkChaosSpecMode", + reflect.TypeOf((*NetworkChaosSpecMode)(nil)).Elem(), + map[string]interface{}{ + "ONE": NetworkChaosSpecMode_ONE, + "ALL": NetworkChaosSpecMode_ALL, + "FIXED": NetworkChaosSpecMode_FIXED, + "FIXED_PERCENT": NetworkChaosSpecMode_FIXED_PERCENT, + "RANDOM_MAX_PERCENT": NetworkChaosSpecMode_RANDOM_MAX_PERCENT, + }, + ) + _jsii_.RegisterStruct( + "chaos-meshorg.NetworkChaosSpecSelector", + reflect.TypeOf((*NetworkChaosSpecSelector)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "chaos-meshorg.NetworkChaosSpecSelectorExpressionSelectors", + reflect.TypeOf((*NetworkChaosSpecSelectorExpressionSelectors)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "chaos-meshorg.NetworkChaosSpecTarget", + reflect.TypeOf((*NetworkChaosSpecTarget)(nil)).Elem(), + ) + _jsii_.RegisterEnum( + "chaos-meshorg.NetworkChaosSpecTargetMode", + reflect.TypeOf((*NetworkChaosSpecTargetMode)(nil)).Elem(), + map[string]interface{}{ + "ONE": NetworkChaosSpecTargetMode_ONE, + "ALL": NetworkChaosSpecTargetMode_ALL, + "FIXED": NetworkChaosSpecTargetMode_FIXED, + "FIXED_PERCENT": NetworkChaosSpecTargetMode_FIXED_PERCENT, + "RANDOM_MAX_PERCENT": NetworkChaosSpecTargetMode_RANDOM_MAX_PERCENT, + }, + ) + _jsii_.RegisterStruct( + "chaos-meshorg.NetworkChaosSpecTargetSelector", + reflect.TypeOf((*NetworkChaosSpecTargetSelector)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "chaos-meshorg.NetworkChaosSpecTargetSelectorExpressionSelectors", + reflect.TypeOf((*NetworkChaosSpecTargetSelectorExpressionSelectors)(nil)).Elem(), + ) +} diff --git a/env/imports/k8s/networkchaos/chaosmeshorg/internal/types.go b/env/imports/k8s/networkchaos/chaosmeshorg/internal/types.go new file mode 100644 index 000000000..de3a04f73 --- /dev/null +++ b/env/imports/k8s/networkchaos/chaosmeshorg/internal/types.go @@ -0,0 +1,5 @@ +package internal +import ( + "github.com/cdk8s-team/cdk8s-core-go/cdk8s/v2" +) +type Type__cdk8sApiObject = cdk8s.ApiObject diff --git a/env/imports/k8s/networkchaos/chaosmeshorg/jsii/chaos-meshorg-0.0.0.tgz b/env/imports/k8s/networkchaos/chaosmeshorg/jsii/chaos-meshorg-0.0.0.tgz new file mode 100644 index 000000000..a7737fe0f Binary files /dev/null and b/env/imports/k8s/networkchaos/chaosmeshorg/jsii/chaos-meshorg-0.0.0.tgz differ diff --git a/env/imports/k8s/networkchaos/chaosmeshorg/jsii/jsii.go b/env/imports/k8s/networkchaos/chaosmeshorg/jsii/jsii.go new file mode 100644 index 000000000..319ef3f24 --- /dev/null +++ b/env/imports/k8s/networkchaos/chaosmeshorg/jsii/jsii.go @@ -0,0 +1,28 @@ +// Package jsii contains the functionaility needed for jsii packages to +// initialize their dependencies and themselves. Users should never need to use this package +// directly. If you find you need to - please report a bug at +// https://github.com/aws/jsii/issues/new/choose +package jsii + +import ( + _ "embed" + + _jsii_ "github.com/aws/jsii-runtime-go/runtime" + + constructs "github.com/aws/constructs-go/constructs/v10/jsii" + cdk8s "github.com/cdk8s-team/cdk8s-core-go/cdk8s/v2/jsii" +) + +//go:embed chaos-meshorg-0.0.0.tgz +var tarball []byte + +// Initialize loads the necessary packages in the @jsii/kernel to support the enclosing module. +// The implementation is idempotent (and hence safe to be called over and over). +func Initialize() { + // Ensure all dependencies are initialized + cdk8s.Initialize() + constructs.Initialize() + + // Load this library into the kernel + _jsii_.Load("chaos-meshorg", "0.0.0", tarball) +} diff --git a/env/imports/k8s/networkchaos/chaosmeshorg/version b/env/imports/k8s/networkchaos/chaosmeshorg/version new file mode 100644 index 000000000..77d6f4ca2 --- /dev/null +++ b/env/imports/k8s/networkchaos/chaosmeshorg/version @@ -0,0 +1 @@ +0.0.0 diff --git a/env/imports/k8s/podchaos/chaosmeshorg/chaosmeshorg.go b/env/imports/k8s/podchaos/chaosmeshorg/chaosmeshorg.go new file mode 100644 index 000000000..40ecde2e9 --- /dev/null +++ b/env/imports/k8s/podchaos/chaosmeshorg/chaosmeshorg.go @@ -0,0 +1,402 @@ +// chaos-meshorg +package chaosmeshorg + +import ( + _jsii_ "github.com/aws/jsii-runtime-go/runtime" + _init_ "github.com/smartcontractkit/chainlink-testing-framework/env/imports/k8s/podchaos/chaosmeshorg/jsii" + + "github.com/aws/constructs-go/constructs/v10" + "github.com/cdk8s-team/cdk8s-core-go/cdk8s/v2" + "github.com/smartcontractkit/chainlink-testing-framework/env/imports/k8s/podchaos/chaosmeshorg/internal" +) + +// PodChaos is the control script`s spec. +type PodChaos interface { + cdk8s.ApiObject + // The group portion of the API version (e.g. `authorization.k8s.io`). + ApiGroup() *string + // The object's API version (e.g. `authorization.k8s.io/v1`). + ApiVersion() *string + // The chart in which this object is defined. + Chart() cdk8s.Chart + // The object kind. + Kind() *string + // Metadata associated with this API object. + Metadata() cdk8s.ApiObjectMetadataDefinition + // The name of the API object. + // + // If a name is specified in `metadata.name` this will be the name returned. + // Otherwise, a name will be generated by calling + // `Chart.of(this).generatedObjectName(this)`, which by default uses the + // construct path to generate a DNS-compatible name for the resource. + Name() *string + // The tree node. + Node() constructs.Node + // Create a dependency between this ApiObject and other constructs. + // + // These can be other ApiObjects, Charts, or custom. + AddDependency(dependencies ...constructs.IConstruct) + // Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. + // + // Example: + // kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true)); + // + AddJsonPatch(ops ...cdk8s.JsonPatch) + // Renders the object to Kubernetes JSON. + ToJson() interface{} + // Returns a string representation of this construct. + ToString() *string +} + +// The jsii proxy struct for PodChaos +type jsiiProxy_PodChaos struct { + internal.Type__cdk8sApiObject +} + +func (j *jsiiProxy_PodChaos) ApiGroup() *string { + var returns *string + _jsii_.Get( + j, + "apiGroup", + &returns, + ) + return returns +} + +func (j *jsiiProxy_PodChaos) ApiVersion() *string { + var returns *string + _jsii_.Get( + j, + "apiVersion", + &returns, + ) + return returns +} + +func (j *jsiiProxy_PodChaos) Chart() cdk8s.Chart { + var returns cdk8s.Chart + _jsii_.Get( + j, + "chart", + &returns, + ) + return returns +} + +func (j *jsiiProxy_PodChaos) Kind() *string { + var returns *string + _jsii_.Get( + j, + "kind", + &returns, + ) + return returns +} + +func (j *jsiiProxy_PodChaos) Metadata() cdk8s.ApiObjectMetadataDefinition { + var returns cdk8s.ApiObjectMetadataDefinition + _jsii_.Get( + j, + "metadata", + &returns, + ) + return returns +} + +func (j *jsiiProxy_PodChaos) Name() *string { + var returns *string + _jsii_.Get( + j, + "name", + &returns, + ) + return returns +} + +func (j *jsiiProxy_PodChaos) Node() constructs.Node { + var returns constructs.Node + _jsii_.Get( + j, + "node", + &returns, + ) + return returns +} + +// Defines a "PodChaos" API object. +func NewPodChaos(scope constructs.Construct, id *string, props *PodChaosProps) PodChaos { + _init_.Initialize() + + j := jsiiProxy_PodChaos{} + + _jsii_.Create( + "chaos-meshorg.PodChaos", + []interface{}{scope, id, props}, + &j, + ) + + return &j +} + +// Defines a "PodChaos" API object. +func NewPodChaos_Override(p PodChaos, scope constructs.Construct, id *string, props *PodChaosProps) { + _init_.Initialize() + + _jsii_.Create( + "chaos-meshorg.PodChaos", + []interface{}{scope, id, props}, + p, + ) +} + +// Checks if `x` is a construct. +// +// Use this method instead of `instanceof` to properly detect `Construct` +// instances, even when the construct library is symlinked. +// +// Explanation: in JavaScript, multiple copies of the `constructs` library on +// disk are seen as independent, completely different libraries. As a +// consequence, the class `Construct` in each copy of the `constructs` library +// is seen as a different class, and an instance of one class will not test as +// `instanceof` the other class. `npm install` will not create installations +// like this, but users may manually symlink construct libraries together or +// use a monorepo tool: in those cases, multiple copies of the `constructs` +// library can be accidentally installed, and `instanceof` will behave +// unpredictably. It is safest to avoid using `instanceof`, and using +// this type-testing method instead. +// +// Returns: true if `x` is an object created from a class which extends `Construct`. +func PodChaos_IsConstruct(x interface{}) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "chaos-meshorg.PodChaos", + "isConstruct", + []interface{}{x}, + &returns, + ) + + return returns +} + +// Renders a Kubernetes manifest for "PodChaos". +// +// This can be used to inline resource manifests inside other objects (e.g. as templates). +func PodChaos_Manifest(props *PodChaosProps) interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "chaos-meshorg.PodChaos", + "manifest", + []interface{}{props}, + &returns, + ) + + return returns +} + +// Returns the `ApiObject` named `Resource` which is a child of the given construct. +// +// If `c` is an `ApiObject`, it is returned directly. Throws an +// exception if the construct does not have a child named `Default` _or_ if +// this child is not an `ApiObject`. +func PodChaos_Of(c constructs.IConstruct) cdk8s.ApiObject { + _init_.Initialize() + + var returns cdk8s.ApiObject + + _jsii_.StaticInvoke( + "chaos-meshorg.PodChaos", + "of", + []interface{}{c}, + &returns, + ) + + return returns +} + +func PodChaos_GVK() *cdk8s.GroupVersionKind { + _init_.Initialize() + var returns *cdk8s.GroupVersionKind + _jsii_.StaticGet( + "chaos-meshorg.PodChaos", + "GVK", + &returns, + ) + return returns +} + +func (j *jsiiProxy_PodChaos) AddDependency(dependencies ...constructs.IConstruct) { + args := []interface{}{} + for _, a := range dependencies { + args = append(args, a) + } + + _jsii_.InvokeVoid( + j, + "addDependency", + args, + ) +} + +func (j *jsiiProxy_PodChaos) AddJsonPatch(ops ...cdk8s.JsonPatch) { + args := []interface{}{} + for _, a := range ops { + args = append(args, a) + } + + _jsii_.InvokeVoid( + j, + "addJsonPatch", + args, + ) +} + +func (j *jsiiProxy_PodChaos) ToJson() interface{} { + var returns interface{} + + _jsii_.Invoke( + j, + "toJson", + nil, // no parameters + &returns, + ) + + return returns +} + +func (j *jsiiProxy_PodChaos) ToString() *string { + var returns *string + + _jsii_.Invoke( + j, + "toString", + nil, // no parameters + &returns, + ) + + return returns +} + +// PodChaos is the control script`s spec. +type PodChaosProps struct { + // Spec defines the behavior of a pod chaos experiment. + Spec *PodChaosSpec `field:"required" json:"spec" yaml:"spec"` + Metadata *cdk8s.ApiObjectMetadata `field:"optional" json:"metadata" yaml:"metadata"` +} + +// Spec defines the behavior of a pod chaos experiment. +type PodChaosSpec struct { + // Action defines the specific pod chaos action. + // + // Supported action: pod-kill / pod-failure / container-kill Default action: pod-kill. + Action PodChaosSpecAction `field:"required" json:"action" yaml:"action"` + // Mode defines the mode to run chaos action. + // + // Supported mode: one / all / fixed / fixed-percent / random-max-percent. + Mode PodChaosSpecMode `field:"required" json:"mode" yaml:"mode"` + // Selector is used to select pods that are used to inject chaos action. + Selector *PodChaosSpecSelector `field:"required" json:"selector" yaml:"selector"` + // ContainerNames indicates list of the name of affected container. + // + // If not set, all containers will be injected. + ContainerNames *[]*string `field:"optional" json:"containerNames" yaml:"containerNames"` + // Duration represents the duration of the chaos action. + // + // It is required when the action is `PodFailureAction`. A duration string is a possibly signed sequence of decimal numbers, each with optional fraction and a unit suffix, such as "300ms", "-1.5h" or "2h45m". Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h". + Duration *string `field:"optional" json:"duration" yaml:"duration"` + // GracePeriod is used in pod-kill action. + // + // It represents the duration in seconds before the pod should be deleted. Value must be non-negative integer. The default value is zero that indicates delete immediately. + GracePeriod *float64 `field:"optional" json:"gracePeriod" yaml:"gracePeriod"` + // Value is required when the mode is set to `FixedPodMode` / `FixedPercentPodMod` / `RandomMaxPercentPodMod`. + // + // If `FixedPodMode`, provide an integer of pods to do chaos action. If `FixedPercentPodMod`, provide a number from 0-100 to specify the percent of pods the server can do chaos action. IF `RandomMaxPercentPodMod`, provide a number from 0-100 to specify the max percent of pods to do chaos action + Value *string `field:"optional" json:"value" yaml:"value"` +} + +// Action defines the specific pod chaos action. +// +// Supported action: pod-kill / pod-failure / container-kill Default action: pod-kill. +type PodChaosSpecAction string + +const ( + // pod-kill. + PodChaosSpecAction_POD_KILL PodChaosSpecAction = "POD_KILL" + // pod-failure. + PodChaosSpecAction_POD_FAILURE PodChaosSpecAction = "POD_FAILURE" + // container-kill. + PodChaosSpecAction_CONTAINER_KILL PodChaosSpecAction = "CONTAINER_KILL" +) + +// Mode defines the mode to run chaos action. +// +// Supported mode: one / all / fixed / fixed-percent / random-max-percent. +type PodChaosSpecMode string + +const ( + // one. + PodChaosSpecMode_ONE PodChaosSpecMode = "ONE" + // all. + PodChaosSpecMode_ALL PodChaosSpecMode = "ALL" + // fixed. + PodChaosSpecMode_FIXED PodChaosSpecMode = "FIXED" + // fixed-percent. + PodChaosSpecMode_FIXED_PERCENT PodChaosSpecMode = "FIXED_PERCENT" + // random-max-percent. + PodChaosSpecMode_RANDOM_MAX_PERCENT PodChaosSpecMode = "RANDOM_MAX_PERCENT" +) + +// Selector is used to select pods that are used to inject chaos action. +type PodChaosSpecSelector struct { + // Map of string keys and values that can be used to select objects. + // + // A selector based on annotations. + AnnotationSelectors *map[string]*string `field:"optional" json:"annotationSelectors" yaml:"annotationSelectors"` + // a slice of label selector expressions that can be used to select objects. + // + // A list of selectors based on set-based label expressions. + ExpressionSelectors *[]*PodChaosSpecSelectorExpressionSelectors `field:"optional" json:"expressionSelectors" yaml:"expressionSelectors"` + // Map of string keys and values that can be used to select objects. + // + // A selector based on fields. + FieldSelectors *map[string]*string `field:"optional" json:"fieldSelectors" yaml:"fieldSelectors"` + // Map of string keys and values that can be used to select objects. + // + // A selector based on labels. + LabelSelectors *map[string]*string `field:"optional" json:"labelSelectors" yaml:"labelSelectors"` + // Namespaces is a set of namespace to which objects belong. + Namespaces *[]*string `field:"optional" json:"namespaces" yaml:"namespaces"` + // Nodes is a set of node name and objects must belong to these nodes. + Nodes *[]*string `field:"optional" json:"nodes" yaml:"nodes"` + // Map of string keys and values that can be used to select nodes. + // + // Selector which must match a node's labels, and objects must belong to these selected nodes. + NodeSelectors *map[string]*string `field:"optional" json:"nodeSelectors" yaml:"nodeSelectors"` + // PodPhaseSelectors is a set of condition of a pod at the current time. + // + // supported value: Pending / Running / Succeeded / Failed / Unknown. + PodPhaseSelectors *[]*string `field:"optional" json:"podPhaseSelectors" yaml:"podPhaseSelectors"` + // Pods is a map of string keys and a set values that used to select pods. + // + // The key defines the namespace which pods belong, and the each values is a set of pod names. + Pods *map[string]*[]*string `field:"optional" json:"pods" yaml:"pods"` +} + +// A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. +type PodChaosSpecSelectorExpressionSelectors struct { + // key is the label key that the selector applies to. + Key *string `field:"required" json:"key" yaml:"key"` + // operator represents a key's relationship to a set of values. + // + // Valid operators are In, NotIn, Exists and DoesNotExist. + Operator *string `field:"required" json:"operator" yaml:"operator"` + // 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. + Values *[]*string `field:"optional" json:"values" yaml:"values"` +} diff --git a/env/imports/k8s/podchaos/chaosmeshorg/chaosmeshorg.init.go b/env/imports/k8s/podchaos/chaosmeshorg/chaosmeshorg.init.go new file mode 100644 index 000000000..358e5ab2d --- /dev/null +++ b/env/imports/k8s/podchaos/chaosmeshorg/chaosmeshorg.init.go @@ -0,0 +1,68 @@ +package chaosmeshorg + +import ( + "reflect" + + _jsii_ "github.com/aws/jsii-runtime-go/runtime" +) + +func init() { + _jsii_.RegisterClass( + "chaos-meshorg.PodChaos", + reflect.TypeOf((*PodChaos)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "addDependency", GoMethod: "AddDependency"}, + _jsii_.MemberMethod{JsiiMethod: "addJsonPatch", GoMethod: "AddJsonPatch"}, + _jsii_.MemberProperty{JsiiProperty: "apiGroup", GoGetter: "ApiGroup"}, + _jsii_.MemberProperty{JsiiProperty: "apiVersion", GoGetter: "ApiVersion"}, + _jsii_.MemberProperty{JsiiProperty: "chart", GoGetter: "Chart"}, + _jsii_.MemberProperty{JsiiProperty: "kind", GoGetter: "Kind"}, + _jsii_.MemberProperty{JsiiProperty: "metadata", GoGetter: "Metadata"}, + _jsii_.MemberProperty{JsiiProperty: "name", GoGetter: "Name"}, + _jsii_.MemberProperty{JsiiProperty: "node", GoGetter: "Node"}, + _jsii_.MemberMethod{JsiiMethod: "toJson", GoMethod: "ToJson"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + }, + func() interface{} { + j := jsiiProxy_PodChaos{} + _jsii_.InitJsiiProxy(&j.Type__cdk8sApiObject) + return &j + }, + ) + _jsii_.RegisterStruct( + "chaos-meshorg.PodChaosProps", + reflect.TypeOf((*PodChaosProps)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "chaos-meshorg.PodChaosSpec", + reflect.TypeOf((*PodChaosSpec)(nil)).Elem(), + ) + _jsii_.RegisterEnum( + "chaos-meshorg.PodChaosSpecAction", + reflect.TypeOf((*PodChaosSpecAction)(nil)).Elem(), + map[string]interface{}{ + "POD_KILL": PodChaosSpecAction_POD_KILL, + "POD_FAILURE": PodChaosSpecAction_POD_FAILURE, + "CONTAINER_KILL": PodChaosSpecAction_CONTAINER_KILL, + }, + ) + _jsii_.RegisterEnum( + "chaos-meshorg.PodChaosSpecMode", + reflect.TypeOf((*PodChaosSpecMode)(nil)).Elem(), + map[string]interface{}{ + "ONE": PodChaosSpecMode_ONE, + "ALL": PodChaosSpecMode_ALL, + "FIXED": PodChaosSpecMode_FIXED, + "FIXED_PERCENT": PodChaosSpecMode_FIXED_PERCENT, + "RANDOM_MAX_PERCENT": PodChaosSpecMode_RANDOM_MAX_PERCENT, + }, + ) + _jsii_.RegisterStruct( + "chaos-meshorg.PodChaosSpecSelector", + reflect.TypeOf((*PodChaosSpecSelector)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "chaos-meshorg.PodChaosSpecSelectorExpressionSelectors", + reflect.TypeOf((*PodChaosSpecSelectorExpressionSelectors)(nil)).Elem(), + ) +} diff --git a/env/imports/k8s/podchaos/chaosmeshorg/internal/types.go b/env/imports/k8s/podchaos/chaosmeshorg/internal/types.go new file mode 100644 index 000000000..de3a04f73 --- /dev/null +++ b/env/imports/k8s/podchaos/chaosmeshorg/internal/types.go @@ -0,0 +1,5 @@ +package internal +import ( + "github.com/cdk8s-team/cdk8s-core-go/cdk8s/v2" +) +type Type__cdk8sApiObject = cdk8s.ApiObject diff --git a/env/imports/k8s/podchaos/chaosmeshorg/jsii/chaos-meshorg-0.0.0.tgz b/env/imports/k8s/podchaos/chaosmeshorg/jsii/chaos-meshorg-0.0.0.tgz new file mode 100644 index 000000000..6341fb006 Binary files /dev/null and b/env/imports/k8s/podchaos/chaosmeshorg/jsii/chaos-meshorg-0.0.0.tgz differ diff --git a/env/imports/k8s/podchaos/chaosmeshorg/jsii/jsii.go b/env/imports/k8s/podchaos/chaosmeshorg/jsii/jsii.go new file mode 100644 index 000000000..319ef3f24 --- /dev/null +++ b/env/imports/k8s/podchaos/chaosmeshorg/jsii/jsii.go @@ -0,0 +1,28 @@ +// Package jsii contains the functionaility needed for jsii packages to +// initialize their dependencies and themselves. Users should never need to use this package +// directly. If you find you need to - please report a bug at +// https://github.com/aws/jsii/issues/new/choose +package jsii + +import ( + _ "embed" + + _jsii_ "github.com/aws/jsii-runtime-go/runtime" + + constructs "github.com/aws/constructs-go/constructs/v10/jsii" + cdk8s "github.com/cdk8s-team/cdk8s-core-go/cdk8s/v2/jsii" +) + +//go:embed chaos-meshorg-0.0.0.tgz +var tarball []byte + +// Initialize loads the necessary packages in the @jsii/kernel to support the enclosing module. +// The implementation is idempotent (and hence safe to be called over and over). +func Initialize() { + // Ensure all dependencies are initialized + cdk8s.Initialize() + constructs.Initialize() + + // Load this library into the kernel + _jsii_.Load("chaos-meshorg", "0.0.0", tarball) +} diff --git a/env/imports/k8s/podchaos/chaosmeshorg/version b/env/imports/k8s/podchaos/chaosmeshorg/version new file mode 100644 index 000000000..77d6f4ca2 --- /dev/null +++ b/env/imports/k8s/podchaos/chaosmeshorg/version @@ -0,0 +1 @@ +0.0.0 diff --git a/env/imports/k8s/podiochaos/chaosmeshorg/chaosmeshorg.go b/env/imports/k8s/podiochaos/chaosmeshorg/chaosmeshorg.go new file mode 100644 index 000000000..311db1b9c --- /dev/null +++ b/env/imports/k8s/podiochaos/chaosmeshorg/chaosmeshorg.go @@ -0,0 +1,382 @@ +// chaos-meshorg +package chaosmeshorg + +import ( + _jsii_ "github.com/aws/jsii-runtime-go/runtime" + _init_ "github.com/smartcontractkit/chainlink-testing-framework/env/imports/k8s/podiochaos/chaosmeshorg/jsii" + + "github.com/aws/constructs-go/constructs/v10" + "github.com/cdk8s-team/cdk8s-core-go/cdk8s/v2" + "github.com/smartcontractkit/chainlink-testing-framework/env/imports/k8s/podiochaos/chaosmeshorg/internal" +) + +// PodIOChaos is the Schema for the podiochaos API. +type PodIoChaos interface { + cdk8s.ApiObject + // The group portion of the API version (e.g. `authorization.k8s.io`). + ApiGroup() *string + // The object's API version (e.g. `authorization.k8s.io/v1`). + ApiVersion() *string + // The chart in which this object is defined. + Chart() cdk8s.Chart + // The object kind. + Kind() *string + // Metadata associated with this API object. + Metadata() cdk8s.ApiObjectMetadataDefinition + // The name of the API object. + // + // If a name is specified in `metadata.name` this will be the name returned. + // Otherwise, a name will be generated by calling + // `Chart.of(this).generatedObjectName(this)`, which by default uses the + // construct path to generate a DNS-compatible name for the resource. + Name() *string + // The tree node. + Node() constructs.Node + // Create a dependency between this ApiObject and other constructs. + // + // These can be other ApiObjects, Charts, or custom. + AddDependency(dependencies ...constructs.IConstruct) + // Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. + // + // Example: + // kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true)); + // + AddJsonPatch(ops ...cdk8s.JsonPatch) + // Renders the object to Kubernetes JSON. + ToJson() interface{} + // Returns a string representation of this construct. + ToString() *string +} + +// The jsii proxy struct for PodIoChaos +type jsiiProxy_PodIoChaos struct { + internal.Type__cdk8sApiObject +} + +func (j *jsiiProxy_PodIoChaos) ApiGroup() *string { + var returns *string + _jsii_.Get( + j, + "apiGroup", + &returns, + ) + return returns +} + +func (j *jsiiProxy_PodIoChaos) ApiVersion() *string { + var returns *string + _jsii_.Get( + j, + "apiVersion", + &returns, + ) + return returns +} + +func (j *jsiiProxy_PodIoChaos) Chart() cdk8s.Chart { + var returns cdk8s.Chart + _jsii_.Get( + j, + "chart", + &returns, + ) + return returns +} + +func (j *jsiiProxy_PodIoChaos) Kind() *string { + var returns *string + _jsii_.Get( + j, + "kind", + &returns, + ) + return returns +} + +func (j *jsiiProxy_PodIoChaos) Metadata() cdk8s.ApiObjectMetadataDefinition { + var returns cdk8s.ApiObjectMetadataDefinition + _jsii_.Get( + j, + "metadata", + &returns, + ) + return returns +} + +func (j *jsiiProxy_PodIoChaos) Name() *string { + var returns *string + _jsii_.Get( + j, + "name", + &returns, + ) + return returns +} + +func (j *jsiiProxy_PodIoChaos) Node() constructs.Node { + var returns constructs.Node + _jsii_.Get( + j, + "node", + &returns, + ) + return returns +} + +// Defines a "PodIOChaos" API object. +func NewPodIoChaos(scope constructs.Construct, id *string, props *PodIoChaosProps) PodIoChaos { + _init_.Initialize() + + j := jsiiProxy_PodIoChaos{} + + _jsii_.Create( + "chaos-meshorg.PodIoChaos", + []interface{}{scope, id, props}, + &j, + ) + + return &j +} + +// Defines a "PodIOChaos" API object. +func NewPodIoChaos_Override(p PodIoChaos, scope constructs.Construct, id *string, props *PodIoChaosProps) { + _init_.Initialize() + + _jsii_.Create( + "chaos-meshorg.PodIoChaos", + []interface{}{scope, id, props}, + p, + ) +} + +// Checks if `x` is a construct. +// +// Use this method instead of `instanceof` to properly detect `Construct` +// instances, even when the construct library is symlinked. +// +// Explanation: in JavaScript, multiple copies of the `constructs` library on +// disk are seen as independent, completely different libraries. As a +// consequence, the class `Construct` in each copy of the `constructs` library +// is seen as a different class, and an instance of one class will not test as +// `instanceof` the other class. `npm install` will not create installations +// like this, but users may manually symlink construct libraries together or +// use a monorepo tool: in those cases, multiple copies of the `constructs` +// library can be accidentally installed, and `instanceof` will behave +// unpredictably. It is safest to avoid using `instanceof`, and using +// this type-testing method instead. +// +// Returns: true if `x` is an object created from a class which extends `Construct`. +func PodIoChaos_IsConstruct(x interface{}) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "chaos-meshorg.PodIoChaos", + "isConstruct", + []interface{}{x}, + &returns, + ) + + return returns +} + +// Renders a Kubernetes manifest for "PodIOChaos". +// +// This can be used to inline resource manifests inside other objects (e.g. as templates). +func PodIoChaos_Manifest(props *PodIoChaosProps) interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "chaos-meshorg.PodIoChaos", + "manifest", + []interface{}{props}, + &returns, + ) + + return returns +} + +// Returns the `ApiObject` named `Resource` which is a child of the given construct. +// +// If `c` is an `ApiObject`, it is returned directly. Throws an +// exception if the construct does not have a child named `Default` _or_ if +// this child is not an `ApiObject`. +func PodIoChaos_Of(c constructs.IConstruct) cdk8s.ApiObject { + _init_.Initialize() + + var returns cdk8s.ApiObject + + _jsii_.StaticInvoke( + "chaos-meshorg.PodIoChaos", + "of", + []interface{}{c}, + &returns, + ) + + return returns +} + +func PodIoChaos_GVK() *cdk8s.GroupVersionKind { + _init_.Initialize() + var returns *cdk8s.GroupVersionKind + _jsii_.StaticGet( + "chaos-meshorg.PodIoChaos", + "GVK", + &returns, + ) + return returns +} + +func (p *jsiiProxy_PodIoChaos) AddDependency(dependencies ...constructs.IConstruct) { + args := []interface{}{} + for _, a := range dependencies { + args = append(args, a) + } + + _jsii_.InvokeVoid( + p, + "addDependency", + args, + ) +} + +func (p *jsiiProxy_PodIoChaos) AddJsonPatch(ops ...cdk8s.JsonPatch) { + args := []interface{}{} + for _, a := range ops { + args = append(args, a) + } + + _jsii_.InvokeVoid( + p, + "addJsonPatch", + args, + ) +} + +func (p *jsiiProxy_PodIoChaos) ToJson() interface{} { + var returns interface{} + + _jsii_.Invoke( + p, + "toJson", + nil, // no parameters + &returns, + ) + + return returns +} + +func (p *jsiiProxy_PodIoChaos) ToString() *string { + var returns *string + + _jsii_.Invoke( + p, + "toString", + nil, // no parameters + &returns, + ) + + return returns +} + +// PodIOChaos is the Schema for the podiochaos API. +type PodIoChaosProps struct { + Metadata *cdk8s.ApiObjectMetadata `field:"optional" json:"metadata" yaml:"metadata"` + // PodIOChaosSpec defines the desired state of IOChaos. + Spec *PodIoChaosSpec `field:"optional" json:"spec" yaml:"spec"` +} + +// PodIOChaosSpec defines the desired state of IOChaos. +type PodIoChaosSpec struct { + // VolumeMountPath represents the target mount path It must be a root of mount path now. + // + // TODO: search the mount parent of any path automatically. TODO: support multiple different volume mount path in one pod + VolumeMountPath *string `field:"required" json:"volumeMountPath" yaml:"volumeMountPath"` + // Actions are a list of IOChaos actions. + Actions *[]*PodIoChaosSpecActions `field:"optional" json:"actions" yaml:"actions"` + // TODO: support multiple different container to inject in one pod. + Container *string `field:"optional" json:"container" yaml:"container"` +} + +// IOChaosAction defines an possible action of IOChaos. +type PodIoChaosSpecActions struct { + // Path represents a glob of injecting path. + Path *string `field:"required" json:"path" yaml:"path"` + // Percent represents the percent probability of injecting this action. + Percent *float64 `field:"required" json:"percent" yaml:"percent"` + // IOChaosType represents the type of an IOChaos Action. + Type *string `field:"required" json:"type" yaml:"type"` + // Timespec represents a time. + Atime *PodIoChaosSpecActionsAtime `field:"optional" json:"atime" yaml:"atime"` + Blocks *float64 `field:"optional" json:"blocks" yaml:"blocks"` + // Timespec represents a time. + Ctime *PodIoChaosSpecActionsCtime `field:"optional" json:"ctime" yaml:"ctime"` + // Faults represents the fault to inject. + Faults *[]*PodIoChaosSpecActionsFaults `field:"optional" json:"faults" yaml:"faults"` + Gid *float64 `field:"optional" json:"gid" yaml:"gid"` + Ino *float64 `field:"optional" json:"ino" yaml:"ino"` + // FileType represents type of a file. + Kind *string `field:"optional" json:"kind" yaml:"kind"` + // Latency represents the latency to inject. + Latency *string `field:"optional" json:"latency" yaml:"latency"` + // Methods represents the method that the action will inject in. + Methods *[]*string `field:"optional" json:"methods" yaml:"methods"` + // MistakeSpec represents the mistake to inject. + Mistake *PodIoChaosSpecActionsMistake `field:"optional" json:"mistake" yaml:"mistake"` + // Timespec represents a time. + Mtime *PodIoChaosSpecActionsMtime `field:"optional" json:"mtime" yaml:"mtime"` + Nlink *float64 `field:"optional" json:"nlink" yaml:"nlink"` + Perm *float64 `field:"optional" json:"perm" yaml:"perm"` + Rdev *float64 `field:"optional" json:"rdev" yaml:"rdev"` + Size *float64 `field:"optional" json:"size" yaml:"size"` + // Source represents the source of current rules. + Source *string `field:"optional" json:"source" yaml:"source"` + Uid *float64 `field:"optional" json:"uid" yaml:"uid"` +} + +// Timespec represents a time. +type PodIoChaosSpecActionsAtime struct { + Nsec *float64 `field:"required" json:"nsec" yaml:"nsec"` + Sec *float64 `field:"required" json:"sec" yaml:"sec"` +} + +// Timespec represents a time. +type PodIoChaosSpecActionsCtime struct { + Nsec *float64 `field:"required" json:"nsec" yaml:"nsec"` + Sec *float64 `field:"required" json:"sec" yaml:"sec"` +} + +// IoFault represents the fault to inject and their weight. +type PodIoChaosSpecActionsFaults struct { + Errno *float64 `field:"required" json:"errno" yaml:"errno"` + Weight *float64 `field:"required" json:"weight" yaml:"weight"` +} + +// MistakeSpec represents the mistake to inject. +type PodIoChaosSpecActionsMistake struct { + // Filling determines what is filled in the miskate data. + Filling PodIoChaosSpecActionsMistakeFilling `field:"optional" json:"filling" yaml:"filling"` + // Max length of each wrong data segment in bytes. + MaxLength *float64 `field:"optional" json:"maxLength" yaml:"maxLength"` + // There will be [1, MaxOccurrences] segments of wrong data. + MaxOccurrences *float64 `field:"optional" json:"maxOccurrences" yaml:"maxOccurrences"` +} + +// Filling determines what is filled in the miskate data. +type PodIoChaosSpecActionsMistakeFilling string + +const ( + // zero. + PodIoChaosSpecActionsMistakeFilling_ZERO PodIoChaosSpecActionsMistakeFilling = "ZERO" + // random. + PodIoChaosSpecActionsMistakeFilling_RANDOM PodIoChaosSpecActionsMistakeFilling = "RANDOM" +) + +// Timespec represents a time. +type PodIoChaosSpecActionsMtime struct { + Nsec *float64 `field:"required" json:"nsec" yaml:"nsec"` + Sec *float64 `field:"required" json:"sec" yaml:"sec"` +} diff --git a/env/imports/k8s/podiochaos/chaosmeshorg/chaosmeshorg.init.go b/env/imports/k8s/podiochaos/chaosmeshorg/chaosmeshorg.init.go new file mode 100644 index 000000000..72a3ef548 --- /dev/null +++ b/env/imports/k8s/podiochaos/chaosmeshorg/chaosmeshorg.init.go @@ -0,0 +1,72 @@ +package chaosmeshorg + +import ( + "reflect" + + _jsii_ "github.com/aws/jsii-runtime-go/runtime" +) + +func init() { + _jsii_.RegisterClass( + "chaos-meshorg.PodIoChaos", + reflect.TypeOf((*PodIoChaos)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "addDependency", GoMethod: "AddDependency"}, + _jsii_.MemberMethod{JsiiMethod: "addJsonPatch", GoMethod: "AddJsonPatch"}, + _jsii_.MemberProperty{JsiiProperty: "apiGroup", GoGetter: "ApiGroup"}, + _jsii_.MemberProperty{JsiiProperty: "apiVersion", GoGetter: "ApiVersion"}, + _jsii_.MemberProperty{JsiiProperty: "chart", GoGetter: "Chart"}, + _jsii_.MemberProperty{JsiiProperty: "kind", GoGetter: "Kind"}, + _jsii_.MemberProperty{JsiiProperty: "metadata", GoGetter: "Metadata"}, + _jsii_.MemberProperty{JsiiProperty: "name", GoGetter: "Name"}, + _jsii_.MemberProperty{JsiiProperty: "node", GoGetter: "Node"}, + _jsii_.MemberMethod{JsiiMethod: "toJson", GoMethod: "ToJson"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + }, + func() interface{} { + j := jsiiProxy_PodIoChaos{} + _jsii_.InitJsiiProxy(&j.Type__cdk8sApiObject) + return &j + }, + ) + _jsii_.RegisterStruct( + "chaos-meshorg.PodIoChaosProps", + reflect.TypeOf((*PodIoChaosProps)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "chaos-meshorg.PodIoChaosSpec", + reflect.TypeOf((*PodIoChaosSpec)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "chaos-meshorg.PodIoChaosSpecActions", + reflect.TypeOf((*PodIoChaosSpecActions)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "chaos-meshorg.PodIoChaosSpecActionsAtime", + reflect.TypeOf((*PodIoChaosSpecActionsAtime)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "chaos-meshorg.PodIoChaosSpecActionsCtime", + reflect.TypeOf((*PodIoChaosSpecActionsCtime)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "chaos-meshorg.PodIoChaosSpecActionsFaults", + reflect.TypeOf((*PodIoChaosSpecActionsFaults)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "chaos-meshorg.PodIoChaosSpecActionsMistake", + reflect.TypeOf((*PodIoChaosSpecActionsMistake)(nil)).Elem(), + ) + _jsii_.RegisterEnum( + "chaos-meshorg.PodIoChaosSpecActionsMistakeFilling", + reflect.TypeOf((*PodIoChaosSpecActionsMistakeFilling)(nil)).Elem(), + map[string]interface{}{ + "ZERO": PodIoChaosSpecActionsMistakeFilling_ZERO, + "RANDOM": PodIoChaosSpecActionsMistakeFilling_RANDOM, + }, + ) + _jsii_.RegisterStruct( + "chaos-meshorg.PodIoChaosSpecActionsMtime", + reflect.TypeOf((*PodIoChaosSpecActionsMtime)(nil)).Elem(), + ) +} diff --git a/env/imports/k8s/podiochaos/chaosmeshorg/internal/types.go b/env/imports/k8s/podiochaos/chaosmeshorg/internal/types.go new file mode 100644 index 000000000..de3a04f73 --- /dev/null +++ b/env/imports/k8s/podiochaos/chaosmeshorg/internal/types.go @@ -0,0 +1,5 @@ +package internal +import ( + "github.com/cdk8s-team/cdk8s-core-go/cdk8s/v2" +) +type Type__cdk8sApiObject = cdk8s.ApiObject diff --git a/env/imports/k8s/podiochaos/chaosmeshorg/jsii/chaos-meshorg-0.0.0.tgz b/env/imports/k8s/podiochaos/chaosmeshorg/jsii/chaos-meshorg-0.0.0.tgz new file mode 100644 index 000000000..5cb739634 Binary files /dev/null and b/env/imports/k8s/podiochaos/chaosmeshorg/jsii/chaos-meshorg-0.0.0.tgz differ diff --git a/env/imports/k8s/podiochaos/chaosmeshorg/jsii/jsii.go b/env/imports/k8s/podiochaos/chaosmeshorg/jsii/jsii.go new file mode 100644 index 000000000..319ef3f24 --- /dev/null +++ b/env/imports/k8s/podiochaos/chaosmeshorg/jsii/jsii.go @@ -0,0 +1,28 @@ +// Package jsii contains the functionaility needed for jsii packages to +// initialize their dependencies and themselves. Users should never need to use this package +// directly. If you find you need to - please report a bug at +// https://github.com/aws/jsii/issues/new/choose +package jsii + +import ( + _ "embed" + + _jsii_ "github.com/aws/jsii-runtime-go/runtime" + + constructs "github.com/aws/constructs-go/constructs/v10/jsii" + cdk8s "github.com/cdk8s-team/cdk8s-core-go/cdk8s/v2/jsii" +) + +//go:embed chaos-meshorg-0.0.0.tgz +var tarball []byte + +// Initialize loads the necessary packages in the @jsii/kernel to support the enclosing module. +// The implementation is idempotent (and hence safe to be called over and over). +func Initialize() { + // Ensure all dependencies are initialized + cdk8s.Initialize() + constructs.Initialize() + + // Load this library into the kernel + _jsii_.Load("chaos-meshorg", "0.0.0", tarball) +} diff --git a/env/imports/k8s/podiochaos/chaosmeshorg/version b/env/imports/k8s/podiochaos/chaosmeshorg/version new file mode 100644 index 000000000..77d6f4ca2 --- /dev/null +++ b/env/imports/k8s/podiochaos/chaosmeshorg/version @@ -0,0 +1 @@ +0.0.0 diff --git a/env/imports/k8s/podnetworkchaos/chaosmeshorg/chaosmeshorg.go b/env/imports/k8s/podnetworkchaos/chaosmeshorg/chaosmeshorg.go new file mode 100644 index 000000000..922d8bcb3 --- /dev/null +++ b/env/imports/k8s/podnetworkchaos/chaosmeshorg/chaosmeshorg.go @@ -0,0 +1,394 @@ +// chaos-meshorg +package chaosmeshorg + +import ( + _jsii_ "github.com/aws/jsii-runtime-go/runtime" + _init_ "github.com/smartcontractkit/chainlink-testing-framework/env/imports/k8s/podnetworkchaos/chaosmeshorg/jsii" + + "github.com/aws/constructs-go/constructs/v10" + "github.com/cdk8s-team/cdk8s-core-go/cdk8s/v2" + "github.com/smartcontractkit/chainlink-testing-framework/env/imports/k8s/podnetworkchaos/chaosmeshorg/internal" +) + +// PodNetworkChaos is the Schema for the PodNetworkChaos API. +type PodNetworkChaos interface { + cdk8s.ApiObject + // The group portion of the API version (e.g. `authorization.k8s.io`). + ApiGroup() *string + // The object's API version (e.g. `authorization.k8s.io/v1`). + ApiVersion() *string + // The chart in which this object is defined. + Chart() cdk8s.Chart + // The object kind. + Kind() *string + // Metadata associated with this API object. + Metadata() cdk8s.ApiObjectMetadataDefinition + // The name of the API object. + // + // If a name is specified in `metadata.name` this will be the name returned. + // Otherwise, a name will be generated by calling + // `Chart.of(this).generatedObjectName(this)`, which by default uses the + // construct path to generate a DNS-compatible name for the resource. + Name() *string + // The tree node. + Node() constructs.Node + // Create a dependency between this ApiObject and other constructs. + // + // These can be other ApiObjects, Charts, or custom. + AddDependency(dependencies ...constructs.IConstruct) + // Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. + // + // Example: + // kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true)); + // + AddJsonPatch(ops ...cdk8s.JsonPatch) + // Renders the object to Kubernetes JSON. + ToJson() interface{} + // Returns a string representation of this construct. + ToString() *string +} + +// The jsii proxy struct for PodNetworkChaos +type jsiiProxy_PodNetworkChaos struct { + internal.Type__cdk8sApiObject +} + +func (j *jsiiProxy_PodNetworkChaos) ApiGroup() *string { + var returns *string + _jsii_.Get( + j, + "apiGroup", + &returns, + ) + return returns +} + +func (j *jsiiProxy_PodNetworkChaos) ApiVersion() *string { + var returns *string + _jsii_.Get( + j, + "apiVersion", + &returns, + ) + return returns +} + +func (j *jsiiProxy_PodNetworkChaos) Chart() cdk8s.Chart { + var returns cdk8s.Chart + _jsii_.Get( + j, + "chart", + &returns, + ) + return returns +} + +func (j *jsiiProxy_PodNetworkChaos) Kind() *string { + var returns *string + _jsii_.Get( + j, + "kind", + &returns, + ) + return returns +} + +func (j *jsiiProxy_PodNetworkChaos) Metadata() cdk8s.ApiObjectMetadataDefinition { + var returns cdk8s.ApiObjectMetadataDefinition + _jsii_.Get( + j, + "metadata", + &returns, + ) + return returns +} + +func (j *jsiiProxy_PodNetworkChaos) Name() *string { + var returns *string + _jsii_.Get( + j, + "name", + &returns, + ) + return returns +} + +func (j *jsiiProxy_PodNetworkChaos) Node() constructs.Node { + var returns constructs.Node + _jsii_.Get( + j, + "node", + &returns, + ) + return returns +} + +// Defines a "PodNetworkChaos" API object. +func NewPodNetworkChaos(scope constructs.Construct, id *string, props *PodNetworkChaosProps) PodNetworkChaos { + _init_.Initialize() + + j := jsiiProxy_PodNetworkChaos{} + + _jsii_.Create( + "chaos-meshorg.PodNetworkChaos", + []interface{}{scope, id, props}, + &j, + ) + + return &j +} + +// Defines a "PodNetworkChaos" API object. +func NewPodNetworkChaos_Override(p PodNetworkChaos, scope constructs.Construct, id *string, props *PodNetworkChaosProps) { + _init_.Initialize() + + _jsii_.Create( + "chaos-meshorg.PodNetworkChaos", + []interface{}{scope, id, props}, + p, + ) +} + +// Checks if `x` is a construct. +// +// Use this method instead of `instanceof` to properly detect `Construct` +// instances, even when the construct library is symlinked. +// +// Explanation: in JavaScript, multiple copies of the `constructs` library on +// disk are seen as independent, completely different libraries. As a +// consequence, the class `Construct` in each copy of the `constructs` library +// is seen as a different class, and an instance of one class will not test as +// `instanceof` the other class. `npm install` will not create installations +// like this, but users may manually symlink construct libraries together or +// use a monorepo tool: in those cases, multiple copies of the `constructs` +// library can be accidentally installed, and `instanceof` will behave +// unpredictably. It is safest to avoid using `instanceof`, and using +// this type-testing method instead. +// +// Returns: true if `x` is an object created from a class which extends `Construct`. +func PodNetworkChaos_IsConstruct(x interface{}) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "chaos-meshorg.PodNetworkChaos", + "isConstruct", + []interface{}{x}, + &returns, + ) + + return returns +} + +// Renders a Kubernetes manifest for "PodNetworkChaos". +// +// This can be used to inline resource manifests inside other objects (e.g. as templates). +func PodNetworkChaos_Manifest(props *PodNetworkChaosProps) interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "chaos-meshorg.PodNetworkChaos", + "manifest", + []interface{}{props}, + &returns, + ) + + return returns +} + +// Returns the `ApiObject` named `Resource` which is a child of the given construct. +// +// If `c` is an `ApiObject`, it is returned directly. Throws an +// exception if the construct does not have a child named `Default` _or_ if +// this child is not an `ApiObject`. +func PodNetworkChaos_Of(c constructs.IConstruct) cdk8s.ApiObject { + _init_.Initialize() + + var returns cdk8s.ApiObject + + _jsii_.StaticInvoke( + "chaos-meshorg.PodNetworkChaos", + "of", + []interface{}{c}, + &returns, + ) + + return returns +} + +func PodNetworkChaos_GVK() *cdk8s.GroupVersionKind { + _init_.Initialize() + var returns *cdk8s.GroupVersionKind + _jsii_.StaticGet( + "chaos-meshorg.PodNetworkChaos", + "GVK", + &returns, + ) + return returns +} + +func (p *jsiiProxy_PodNetworkChaos) AddDependency(dependencies ...constructs.IConstruct) { + args := []interface{}{} + for _, a := range dependencies { + args = append(args, a) + } + + _jsii_.InvokeVoid( + p, + "addDependency", + args, + ) +} + +func (p *jsiiProxy_PodNetworkChaos) AddJsonPatch(ops ...cdk8s.JsonPatch) { + args := []interface{}{} + for _, a := range ops { + args = append(args, a) + } + + _jsii_.InvokeVoid( + p, + "addJsonPatch", + args, + ) +} + +func (p *jsiiProxy_PodNetworkChaos) ToJson() interface{} { + var returns interface{} + + _jsii_.Invoke( + p, + "toJson", + nil, // no parameters + &returns, + ) + + return returns +} + +func (p *jsiiProxy_PodNetworkChaos) ToString() *string { + var returns *string + + _jsii_.Invoke( + p, + "toString", + nil, // no parameters + &returns, + ) + + return returns +} + +// PodNetworkChaos is the Schema for the PodNetworkChaos API. +type PodNetworkChaosProps struct { + // Spec defines the behavior of a pod chaos experiment. + Spec *PodNetworkChaosSpec `field:"required" json:"spec" yaml:"spec"` + Metadata *cdk8s.ApiObjectMetadata `field:"optional" json:"metadata" yaml:"metadata"` +} + +// Spec defines the behavior of a pod chaos experiment. +type PodNetworkChaosSpec struct { + // The ipset on the pod. + Ipsets *[]*PodNetworkChaosSpecIpsets `field:"optional" json:"ipsets" yaml:"ipsets"` + // The iptables rules on the pod. + Iptables *[]*PodNetworkChaosSpecIptables `field:"optional" json:"iptables" yaml:"iptables"` + // The tc rules on the pod. + Tcs *[]*PodNetworkChaosSpecTcs `field:"optional" json:"tcs" yaml:"tcs"` +} + +// RawIPSet represents an ipset on specific pod. +type PodNetworkChaosSpecIpsets struct { + // The contents of ipset. + Cidrs *[]*string `field:"required" json:"cidrs" yaml:"cidrs"` + // The name of ipset. + Name *string `field:"required" json:"name" yaml:"name"` + Source *string `field:"required" json:"source" yaml:"source"` +} + +// RawIptables represents the iptables rules on specific pod. +type PodNetworkChaosSpecIptables struct { + // The block direction of this iptables rule. + Direction *string `field:"required" json:"direction" yaml:"direction"` + // The name of iptables chain. + Name *string `field:"required" json:"name" yaml:"name"` + Source *string `field:"required" json:"source" yaml:"source"` + // The name of related ipset. + Ipsets *[]*string `field:"optional" json:"ipsets" yaml:"ipsets"` +} + +// RawTrafficControl represents the traffic control chaos on specific pod. +type PodNetworkChaosSpecTcs struct { + // The name and namespace of the source network chaos. + Source *string `field:"required" json:"source" yaml:"source"` + // The type of traffic control. + Type *string `field:"required" json:"type" yaml:"type"` + // Bandwidth represents the detail about bandwidth control action. + Bandwidth *PodNetworkChaosSpecTcsBandwidth `field:"optional" json:"bandwidth" yaml:"bandwidth"` + // Corrupt represents the detail about corrupt action. + Corrupt *PodNetworkChaosSpecTcsCorrupt `field:"optional" json:"corrupt" yaml:"corrupt"` + // Delay represents the detail about delay action. + Delay *PodNetworkChaosSpecTcsDelay `field:"optional" json:"delay" yaml:"delay"` + // DuplicateSpec represents the detail about loss action. + Duplicate *PodNetworkChaosSpecTcsDuplicate `field:"optional" json:"duplicate" yaml:"duplicate"` + // The name of target ipset. + Ipset *string `field:"optional" json:"ipset" yaml:"ipset"` + // Loss represents the detail about loss action. + Loss *PodNetworkChaosSpecTcsLoss `field:"optional" json:"loss" yaml:"loss"` +} + +// Bandwidth represents the detail about bandwidth control action. +type PodNetworkChaosSpecTcsBandwidth struct { + // Buffer is the maximum amount of bytes that tokens can be available for instantaneously. + Buffer *float64 `field:"required" json:"buffer" yaml:"buffer"` + // Limit is the number of bytes that can be queued waiting for tokens to become available. + Limit *float64 `field:"required" json:"limit" yaml:"limit"` + // Rate is the speed knob. + // + // Allows bps, kbps, mbps, gbps, tbps unit. bps means bytes per second. + Rate *string `field:"required" json:"rate" yaml:"rate"` + // Minburst specifies the size of the peakrate bucket. + // + // For perfect accuracy, should be set to the MTU of the interface. If a peakrate is needed, but some burstiness is acceptable, this size can be raised. A 3000 byte minburst allows around 3mbit/s of peakrate, given 1000 byte packets. + Minburst *float64 `field:"optional" json:"minburst" yaml:"minburst"` + // Peakrate is the maximum depletion rate of the bucket. + // + // The peakrate does not need to be set, it is only necessary if perfect millisecond timescale shaping is required. + Peakrate *float64 `field:"optional" json:"peakrate" yaml:"peakrate"` +} + +// Corrupt represents the detail about corrupt action. +type PodNetworkChaosSpecTcsCorrupt struct { + Corrupt *string `field:"required" json:"corrupt" yaml:"corrupt"` + Correlation *string `field:"optional" json:"correlation" yaml:"correlation"` +} + +// Delay represents the detail about delay action. +type PodNetworkChaosSpecTcsDelay struct { + Latency *string `field:"required" json:"latency" yaml:"latency"` + Correlation *string `field:"optional" json:"correlation" yaml:"correlation"` + Jitter *string `field:"optional" json:"jitter" yaml:"jitter"` + // ReorderSpec defines details of packet reorder. + Reorder *PodNetworkChaosSpecTcsDelayReorder `field:"optional" json:"reorder" yaml:"reorder"` +} + +// ReorderSpec defines details of packet reorder. +type PodNetworkChaosSpecTcsDelayReorder struct { + Gap *float64 `field:"required" json:"gap" yaml:"gap"` + Reorder *string `field:"required" json:"reorder" yaml:"reorder"` + Correlation *string `field:"optional" json:"correlation" yaml:"correlation"` +} + +// DuplicateSpec represents the detail about loss action. +type PodNetworkChaosSpecTcsDuplicate struct { + Duplicate *string `field:"required" json:"duplicate" yaml:"duplicate"` + Correlation *string `field:"optional" json:"correlation" yaml:"correlation"` +} + +// Loss represents the detail about loss action. +type PodNetworkChaosSpecTcsLoss struct { + Loss *string `field:"required" json:"loss" yaml:"loss"` + Correlation *string `field:"optional" json:"correlation" yaml:"correlation"` +} diff --git a/env/imports/k8s/podnetworkchaos/chaosmeshorg/chaosmeshorg.init.go b/env/imports/k8s/podnetworkchaos/chaosmeshorg/chaosmeshorg.init.go new file mode 100644 index 000000000..127558480 --- /dev/null +++ b/env/imports/k8s/podnetworkchaos/chaosmeshorg/chaosmeshorg.init.go @@ -0,0 +1,76 @@ +package chaosmeshorg + +import ( + "reflect" + + _jsii_ "github.com/aws/jsii-runtime-go/runtime" +) + +func init() { + _jsii_.RegisterClass( + "chaos-meshorg.PodNetworkChaos", + reflect.TypeOf((*PodNetworkChaos)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "addDependency", GoMethod: "AddDependency"}, + _jsii_.MemberMethod{JsiiMethod: "addJsonPatch", GoMethod: "AddJsonPatch"}, + _jsii_.MemberProperty{JsiiProperty: "apiGroup", GoGetter: "ApiGroup"}, + _jsii_.MemberProperty{JsiiProperty: "apiVersion", GoGetter: "ApiVersion"}, + _jsii_.MemberProperty{JsiiProperty: "chart", GoGetter: "Chart"}, + _jsii_.MemberProperty{JsiiProperty: "kind", GoGetter: "Kind"}, + _jsii_.MemberProperty{JsiiProperty: "metadata", GoGetter: "Metadata"}, + _jsii_.MemberProperty{JsiiProperty: "name", GoGetter: "Name"}, + _jsii_.MemberProperty{JsiiProperty: "node", GoGetter: "Node"}, + _jsii_.MemberMethod{JsiiMethod: "toJson", GoMethod: "ToJson"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + }, + func() interface{} { + j := jsiiProxy_PodNetworkChaos{} + _jsii_.InitJsiiProxy(&j.Type__cdk8sApiObject) + return &j + }, + ) + _jsii_.RegisterStruct( + "chaos-meshorg.PodNetworkChaosProps", + reflect.TypeOf((*PodNetworkChaosProps)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "chaos-meshorg.PodNetworkChaosSpec", + reflect.TypeOf((*PodNetworkChaosSpec)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "chaos-meshorg.PodNetworkChaosSpecIpsets", + reflect.TypeOf((*PodNetworkChaosSpecIpsets)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "chaos-meshorg.PodNetworkChaosSpecIptables", + reflect.TypeOf((*PodNetworkChaosSpecIptables)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "chaos-meshorg.PodNetworkChaosSpecTcs", + reflect.TypeOf((*PodNetworkChaosSpecTcs)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "chaos-meshorg.PodNetworkChaosSpecTcsBandwidth", + reflect.TypeOf((*PodNetworkChaosSpecTcsBandwidth)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "chaos-meshorg.PodNetworkChaosSpecTcsCorrupt", + reflect.TypeOf((*PodNetworkChaosSpecTcsCorrupt)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "chaos-meshorg.PodNetworkChaosSpecTcsDelay", + reflect.TypeOf((*PodNetworkChaosSpecTcsDelay)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "chaos-meshorg.PodNetworkChaosSpecTcsDelayReorder", + reflect.TypeOf((*PodNetworkChaosSpecTcsDelayReorder)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "chaos-meshorg.PodNetworkChaosSpecTcsDuplicate", + reflect.TypeOf((*PodNetworkChaosSpecTcsDuplicate)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "chaos-meshorg.PodNetworkChaosSpecTcsLoss", + reflect.TypeOf((*PodNetworkChaosSpecTcsLoss)(nil)).Elem(), + ) +} diff --git a/env/imports/k8s/podnetworkchaos/chaosmeshorg/internal/types.go b/env/imports/k8s/podnetworkchaos/chaosmeshorg/internal/types.go new file mode 100644 index 000000000..de3a04f73 --- /dev/null +++ b/env/imports/k8s/podnetworkchaos/chaosmeshorg/internal/types.go @@ -0,0 +1,5 @@ +package internal +import ( + "github.com/cdk8s-team/cdk8s-core-go/cdk8s/v2" +) +type Type__cdk8sApiObject = cdk8s.ApiObject diff --git a/env/imports/k8s/podnetworkchaos/chaosmeshorg/jsii/chaos-meshorg-0.0.0.tgz b/env/imports/k8s/podnetworkchaos/chaosmeshorg/jsii/chaos-meshorg-0.0.0.tgz new file mode 100644 index 000000000..58b064e72 Binary files /dev/null and b/env/imports/k8s/podnetworkchaos/chaosmeshorg/jsii/chaos-meshorg-0.0.0.tgz differ diff --git a/env/imports/k8s/podnetworkchaos/chaosmeshorg/jsii/jsii.go b/env/imports/k8s/podnetworkchaos/chaosmeshorg/jsii/jsii.go new file mode 100644 index 000000000..319ef3f24 --- /dev/null +++ b/env/imports/k8s/podnetworkchaos/chaosmeshorg/jsii/jsii.go @@ -0,0 +1,28 @@ +// Package jsii contains the functionaility needed for jsii packages to +// initialize their dependencies and themselves. Users should never need to use this package +// directly. If you find you need to - please report a bug at +// https://github.com/aws/jsii/issues/new/choose +package jsii + +import ( + _ "embed" + + _jsii_ "github.com/aws/jsii-runtime-go/runtime" + + constructs "github.com/aws/constructs-go/constructs/v10/jsii" + cdk8s "github.com/cdk8s-team/cdk8s-core-go/cdk8s/v2/jsii" +) + +//go:embed chaos-meshorg-0.0.0.tgz +var tarball []byte + +// Initialize loads the necessary packages in the @jsii/kernel to support the enclosing module. +// The implementation is idempotent (and hence safe to be called over and over). +func Initialize() { + // Ensure all dependencies are initialized + cdk8s.Initialize() + constructs.Initialize() + + // Load this library into the kernel + _jsii_.Load("chaos-meshorg", "0.0.0", tarball) +} diff --git a/env/imports/k8s/podnetworkchaos/chaosmeshorg/version b/env/imports/k8s/podnetworkchaos/chaosmeshorg/version new file mode 100644 index 000000000..77d6f4ca2 --- /dev/null +++ b/env/imports/k8s/podnetworkchaos/chaosmeshorg/version @@ -0,0 +1 @@ +0.0.0 diff --git a/env/imports/k8s/stresschaos/chaosmeshorg/chaosmeshorg.go b/env/imports/k8s/stresschaos/chaosmeshorg/chaosmeshorg.go new file mode 100644 index 000000000..feae7637d --- /dev/null +++ b/env/imports/k8s/stresschaos/chaosmeshorg/chaosmeshorg.go @@ -0,0 +1,424 @@ +// chaos-meshorg +package chaosmeshorg + +import ( + _jsii_ "github.com/aws/jsii-runtime-go/runtime" + _init_ "github.com/smartcontractkit/chainlink-testing-framework/env/imports/k8s/stresschaos/chaosmeshorg/jsii" + + "github.com/aws/constructs-go/constructs/v10" + "github.com/cdk8s-team/cdk8s-core-go/cdk8s/v2" + "github.com/smartcontractkit/chainlink-testing-framework/env/imports/k8s/stresschaos/chaosmeshorg/internal" +) + +// StressChaos is the Schema for the stresschaos API. +type StressChaos interface { + cdk8s.ApiObject + // The group portion of the API version (e.g. `authorization.k8s.io`). + ApiGroup() *string + // The object's API version (e.g. `authorization.k8s.io/v1`). + ApiVersion() *string + // The chart in which this object is defined. + Chart() cdk8s.Chart + // The object kind. + Kind() *string + // Metadata associated with this API object. + Metadata() cdk8s.ApiObjectMetadataDefinition + // The name of the API object. + // + // If a name is specified in `metadata.name` this will be the name returned. + // Otherwise, a name will be generated by calling + // `Chart.of(this).generatedObjectName(this)`, which by default uses the + // construct path to generate a DNS-compatible name for the resource. + Name() *string + // The tree node. + Node() constructs.Node + // Create a dependency between this ApiObject and other constructs. + // + // These can be other ApiObjects, Charts, or custom. + AddDependency(dependencies ...constructs.IConstruct) + // Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. + // + // Example: + // kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true)); + // + AddJsonPatch(ops ...cdk8s.JsonPatch) + // Renders the object to Kubernetes JSON. + ToJson() interface{} + // Returns a string representation of this construct. + ToString() *string +} + +// The jsii proxy struct for StressChaos +type jsiiProxy_StressChaos struct { + internal.Type__cdk8sApiObject +} + +func (j *jsiiProxy_StressChaos) ApiGroup() *string { + var returns *string + _jsii_.Get( + j, + "apiGroup", + &returns, + ) + return returns +} + +func (j *jsiiProxy_StressChaos) ApiVersion() *string { + var returns *string + _jsii_.Get( + j, + "apiVersion", + &returns, + ) + return returns +} + +func (j *jsiiProxy_StressChaos) Chart() cdk8s.Chart { + var returns cdk8s.Chart + _jsii_.Get( + j, + "chart", + &returns, + ) + return returns +} + +func (j *jsiiProxy_StressChaos) Kind() *string { + var returns *string + _jsii_.Get( + j, + "kind", + &returns, + ) + return returns +} + +func (j *jsiiProxy_StressChaos) Metadata() cdk8s.ApiObjectMetadataDefinition { + var returns cdk8s.ApiObjectMetadataDefinition + _jsii_.Get( + j, + "metadata", + &returns, + ) + return returns +} + +func (j *jsiiProxy_StressChaos) Name() *string { + var returns *string + _jsii_.Get( + j, + "name", + &returns, + ) + return returns +} + +func (j *jsiiProxy_StressChaos) Node() constructs.Node { + var returns constructs.Node + _jsii_.Get( + j, + "node", + &returns, + ) + return returns +} + +// Defines a "StressChaos" API object. +func NewStressChaos(scope constructs.Construct, id *string, props *StressChaosProps) StressChaos { + _init_.Initialize() + + j := jsiiProxy_StressChaos{} + + _jsii_.Create( + "chaos-meshorg.StressChaos", + []interface{}{scope, id, props}, + &j, + ) + + return &j +} + +// Defines a "StressChaos" API object. +func NewStressChaos_Override(s StressChaos, scope constructs.Construct, id *string, props *StressChaosProps) { + _init_.Initialize() + + _jsii_.Create( + "chaos-meshorg.StressChaos", + []interface{}{scope, id, props}, + s, + ) +} + +// Checks if `x` is a construct. +// +// Use this method instead of `instanceof` to properly detect `Construct` +// instances, even when the construct library is symlinked. +// +// Explanation: in JavaScript, multiple copies of the `constructs` library on +// disk are seen as independent, completely different libraries. As a +// consequence, the class `Construct` in each copy of the `constructs` library +// is seen as a different class, and an instance of one class will not test as +// `instanceof` the other class. `npm install` will not create installations +// like this, but users may manually symlink construct libraries together or +// use a monorepo tool: in those cases, multiple copies of the `constructs` +// library can be accidentally installed, and `instanceof` will behave +// unpredictably. It is safest to avoid using `instanceof`, and using +// this type-testing method instead. +// +// Returns: true if `x` is an object created from a class which extends `Construct`. +func StressChaos_IsConstruct(x interface{}) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "chaos-meshorg.StressChaos", + "isConstruct", + []interface{}{x}, + &returns, + ) + + return returns +} + +// Renders a Kubernetes manifest for "StressChaos". +// +// This can be used to inline resource manifests inside other objects (e.g. as templates). +func StressChaos_Manifest(props *StressChaosProps) interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "chaos-meshorg.StressChaos", + "manifest", + []interface{}{props}, + &returns, + ) + + return returns +} + +// Returns the `ApiObject` named `Resource` which is a child of the given construct. +// +// If `c` is an `ApiObject`, it is returned directly. Throws an +// exception if the construct does not have a child named `Default` _or_ if +// this child is not an `ApiObject`. +func StressChaos_Of(c constructs.IConstruct) cdk8s.ApiObject { + _init_.Initialize() + + var returns cdk8s.ApiObject + + _jsii_.StaticInvoke( + "chaos-meshorg.StressChaos", + "of", + []interface{}{c}, + &returns, + ) + + return returns +} + +func StressChaos_GVK() *cdk8s.GroupVersionKind { + _init_.Initialize() + var returns *cdk8s.GroupVersionKind + _jsii_.StaticGet( + "chaos-meshorg.StressChaos", + "GVK", + &returns, + ) + return returns +} + +func (s *jsiiProxy_StressChaos) AddDependency(dependencies ...constructs.IConstruct) { + args := []interface{}{} + for _, a := range dependencies { + args = append(args, a) + } + + _jsii_.InvokeVoid( + s, + "addDependency", + args, + ) +} + +func (s *jsiiProxy_StressChaos) AddJsonPatch(ops ...cdk8s.JsonPatch) { + args := []interface{}{} + for _, a := range ops { + args = append(args, a) + } + + _jsii_.InvokeVoid( + s, + "addJsonPatch", + args, + ) +} + +func (s *jsiiProxy_StressChaos) ToJson() interface{} { + var returns interface{} + + _jsii_.Invoke( + s, + "toJson", + nil, // no parameters + &returns, + ) + + return returns +} + +func (s *jsiiProxy_StressChaos) ToString() *string { + var returns *string + + _jsii_.Invoke( + s, + "toString", + nil, // no parameters + &returns, + ) + + return returns +} + +// StressChaos is the Schema for the stresschaos API. +type StressChaosProps struct { + // Spec defines the behavior of a time chaos experiment. + Spec *StressChaosSpec `field:"required" json:"spec" yaml:"spec"` + Metadata *cdk8s.ApiObjectMetadata `field:"optional" json:"metadata" yaml:"metadata"` +} + +// Spec defines the behavior of a time chaos experiment. +type StressChaosSpec struct { + // Mode defines the mode to run chaos action. + // + // Supported mode: one / all / fixed / fixed-percent / random-max-percent. + Mode StressChaosSpecMode `field:"required" json:"mode" yaml:"mode"` + // Selector is used to select pods that are used to inject chaos action. + Selector *StressChaosSpecSelector `field:"required" json:"selector" yaml:"selector"` + // ContainerNames indicates list of the name of affected container. + // + // If not set, all containers will be injected. + ContainerNames *[]*string `field:"optional" json:"containerNames" yaml:"containerNames"` + // Duration represents the duration of the chaos action. + Duration *string `field:"optional" json:"duration" yaml:"duration"` + // StressngStressors defines plenty of stressors just like `Stressors` except that it's an experimental feature and more powerful. + // + // You can define stressors in `stress-ng` (see also `man stress-ng`) dialect, however not all of the supported stressors are well tested. It maybe retired in later releases. You should always use `Stressors` to define the stressors and use this only when you want more stressors unsupported by `Stressors`. When both `StressngStressors` and `Stressors` are defined, `StressngStressors` wins. + StressngStressors *string `field:"optional" json:"stressngStressors" yaml:"stressngStressors"` + // Stressors defines plenty of stressors supported to stress system components out. + // + // You can use one or more of them to make up various kinds of stresses. At least one of the stressors should be specified. + Stressors *StressChaosSpecStressors `field:"optional" json:"stressors" yaml:"stressors"` + // Value is required when the mode is set to `FixedPodMode` / `FixedPercentPodMod` / `RandomMaxPercentPodMod`. + // + // If `FixedPodMode`, provide an integer of pods to do chaos action. If `FixedPercentPodMod`, provide a number from 0-100 to specify the percent of pods the server can do chaos action. IF `RandomMaxPercentPodMod`, provide a number from 0-100 to specify the max percent of pods to do chaos action + Value *string `field:"optional" json:"value" yaml:"value"` +} + +// Mode defines the mode to run chaos action. +// +// Supported mode: one / all / fixed / fixed-percent / random-max-percent. +type StressChaosSpecMode string + +const ( + // one. + StressChaosSpecMode_ONE StressChaosSpecMode = "ONE" + // all. + StressChaosSpecMode_ALL StressChaosSpecMode = "ALL" + // fixed. + StressChaosSpecMode_FIXED StressChaosSpecMode = "FIXED" + // fixed-percent. + StressChaosSpecMode_FIXED_PERCENT StressChaosSpecMode = "FIXED_PERCENT" + // random-max-percent. + StressChaosSpecMode_RANDOM_MAX_PERCENT StressChaosSpecMode = "RANDOM_MAX_PERCENT" +) + +// Selector is used to select pods that are used to inject chaos action. +type StressChaosSpecSelector struct { + // Map of string keys and values that can be used to select objects. + // + // A selector based on annotations. + AnnotationSelectors *map[string]*string `field:"optional" json:"annotationSelectors" yaml:"annotationSelectors"` + // a slice of label selector expressions that can be used to select objects. + // + // A list of selectors based on set-based label expressions. + ExpressionSelectors *[]*StressChaosSpecSelectorExpressionSelectors `field:"optional" json:"expressionSelectors" yaml:"expressionSelectors"` + // Map of string keys and values that can be used to select objects. + // + // A selector based on fields. + FieldSelectors *map[string]*string `field:"optional" json:"fieldSelectors" yaml:"fieldSelectors"` + // Map of string keys and values that can be used to select objects. + // + // A selector based on labels. + LabelSelectors *map[string]*string `field:"optional" json:"labelSelectors" yaml:"labelSelectors"` + // Namespaces is a set of namespace to which objects belong. + Namespaces *[]*string `field:"optional" json:"namespaces" yaml:"namespaces"` + // Nodes is a set of node name and objects must belong to these nodes. + Nodes *[]*string `field:"optional" json:"nodes" yaml:"nodes"` + // Map of string keys and values that can be used to select nodes. + // + // Selector which must match a node's labels, and objects must belong to these selected nodes. + NodeSelectors *map[string]*string `field:"optional" json:"nodeSelectors" yaml:"nodeSelectors"` + // PodPhaseSelectors is a set of condition of a pod at the current time. + // + // supported value: Pending / Running / Succeeded / Failed / Unknown. + PodPhaseSelectors *[]*string `field:"optional" json:"podPhaseSelectors" yaml:"podPhaseSelectors"` + // Pods is a map of string keys and a set values that used to select pods. + // + // The key defines the namespace which pods belong, and the each values is a set of pod names. + Pods *map[string]*[]*string `field:"optional" json:"pods" yaml:"pods"` +} + +// A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. +type StressChaosSpecSelectorExpressionSelectors struct { + // key is the label key that the selector applies to. + Key *string `field:"required" json:"key" yaml:"key"` + // operator represents a key's relationship to a set of values. + // + // Valid operators are In, NotIn, Exists and DoesNotExist. + Operator *string `field:"required" json:"operator" yaml:"operator"` + // 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. + Values *[]*string `field:"optional" json:"values" yaml:"values"` +} + +// Stressors defines plenty of stressors supported to stress system components out. +// +// You can use one or more of them to make up various kinds of stresses. At least one of the stressors should be specified. +type StressChaosSpecStressors struct { + // CPUStressor stresses CPU out. + Cpu *StressChaosSpecStressorsCpu `field:"optional" json:"cpu" yaml:"cpu"` + // MemoryStressor stresses virtual memory out. + Memory *StressChaosSpecStressorsMemory `field:"optional" json:"memory" yaml:"memory"` +} + +// CPUStressor stresses CPU out. +type StressChaosSpecStressorsCpu struct { + // Workers specifies N workers to apply the stressor. + // + // Maximum 8192 workers can run by stress-ng. + Workers *float64 `field:"required" json:"workers" yaml:"workers"` + // Load specifies P percent loading per CPU worker. + // + // 0 is effectively a sleep (no load) and 100 is full loading. + Load *float64 `field:"optional" json:"load" yaml:"load"` + // extend stress-ng options. + Options *[]*string `field:"optional" json:"options" yaml:"options"` +} + +// MemoryStressor stresses virtual memory out. +type StressChaosSpecStressorsMemory struct { + // Workers specifies N workers to apply the stressor. + // + // Maximum 8192 workers can run by stress-ng. + Workers *float64 `field:"required" json:"workers" yaml:"workers"` + // extend stress-ng options. + Options *[]*string `field:"optional" json:"options" yaml:"options"` + // Size specifies N bytes consumed per vm worker, default is the total available memory. + // + // One can specify the size as % of total available memory or in units of B, KB/KiB, MB/MiB, GB/GiB, TB/TiB. + Size *string `field:"optional" json:"size" yaml:"size"` +} diff --git a/env/imports/k8s/stresschaos/chaosmeshorg/chaosmeshorg.init.go b/env/imports/k8s/stresschaos/chaosmeshorg/chaosmeshorg.init.go new file mode 100644 index 000000000..645be226f --- /dev/null +++ b/env/imports/k8s/stresschaos/chaosmeshorg/chaosmeshorg.init.go @@ -0,0 +1,71 @@ +package chaosmeshorg + +import ( + "reflect" + + _jsii_ "github.com/aws/jsii-runtime-go/runtime" +) + +func init() { + _jsii_.RegisterClass( + "chaos-meshorg.StressChaos", + reflect.TypeOf((*StressChaos)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "addDependency", GoMethod: "AddDependency"}, + _jsii_.MemberMethod{JsiiMethod: "addJsonPatch", GoMethod: "AddJsonPatch"}, + _jsii_.MemberProperty{JsiiProperty: "apiGroup", GoGetter: "ApiGroup"}, + _jsii_.MemberProperty{JsiiProperty: "apiVersion", GoGetter: "ApiVersion"}, + _jsii_.MemberProperty{JsiiProperty: "chart", GoGetter: "Chart"}, + _jsii_.MemberProperty{JsiiProperty: "kind", GoGetter: "Kind"}, + _jsii_.MemberProperty{JsiiProperty: "metadata", GoGetter: "Metadata"}, + _jsii_.MemberProperty{JsiiProperty: "name", GoGetter: "Name"}, + _jsii_.MemberProperty{JsiiProperty: "node", GoGetter: "Node"}, + _jsii_.MemberMethod{JsiiMethod: "toJson", GoMethod: "ToJson"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + }, + func() interface{} { + j := jsiiProxy_StressChaos{} + _jsii_.InitJsiiProxy(&j.Type__cdk8sApiObject) + return &j + }, + ) + _jsii_.RegisterStruct( + "chaos-meshorg.StressChaosProps", + reflect.TypeOf((*StressChaosProps)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "chaos-meshorg.StressChaosSpec", + reflect.TypeOf((*StressChaosSpec)(nil)).Elem(), + ) + _jsii_.RegisterEnum( + "chaos-meshorg.StressChaosSpecMode", + reflect.TypeOf((*StressChaosSpecMode)(nil)).Elem(), + map[string]interface{}{ + "ONE": StressChaosSpecMode_ONE, + "ALL": StressChaosSpecMode_ALL, + "FIXED": StressChaosSpecMode_FIXED, + "FIXED_PERCENT": StressChaosSpecMode_FIXED_PERCENT, + "RANDOM_MAX_PERCENT": StressChaosSpecMode_RANDOM_MAX_PERCENT, + }, + ) + _jsii_.RegisterStruct( + "chaos-meshorg.StressChaosSpecSelector", + reflect.TypeOf((*StressChaosSpecSelector)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "chaos-meshorg.StressChaosSpecSelectorExpressionSelectors", + reflect.TypeOf((*StressChaosSpecSelectorExpressionSelectors)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "chaos-meshorg.StressChaosSpecStressors", + reflect.TypeOf((*StressChaosSpecStressors)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "chaos-meshorg.StressChaosSpecStressorsCpu", + reflect.TypeOf((*StressChaosSpecStressorsCpu)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "chaos-meshorg.StressChaosSpecStressorsMemory", + reflect.TypeOf((*StressChaosSpecStressorsMemory)(nil)).Elem(), + ) +} diff --git a/env/imports/k8s/stresschaos/chaosmeshorg/internal/types.go b/env/imports/k8s/stresschaos/chaosmeshorg/internal/types.go new file mode 100644 index 000000000..de3a04f73 --- /dev/null +++ b/env/imports/k8s/stresschaos/chaosmeshorg/internal/types.go @@ -0,0 +1,5 @@ +package internal +import ( + "github.com/cdk8s-team/cdk8s-core-go/cdk8s/v2" +) +type Type__cdk8sApiObject = cdk8s.ApiObject diff --git a/env/imports/k8s/stresschaos/chaosmeshorg/jsii/chaos-meshorg-0.0.0.tgz b/env/imports/k8s/stresschaos/chaosmeshorg/jsii/chaos-meshorg-0.0.0.tgz new file mode 100644 index 000000000..bca51fffa Binary files /dev/null and b/env/imports/k8s/stresschaos/chaosmeshorg/jsii/chaos-meshorg-0.0.0.tgz differ diff --git a/env/imports/k8s/stresschaos/chaosmeshorg/jsii/jsii.go b/env/imports/k8s/stresschaos/chaosmeshorg/jsii/jsii.go new file mode 100644 index 000000000..319ef3f24 --- /dev/null +++ b/env/imports/k8s/stresschaos/chaosmeshorg/jsii/jsii.go @@ -0,0 +1,28 @@ +// Package jsii contains the functionaility needed for jsii packages to +// initialize their dependencies and themselves. Users should never need to use this package +// directly. If you find you need to - please report a bug at +// https://github.com/aws/jsii/issues/new/choose +package jsii + +import ( + _ "embed" + + _jsii_ "github.com/aws/jsii-runtime-go/runtime" + + constructs "github.com/aws/constructs-go/constructs/v10/jsii" + cdk8s "github.com/cdk8s-team/cdk8s-core-go/cdk8s/v2/jsii" +) + +//go:embed chaos-meshorg-0.0.0.tgz +var tarball []byte + +// Initialize loads the necessary packages in the @jsii/kernel to support the enclosing module. +// The implementation is idempotent (and hence safe to be called over and over). +func Initialize() { + // Ensure all dependencies are initialized + cdk8s.Initialize() + constructs.Initialize() + + // Load this library into the kernel + _jsii_.Load("chaos-meshorg", "0.0.0", tarball) +} diff --git a/env/imports/k8s/stresschaos/chaosmeshorg/version b/env/imports/k8s/stresschaos/chaosmeshorg/version new file mode 100644 index 000000000..77d6f4ca2 --- /dev/null +++ b/env/imports/k8s/stresschaos/chaosmeshorg/version @@ -0,0 +1 @@ +0.0.0 diff --git a/env/imports/k8s/timechaos/chaosmeshorg/chaosmeshorg.go b/env/imports/k8s/timechaos/chaosmeshorg/chaosmeshorg.go new file mode 100644 index 000000000..5f5412bfb --- /dev/null +++ b/env/imports/k8s/timechaos/chaosmeshorg/chaosmeshorg.go @@ -0,0 +1,384 @@ +// chaos-meshorg +package chaosmeshorg + +import ( + _jsii_ "github.com/aws/jsii-runtime-go/runtime" + _init_ "github.com/smartcontractkit/chainlink-testing-framework/env/imports/k8s/timechaos/chaosmeshorg/jsii" + + "github.com/aws/constructs-go/constructs/v10" + "github.com/cdk8s-team/cdk8s-core-go/cdk8s/v2" + "github.com/smartcontractkit/chainlink-testing-framework/env/imports/k8s/timechaos/chaosmeshorg/internal" +) + +// TimeChaos is the Schema for the timechaos API. +type TimeChaos interface { + cdk8s.ApiObject + // The group portion of the API version (e.g. `authorization.k8s.io`). + ApiGroup() *string + // The object's API version (e.g. `authorization.k8s.io/v1`). + ApiVersion() *string + // The chart in which this object is defined. + Chart() cdk8s.Chart + // The object kind. + Kind() *string + // Metadata associated with this API object. + Metadata() cdk8s.ApiObjectMetadataDefinition + // The name of the API object. + // + // If a name is specified in `metadata.name` this will be the name returned. + // Otherwise, a name will be generated by calling + // `Chart.of(this).generatedObjectName(this)`, which by default uses the + // construct path to generate a DNS-compatible name for the resource. + Name() *string + // The tree node. + Node() constructs.Node + // Create a dependency between this ApiObject and other constructs. + // + // These can be other ApiObjects, Charts, or custom. + AddDependency(dependencies ...constructs.IConstruct) + // Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. + // + // Example: + // kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true)); + // + AddJsonPatch(ops ...cdk8s.JsonPatch) + // Renders the object to Kubernetes JSON. + ToJson() interface{} + // Returns a string representation of this construct. + ToString() *string +} + +// The jsii proxy struct for TimeChaos +type jsiiProxy_TimeChaos struct { + internal.Type__cdk8sApiObject +} + +func (j *jsiiProxy_TimeChaos) ApiGroup() *string { + var returns *string + _jsii_.Get( + j, + "apiGroup", + &returns, + ) + return returns +} + +func (j *jsiiProxy_TimeChaos) ApiVersion() *string { + var returns *string + _jsii_.Get( + j, + "apiVersion", + &returns, + ) + return returns +} + +func (j *jsiiProxy_TimeChaos) Chart() cdk8s.Chart { + var returns cdk8s.Chart + _jsii_.Get( + j, + "chart", + &returns, + ) + return returns +} + +func (j *jsiiProxy_TimeChaos) Kind() *string { + var returns *string + _jsii_.Get( + j, + "kind", + &returns, + ) + return returns +} + +func (j *jsiiProxy_TimeChaos) Metadata() cdk8s.ApiObjectMetadataDefinition { + var returns cdk8s.ApiObjectMetadataDefinition + _jsii_.Get( + j, + "metadata", + &returns, + ) + return returns +} + +func (j *jsiiProxy_TimeChaos) Name() *string { + var returns *string + _jsii_.Get( + j, + "name", + &returns, + ) + return returns +} + +func (j *jsiiProxy_TimeChaos) Node() constructs.Node { + var returns constructs.Node + _jsii_.Get( + j, + "node", + &returns, + ) + return returns +} + +// Defines a "TimeChaos" API object. +func NewTimeChaos(scope constructs.Construct, id *string, props *TimeChaosProps) TimeChaos { + _init_.Initialize() + + j := jsiiProxy_TimeChaos{} + + _jsii_.Create( + "chaos-meshorg.TimeChaos", + []interface{}{scope, id, props}, + &j, + ) + + return &j +} + +// Defines a "TimeChaos" API object. +func NewTimeChaos_Override(t TimeChaos, scope constructs.Construct, id *string, props *TimeChaosProps) { + _init_.Initialize() + + _jsii_.Create( + "chaos-meshorg.TimeChaos", + []interface{}{scope, id, props}, + t, + ) +} + +// Checks if `x` is a construct. +// +// Use this method instead of `instanceof` to properly detect `Construct` +// instances, even when the construct library is symlinked. +// +// Explanation: in JavaScript, multiple copies of the `constructs` library on +// disk are seen as independent, completely different libraries. As a +// consequence, the class `Construct` in each copy of the `constructs` library +// is seen as a different class, and an instance of one class will not test as +// `instanceof` the other class. `npm install` will not create installations +// like this, but users may manually symlink construct libraries together or +// use a monorepo tool: in those cases, multiple copies of the `constructs` +// library can be accidentally installed, and `instanceof` will behave +// unpredictably. It is safest to avoid using `instanceof`, and using +// this type-testing method instead. +// +// Returns: true if `x` is an object created from a class which extends `Construct`. +func TimeChaos_IsConstruct(x interface{}) *bool { + _init_.Initialize() + + var returns *bool + + _jsii_.StaticInvoke( + "chaos-meshorg.TimeChaos", + "isConstruct", + []interface{}{x}, + &returns, + ) + + return returns +} + +// Renders a Kubernetes manifest for "TimeChaos". +// +// This can be used to inline resource manifests inside other objects (e.g. as templates). +func TimeChaos_Manifest(props *TimeChaosProps) interface{} { + _init_.Initialize() + + var returns interface{} + + _jsii_.StaticInvoke( + "chaos-meshorg.TimeChaos", + "manifest", + []interface{}{props}, + &returns, + ) + + return returns +} + +// Returns the `ApiObject` named `Resource` which is a child of the given construct. +// +// If `c` is an `ApiObject`, it is returned directly. Throws an +// exception if the construct does not have a child named `Default` _or_ if +// this child is not an `ApiObject`. +func TimeChaos_Of(c constructs.IConstruct) cdk8s.ApiObject { + _init_.Initialize() + + var returns cdk8s.ApiObject + + _jsii_.StaticInvoke( + "chaos-meshorg.TimeChaos", + "of", + []interface{}{c}, + &returns, + ) + + return returns +} + +func TimeChaos_GVK() *cdk8s.GroupVersionKind { + _init_.Initialize() + var returns *cdk8s.GroupVersionKind + _jsii_.StaticGet( + "chaos-meshorg.TimeChaos", + "GVK", + &returns, + ) + return returns +} + +func (t *jsiiProxy_TimeChaos) AddDependency(dependencies ...constructs.IConstruct) { + args := []interface{}{} + for _, a := range dependencies { + args = append(args, a) + } + + _jsii_.InvokeVoid( + t, + "addDependency", + args, + ) +} + +func (t *jsiiProxy_TimeChaos) AddJsonPatch(ops ...cdk8s.JsonPatch) { + args := []interface{}{} + for _, a := range ops { + args = append(args, a) + } + + _jsii_.InvokeVoid( + t, + "addJsonPatch", + args, + ) +} + +func (t *jsiiProxy_TimeChaos) ToJson() interface{} { + var returns interface{} + + _jsii_.Invoke( + t, + "toJson", + nil, // no parameters + &returns, + ) + + return returns +} + +func (t *jsiiProxy_TimeChaos) ToString() *string { + var returns *string + + _jsii_.Invoke( + t, + "toString", + nil, // no parameters + &returns, + ) + + return returns +} + +// TimeChaos is the Schema for the timechaos API. +type TimeChaosProps struct { + // Spec defines the behavior of a time chaos experiment. + Spec *TimeChaosSpec `field:"required" json:"spec" yaml:"spec"` + Metadata *cdk8s.ApiObjectMetadata `field:"optional" json:"metadata" yaml:"metadata"` +} + +// Spec defines the behavior of a time chaos experiment. +type TimeChaosSpec struct { + // Mode defines the mode to run chaos action. + // + // Supported mode: one / all / fixed / fixed-percent / random-max-percent. + Mode TimeChaosSpecMode `field:"required" json:"mode" yaml:"mode"` + // Selector is used to select pods that are used to inject chaos action. + Selector *TimeChaosSpecSelector `field:"required" json:"selector" yaml:"selector"` + // TimeOffset defines the delta time of injected program. + // + // It's a possibly signed sequence of decimal numbers, such as "300ms", "-1.5h" or "2h45m". Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h". + TimeOffset *string `field:"required" json:"timeOffset" yaml:"timeOffset"` + // ClockIds defines all affected clock id All available options are ["CLOCK_REALTIME","CLOCK_MONOTONIC","CLOCK_PROCESS_CPUTIME_ID","CLOCK_THREAD_CPUTIME_ID", "CLOCK_MONOTONIC_RAW","CLOCK_REALTIME_COARSE","CLOCK_MONOTONIC_COARSE","CLOCK_BOOTTIME","CLOCK_REALTIME_ALARM", "CLOCK_BOOTTIME_ALARM"] Default value is ["CLOCK_REALTIME"]. + ClockIds *[]*string `field:"optional" json:"clockIds" yaml:"clockIds"` + // ContainerNames indicates list of the name of affected container. + // + // If not set, all containers will be injected. + ContainerNames *[]*string `field:"optional" json:"containerNames" yaml:"containerNames"` + // Duration represents the duration of the chaos action. + Duration *string `field:"optional" json:"duration" yaml:"duration"` + // Value is required when the mode is set to `FixedPodMode` / `FixedPercentPodMod` / `RandomMaxPercentPodMod`. + // + // If `FixedPodMode`, provide an integer of pods to do chaos action. If `FixedPercentPodMod`, provide a number from 0-100 to specify the percent of pods the server can do chaos action. IF `RandomMaxPercentPodMod`, provide a number from 0-100 to specify the max percent of pods to do chaos action + Value *string `field:"optional" json:"value" yaml:"value"` +} + +// Mode defines the mode to run chaos action. +// +// Supported mode: one / all / fixed / fixed-percent / random-max-percent. +type TimeChaosSpecMode string + +const ( + // one. + TimeChaosSpecMode_ONE TimeChaosSpecMode = "ONE" + // all. + TimeChaosSpecMode_ALL TimeChaosSpecMode = "ALL" + // fixed. + TimeChaosSpecMode_FIXED TimeChaosSpecMode = "FIXED" + // fixed-percent. + TimeChaosSpecMode_FIXED_PERCENT TimeChaosSpecMode = "FIXED_PERCENT" + // random-max-percent. + TimeChaosSpecMode_RANDOM_MAX_PERCENT TimeChaosSpecMode = "RANDOM_MAX_PERCENT" +) + +// Selector is used to select pods that are used to inject chaos action. +type TimeChaosSpecSelector struct { + // Map of string keys and values that can be used to select objects. + // + // A selector based on annotations. + AnnotationSelectors *map[string]*string `field:"optional" json:"annotationSelectors" yaml:"annotationSelectors"` + // a slice of label selector expressions that can be used to select objects. + // + // A list of selectors based on set-based label expressions. + ExpressionSelectors *[]*TimeChaosSpecSelectorExpressionSelectors `field:"optional" json:"expressionSelectors" yaml:"expressionSelectors"` + // Map of string keys and values that can be used to select objects. + // + // A selector based on fields. + FieldSelectors *map[string]*string `field:"optional" json:"fieldSelectors" yaml:"fieldSelectors"` + // Map of string keys and values that can be used to select objects. + // + // A selector based on labels. + LabelSelectors *map[string]*string `field:"optional" json:"labelSelectors" yaml:"labelSelectors"` + // Namespaces is a set of namespace to which objects belong. + Namespaces *[]*string `field:"optional" json:"namespaces" yaml:"namespaces"` + // Nodes is a set of node name and objects must belong to these nodes. + Nodes *[]*string `field:"optional" json:"nodes" yaml:"nodes"` + // Map of string keys and values that can be used to select nodes. + // + // Selector which must match a node's labels, and objects must belong to these selected nodes. + NodeSelectors *map[string]*string `field:"optional" json:"nodeSelectors" yaml:"nodeSelectors"` + // PodPhaseSelectors is a set of condition of a pod at the current time. + // + // supported value: Pending / Running / Succeeded / Failed / Unknown. + PodPhaseSelectors *[]*string `field:"optional" json:"podPhaseSelectors" yaml:"podPhaseSelectors"` + // Pods is a map of string keys and a set values that used to select pods. + // + // The key defines the namespace which pods belong, and the each values is a set of pod names. + Pods *map[string]*[]*string `field:"optional" json:"pods" yaml:"pods"` +} + +// A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. +type TimeChaosSpecSelectorExpressionSelectors struct { + // key is the label key that the selector applies to. + Key *string `field:"required" json:"key" yaml:"key"` + // operator represents a key's relationship to a set of values. + // + // Valid operators are In, NotIn, Exists and DoesNotExist. + Operator *string `field:"required" json:"operator" yaml:"operator"` + // 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. + Values *[]*string `field:"optional" json:"values" yaml:"values"` +} diff --git a/env/imports/k8s/timechaos/chaosmeshorg/chaosmeshorg.init.go b/env/imports/k8s/timechaos/chaosmeshorg/chaosmeshorg.init.go new file mode 100644 index 000000000..fa8f036be --- /dev/null +++ b/env/imports/k8s/timechaos/chaosmeshorg/chaosmeshorg.init.go @@ -0,0 +1,59 @@ +package chaosmeshorg + +import ( + "reflect" + + _jsii_ "github.com/aws/jsii-runtime-go/runtime" +) + +func init() { + _jsii_.RegisterClass( + "chaos-meshorg.TimeChaos", + reflect.TypeOf((*TimeChaos)(nil)).Elem(), + []_jsii_.Member{ + _jsii_.MemberMethod{JsiiMethod: "addDependency", GoMethod: "AddDependency"}, + _jsii_.MemberMethod{JsiiMethod: "addJsonPatch", GoMethod: "AddJsonPatch"}, + _jsii_.MemberProperty{JsiiProperty: "apiGroup", GoGetter: "ApiGroup"}, + _jsii_.MemberProperty{JsiiProperty: "apiVersion", GoGetter: "ApiVersion"}, + _jsii_.MemberProperty{JsiiProperty: "chart", GoGetter: "Chart"}, + _jsii_.MemberProperty{JsiiProperty: "kind", GoGetter: "Kind"}, + _jsii_.MemberProperty{JsiiProperty: "metadata", GoGetter: "Metadata"}, + _jsii_.MemberProperty{JsiiProperty: "name", GoGetter: "Name"}, + _jsii_.MemberProperty{JsiiProperty: "node", GoGetter: "Node"}, + _jsii_.MemberMethod{JsiiMethod: "toJson", GoMethod: "ToJson"}, + _jsii_.MemberMethod{JsiiMethod: "toString", GoMethod: "ToString"}, + }, + func() interface{} { + j := jsiiProxy_TimeChaos{} + _jsii_.InitJsiiProxy(&j.Type__cdk8sApiObject) + return &j + }, + ) + _jsii_.RegisterStruct( + "chaos-meshorg.TimeChaosProps", + reflect.TypeOf((*TimeChaosProps)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "chaos-meshorg.TimeChaosSpec", + reflect.TypeOf((*TimeChaosSpec)(nil)).Elem(), + ) + _jsii_.RegisterEnum( + "chaos-meshorg.TimeChaosSpecMode", + reflect.TypeOf((*TimeChaosSpecMode)(nil)).Elem(), + map[string]interface{}{ + "ONE": TimeChaosSpecMode_ONE, + "ALL": TimeChaosSpecMode_ALL, + "FIXED": TimeChaosSpecMode_FIXED, + "FIXED_PERCENT": TimeChaosSpecMode_FIXED_PERCENT, + "RANDOM_MAX_PERCENT": TimeChaosSpecMode_RANDOM_MAX_PERCENT, + }, + ) + _jsii_.RegisterStruct( + "chaos-meshorg.TimeChaosSpecSelector", + reflect.TypeOf((*TimeChaosSpecSelector)(nil)).Elem(), + ) + _jsii_.RegisterStruct( + "chaos-meshorg.TimeChaosSpecSelectorExpressionSelectors", + reflect.TypeOf((*TimeChaosSpecSelectorExpressionSelectors)(nil)).Elem(), + ) +} diff --git a/env/imports/k8s/timechaos/chaosmeshorg/internal/types.go b/env/imports/k8s/timechaos/chaosmeshorg/internal/types.go new file mode 100644 index 000000000..de3a04f73 --- /dev/null +++ b/env/imports/k8s/timechaos/chaosmeshorg/internal/types.go @@ -0,0 +1,5 @@ +package internal +import ( + "github.com/cdk8s-team/cdk8s-core-go/cdk8s/v2" +) +type Type__cdk8sApiObject = cdk8s.ApiObject diff --git a/env/imports/k8s/timechaos/chaosmeshorg/jsii/chaos-meshorg-0.0.0.tgz b/env/imports/k8s/timechaos/chaosmeshorg/jsii/chaos-meshorg-0.0.0.tgz new file mode 100644 index 000000000..d9194149d Binary files /dev/null and b/env/imports/k8s/timechaos/chaosmeshorg/jsii/chaos-meshorg-0.0.0.tgz differ diff --git a/env/imports/k8s/timechaos/chaosmeshorg/jsii/jsii.go b/env/imports/k8s/timechaos/chaosmeshorg/jsii/jsii.go new file mode 100644 index 000000000..319ef3f24 --- /dev/null +++ b/env/imports/k8s/timechaos/chaosmeshorg/jsii/jsii.go @@ -0,0 +1,28 @@ +// Package jsii contains the functionaility needed for jsii packages to +// initialize their dependencies and themselves. Users should never need to use this package +// directly. If you find you need to - please report a bug at +// https://github.com/aws/jsii/issues/new/choose +package jsii + +import ( + _ "embed" + + _jsii_ "github.com/aws/jsii-runtime-go/runtime" + + constructs "github.com/aws/constructs-go/constructs/v10/jsii" + cdk8s "github.com/cdk8s-team/cdk8s-core-go/cdk8s/v2/jsii" +) + +//go:embed chaos-meshorg-0.0.0.tgz +var tarball []byte + +// Initialize loads the necessary packages in the @jsii/kernel to support the enclosing module. +// The implementation is idempotent (and hence safe to be called over and over). +func Initialize() { + // Ensure all dependencies are initialized + cdk8s.Initialize() + constructs.Initialize() + + // Load this library into the kernel + _jsii_.Load("chaos-meshorg", "0.0.0", tarball) +} diff --git a/env/imports/k8s/timechaos/chaosmeshorg/version b/env/imports/k8s/timechaos/chaosmeshorg/version new file mode 100644 index 000000000..77d6f4ca2 --- /dev/null +++ b/env/imports/k8s/timechaos/chaosmeshorg/version @@ -0,0 +1 @@ +0.0.0 diff --git a/env/imports/k8s/version b/env/imports/k8s/version new file mode 100644 index 000000000..77d6f4ca2 --- /dev/null +++ b/env/imports/k8s/version @@ -0,0 +1 @@ +0.0.0 diff --git a/env/k3d.yaml b/env/k3d.yaml new file mode 100644 index 000000000..4349cc422 --- /dev/null +++ b/env/k3d.yaml @@ -0,0 +1,19 @@ +apiVersion: k3d.io/v1alpha4 +kind: Simple +volumes: + - volume: /tmp/k3dvolume:/tmp/k3dvolume + nodeFilters: + - server:0 + - agent:* +options: + k3d: + wait: true + timeout: "200s" + k3s: + extraArgs: + - arg: --kubelet-arg=eviction-hard=imagefs.available<1%,nodefs.available<1% + nodeFilters: + - server:* + - arg: --kubelet-arg=eviction-minimum-reclaim=imagefs.available=1%,nodefs.available=1% + nodeFilters: + - server:* \ No newline at end of file diff --git a/env/logging/log.go b/env/logging/log.go new file mode 100644 index 000000000..c1b1a0ef1 --- /dev/null +++ b/env/logging/log.go @@ -0,0 +1,40 @@ +package logging + +import ( + "os" + "sync" + "testing" + "time" + + "github.com/rs/zerolog" + "github.com/rs/zerolog/log" + + "github.com/smartcontractkit/chainlink-testing-framework/env/config" +) + +// People often call this multiple times +var loggingMu sync.Mutex + +func getTestLevel() zerolog.Level { + lvlStr := os.Getenv(config.EnvVarLogLevel) + if lvlStr == "" { + lvlStr = "info" + } + lvl, err := zerolog.ParseLevel(lvlStr) + if err != nil { + panic(err) + } + return lvl +} + +func Init() { + loggingMu.Lock() + defer loggingMu.Unlock() + zerolog.TimeFieldFormat = time.RFC3339Nano + log.Logger = log.Output(zerolog.ConsoleWriter{Out: os.Stderr, TimeFormat: "15:04:05.00"}).With().Timestamp().Logger().Level(getTestLevel()) +} + +func GetTestLogger(t *testing.T) zerolog.Logger { + zerolog.TimeFieldFormat = time.RFC3339Nano + return zerolog.New(zerolog.NewTestWriter(t)).Output(zerolog.ConsoleWriter{Out: os.Stderr, TimeFormat: "15:04:05.00"}).With().Timestamp().Logger().Level(getTestLevel()) +} diff --git a/env/pkg/alias/alias.go b/env/pkg/alias/alias.go new file mode 100644 index 000000000..bfa5b033e --- /dev/null +++ b/env/pkg/alias/alias.go @@ -0,0 +1,74 @@ +package alias + +import ( + "fmt" + "strings" + "time" + + jsii "github.com/aws/jsii-runtime-go" + + "github.com/smartcontractkit/chainlink-testing-framework/env/imports/k8s" +) + +func Str(value string) *string { + return jsii.String(value) +} + +func Num(value float64) *float64 { + return jsii.Number(value) +} + +// ShortDur is a helper method for kube-janitor duration format +func ShortDur(d time.Duration) *string { + s := d.String() + if strings.HasSuffix(s, "m0s") { + s = s[:len(s)-2] + } + if strings.HasSuffix(s, "h0m") { + s = s[:len(s)-2] + } + return Str(s) +} + +func ConvertLabels(labels []string) (*map[string]*string, error) { + cdk8sLabels := make(map[string]*string) + for _, s := range labels { + a := strings.Split(s, "=") + if len(a) != 2 { + return nil, fmt.Errorf("invalid label '%s' provided, please provide labels in format key=value", a) + } + cdk8sLabels[a[0]] = Str(a[1]) + } + return &cdk8sLabels, nil +} + +// ConvertAnnotations converts a map[string]string to a *map[string]*string +func ConvertAnnotations(annotations map[string]string) *map[string]*string { + a := make(map[string]*string) + for k, v := range annotations { + a[k] = Str(v) + } + return &a +} + +// EnvVarStr quick shortcut for string/string key/value var +func EnvVarStr(k, v string) *k8s.EnvVar { + return &k8s.EnvVar{ + Name: Str(k), + Value: Str(v), + } +} + +// ContainerResources container resource requirements +func ContainerResources(reqCPU, reqMEM, limCPU, limMEM string) *k8s.ResourceRequirements { + return &k8s.ResourceRequirements{ + Requests: &map[string]k8s.Quantity{ + "cpu": k8s.Quantity_FromString(Str(reqCPU)), + "memory": k8s.Quantity_FromString(Str(reqMEM)), + }, + Limits: &map[string]k8s.Quantity{ + "cpu": k8s.Quantity_FromString(Str(limCPU)), + "memory": k8s.Quantity_FromString(Str(limMEM)), + }, + } +} diff --git a/env/pkg/cdk8s/blockscout/blockscout.go b/env/pkg/cdk8s/blockscout/blockscout.go new file mode 100644 index 000000000..b2fb16815 --- /dev/null +++ b/env/pkg/cdk8s/blockscout/blockscout.go @@ -0,0 +1,231 @@ +package blockscout + +import ( + "fmt" + "os" + + "github.com/cdk8s-team/cdk8s-core-go/cdk8s/v2" + "github.com/rs/zerolog/log" + + "github.com/smartcontractkit/chainlink-testing-framework/env/client" + "github.com/smartcontractkit/chainlink-testing-framework/env/config" + "github.com/smartcontractkit/chainlink-testing-framework/env/environment" + "github.com/smartcontractkit/chainlink-testing-framework/env/imports/k8s" + "github.com/smartcontractkit/chainlink-testing-framework/env/pkg" + a "github.com/smartcontractkit/chainlink-testing-framework/env/pkg/alias" +) + +const ( + URLsKey = "blockscout" +) + +type Chart struct { + Props *Props +} + +func (m Chart) IsDeploymentNeeded() bool { + return true +} + +func (m Chart) GetName() string { + if m.Props == nil || m.Props.Name == "" { + return "blockscout" + } + return m.Props.Name +} + +func (m Chart) GetProps() interface{} { + return m.Props +} + +func (m Chart) GetPath() string { + return "" +} + +func (m Chart) GetVersion() string { + return "" +} + +func (m Chart) GetValues() *map[string]interface{} { + return nil +} + +func (m Chart) ExportData(e *environment.Environment) error { + bsURL, err := e.Fwd.FindPort( + fmt.Sprintf("%s:0", m.GetName()), + fmt.Sprintf("%s-node", m.GetName()), "explorer"). + As(client.LocalConnection, client.HTTP) + if err != nil { + return err + } + log.Info().Str("URL", bsURL).Msg("Blockscout explorer") + e.URLs[URLsKey] = []string{bsURL} + return nil +} + +func New(props *Props) func(root cdk8s.Chart) environment.ConnectedChart { + return func(root cdk8s.Chart) environment.ConnectedChart { + dp := defaultProps() + config.MustMerge(dp, props) + c := &Chart{ + Props: dp, + } + vars := vars{ + Labels: &map[string]*string{ + "app": a.Str(c.GetName()), + }, + ConfigMapName: fmt.Sprintf("%s-cm", c.GetName()), + BaseName: c.GetName(), + Port: 4000, + Props: dp, + } + service(root, vars) + deployment(root, vars) + return c + } +} + +type Props struct { + Name string + HttpURL string `envconfig:"http_url"` + WsURL string `envconfig:"ws_url"` +} + +func defaultProps() *Props { + return &Props{ + HttpURL: "http://geth:8544", + WsURL: "ws://geth:8546", + } +} + +// vars some shared labels/selectors and names that must match in resources +type vars struct { + Labels *map[string]*string + BaseName string + ConfigMapName string + Port float64 + Props *Props +} + +func service(chart cdk8s.Chart, vars vars) { + k8s.NewKubeService(chart, a.Str(fmt.Sprintf("%s-service", vars.BaseName)), &k8s.KubeServiceProps{ + Metadata: &k8s.ObjectMeta{ + Name: a.Str(vars.BaseName), + }, + Spec: &k8s.ServiceSpec{ + Ports: &[]*k8s.ServicePort{ + { + Name: a.Str("explorer"), + Port: a.Num(vars.Port), + TargetPort: k8s.IntOrString_FromNumber(a.Num(4000)), + }, + }, + Selector: vars.Labels, + }, + }) +} + +func postgresContainer(p vars) *k8s.Container { + internalRepo := os.Getenv(config.EnvVarInternalDockerRepo) + postgresRepo := "postgres" + if internalRepo != "" { + postgresRepo = fmt.Sprintf("%s/postgres", internalRepo) + } + return &k8s.Container{ + Name: a.Str(fmt.Sprintf("%s-db", p.BaseName)), + Image: a.Str(fmt.Sprintf("%s:13.6", postgresRepo)), + Ports: &[]*k8s.ContainerPort{ + { + Name: a.Str("postgres"), + ContainerPort: a.Num(5432), + }, + }, + Env: &[]*k8s.EnvVar{ + a.EnvVarStr("POSTGRES_PASSWORD", "postgres"), + a.EnvVarStr("POSTGRES_DB", "blockscout"), + }, + LivenessProbe: &k8s.Probe{ + Exec: &k8s.ExecAction{ + Command: pkg.PGIsReadyCheck()}, + InitialDelaySeconds: a.Num(60), + PeriodSeconds: a.Num(60), + }, + ReadinessProbe: &k8s.Probe{ + Exec: &k8s.ExecAction{ + Command: pkg.PGIsReadyCheck()}, + InitialDelaySeconds: a.Num(2), + PeriodSeconds: a.Num(2), + }, + Resources: a.ContainerResources("1000m", "2048Mi", "1000m", "2048Mi"), + } +} + +func deployment(chart cdk8s.Chart, vars vars) { + k8s.NewKubeDeployment( + chart, + a.Str(fmt.Sprintf("%s-deployment", vars.BaseName)), + &k8s.KubeDeploymentProps{ + Metadata: &k8s.ObjectMeta{ + Name: a.Str(vars.BaseName), + }, + Spec: &k8s.DeploymentSpec{ + Selector: &k8s.LabelSelector{ + MatchLabels: vars.Labels, + }, + Template: &k8s.PodTemplateSpec{ + Metadata: &k8s.ObjectMeta{ + Labels: vars.Labels, + }, + Spec: &k8s.PodSpec{ + ServiceAccountName: a.Str("default"), + Containers: &[]*k8s.Container{ + container(vars), + postgresContainer(vars), + }, + }, + }, + }, + }) +} + +func container(vars vars) *k8s.Container { + internalRepo := os.Getenv(config.EnvVarInternalDockerRepo) + blockscoutRepo := "f4hrenh9it/blockscout" + if internalRepo != "" { + blockscoutRepo = fmt.Sprintf("%s/blockscout", internalRepo) + } + return &k8s.Container{ + Name: a.Str(fmt.Sprintf("%s-node", vars.BaseName)), + Image: a.Str(fmt.Sprintf("%s:v1", blockscoutRepo)), + ImagePullPolicy: a.Str("Always"), + Command: &[]*string{a.Str(`/bin/bash`)}, + Args: &[]*string{ + a.Str("-c"), + a.Str("mix ecto.create && mix ecto.migrate && mix phx.server"), + }, + Ports: &[]*k8s.ContainerPort{ + { + Name: a.Str("explorer"), + ContainerPort: a.Num(vars.Port), + }, + }, + ReadinessProbe: &k8s.Probe{ + HttpGet: &k8s.HttpGetAction{ + Port: k8s.IntOrString_FromNumber(a.Num(vars.Port)), + Path: a.Str("/"), + }, + InitialDelaySeconds: a.Num(20), + PeriodSeconds: a.Num(5), + }, + Env: &[]*k8s.EnvVar{ + a.EnvVarStr("MIX_ENV", "prod"), + a.EnvVarStr("ECTO_USE_SSL", "'false'"), + a.EnvVarStr("COIN", "DAI"), + a.EnvVarStr("ETHEREUM_JSONRPC_VARIANT", "geth"), + a.EnvVarStr("ETHEREUM_JSONRPC_HTTP_URL", vars.Props.HttpURL), + a.EnvVarStr("ETHEREUM_JSONRPC_WS_URL", vars.Props.WsURL), + a.EnvVarStr("DATABASE_URL", "postgresql://postgres:@localhost:5432/blockscout?ssl=false"), + }, + Resources: a.ContainerResources("2000m", "2048Mi", "2000m", "2048Mi"), + } +} diff --git a/env/pkg/cdk8s/goc/goc.go b/env/pkg/cdk8s/goc/goc.go new file mode 100644 index 000000000..8889eae47 --- /dev/null +++ b/env/pkg/cdk8s/goc/goc.go @@ -0,0 +1,142 @@ +package goc + +import ( + "fmt" + + "github.com/cdk8s-team/cdk8s-core-go/cdk8s/v2" + + "github.com/smartcontractkit/chainlink-testing-framework/env/environment" + "github.com/smartcontractkit/chainlink-testing-framework/env/imports/k8s" + a "github.com/smartcontractkit/chainlink-testing-framework/env/pkg/alias" +) + +type Chart struct { + Props *Props +} + +func (m *Chart) IsDeploymentNeeded() bool { + return true +} + +func (m Chart) GetName() string { + return "dummy" +} + +func (m Chart) GetProps() interface{} { + return m.Props +} + +func (m Chart) GetPath() string { + return "" +} + +func (m Chart) GetVersion() string { + return "" +} + +func (m Chart) GetValues() *map[string]interface{} { + return nil +} + +func (m Chart) ExportData(e *environment.Environment) error { + return nil +} + +func New() func(root cdk8s.Chart) environment.ConnectedChart { + return func(root cdk8s.Chart) environment.ConnectedChart { + c := &Chart{} + vars := vars{ + Labels: &map[string]*string{ + "app": a.Str(c.GetName()), + }, + ConfigMapName: fmt.Sprintf("%s-cm", c.GetName()), + BaseName: c.GetName(), + Port: 3000, + } + service(root, vars) + deployment(root, vars) + return c + } +} + +type Props struct { + Name string +} + +// vars some shared labels/selectors and names that must match in resources +type vars struct { + Labels *map[string]*string + BaseName string + ConfigMapName string + Port float64 + Props *Props +} + +func service(chart cdk8s.Chart, vars vars) { + k8s.NewKubeService(chart, a.Str(fmt.Sprintf("%s-service", vars.BaseName)), &k8s.KubeServiceProps{ + Metadata: &k8s.ObjectMeta{ + Name: a.Str(vars.BaseName), + }, + Spec: &k8s.ServiceSpec{ + Ports: &[]*k8s.ServicePort{ + { + Name: a.Str("http"), + Port: a.Num(vars.Port), + TargetPort: k8s.IntOrString_FromNumber(a.Num(3000)), + }, + }, + Selector: vars.Labels, + }, + }) +} + +func deployment(chart cdk8s.Chart, vars vars) { + k8s.NewKubeDeployment( + chart, + a.Str(fmt.Sprintf("%s-deployment", vars.BaseName)), + &k8s.KubeDeploymentProps{ + Metadata: &k8s.ObjectMeta{ + Name: a.Str(vars.BaseName), + }, + Spec: &k8s.DeploymentSpec{ + Selector: &k8s.LabelSelector{ + MatchLabels: vars.Labels, + }, + Template: &k8s.PodTemplateSpec{ + Metadata: &k8s.ObjectMeta{ + Labels: vars.Labels, + }, + Spec: &k8s.PodSpec{ + ServiceAccountName: a.Str("default"), + Containers: &[]*k8s.Container{ + container(vars), + }, + }, + }, + }, + }) +} + +func container(vars vars) *k8s.Container { + return &k8s.Container{ + Name: a.Str(vars.BaseName), + Image: a.Str("public.ecr.aws/chainlink/goc-target:latest"), + ImagePullPolicy: a.Str("Always"), + Ports: &[]*k8s.ContainerPort{ + { + Name: a.Str("http"), + ContainerPort: a.Num(vars.Port), + }, + }, + ReadinessProbe: &k8s.Probe{ + HttpGet: &k8s.HttpGetAction{ + Port: k8s.IntOrString_FromNumber(a.Num(vars.Port)), + Path: a.Str("/"), + }, + InitialDelaySeconds: a.Num(20), + PeriodSeconds: a.Num(5), + }, + Env: &[]*k8s.EnvVar{}, + Resources: a.ContainerResources("100m", "512Mi", "100m", "512Mi"), + } +} diff --git a/env/pkg/cdk8s/http_dummy/dummy.go b/env/pkg/cdk8s/http_dummy/dummy.go new file mode 100644 index 000000000..d9cd01447 --- /dev/null +++ b/env/pkg/cdk8s/http_dummy/dummy.go @@ -0,0 +1,157 @@ +package dummy + +import ( + "fmt" + + "github.com/cdk8s-team/cdk8s-core-go/cdk8s/v2" + "github.com/rs/zerolog/log" + + "github.com/smartcontractkit/chainlink-testing-framework/env/client" + "github.com/smartcontractkit/chainlink-testing-framework/env/environment" + "github.com/smartcontractkit/chainlink-testing-framework/env/imports/k8s" + a "github.com/smartcontractkit/chainlink-testing-framework/env/pkg/alias" +) + +const ( + URLsKey = "goc" +) + +type Chart struct { + Props *Props +} + +func (m *Chart) IsDeploymentNeeded() bool { + return true +} + +func (m Chart) GetName() string { + return "goc" +} + +func (m Chart) GetProps() interface{} { + return m.Props +} + +func (m Chart) GetPath() string { + return "" +} + +func (m Chart) GetVersion() string { + return "" +} + +func (m Chart) GetValues() *map[string]interface{} { + return nil +} + +func (m Chart) ExportData(e *environment.Environment) error { + url, err := e.Fwd.FindPort( + fmt.Sprintf("%s:0", m.GetName()), + m.GetName(), "http"). + As(client.LocalConnection, client.HTTP) + if err != nil { + return err + } + log.Info().Str("URL", url).Msg("goc coverage service") + e.URLs[URLsKey] = []string{url} + return nil +} + +func New() func(root cdk8s.Chart) environment.ConnectedChart { + return func(root cdk8s.Chart) environment.ConnectedChart { + c := &Chart{} + vars := vars{ + Labels: &map[string]*string{ + "app": a.Str(c.GetName()), + }, + ConfigMapName: fmt.Sprintf("%s-cm", c.GetName()), + BaseName: c.GetName(), + Port: 7777, + } + service(root, vars) + deployment(root, vars) + return c + } +} + +type Props struct { + Name string +} + +// vars some shared labels/selectors and names that must match in resources +type vars struct { + Labels *map[string]*string + BaseName string + ConfigMapName string + Port float64 + Props *Props +} + +func service(chart cdk8s.Chart, vars vars) { + k8s.NewKubeService(chart, a.Str(fmt.Sprintf("%s-service", vars.BaseName)), &k8s.KubeServiceProps{ + Metadata: &k8s.ObjectMeta{ + Name: a.Str(vars.BaseName), + }, + Spec: &k8s.ServiceSpec{ + Ports: &[]*k8s.ServicePort{ + { + Name: a.Str("http"), + Port: a.Num(vars.Port), + TargetPort: k8s.IntOrString_FromNumber(a.Num(7777)), + }, + }, + Selector: vars.Labels, + }, + }) +} + +func deployment(chart cdk8s.Chart, vars vars) { + k8s.NewKubeDeployment( + chart, + a.Str(fmt.Sprintf("%s-deployment", vars.BaseName)), + &k8s.KubeDeploymentProps{ + Metadata: &k8s.ObjectMeta{ + Name: a.Str(vars.BaseName), + }, + Spec: &k8s.DeploymentSpec{ + Selector: &k8s.LabelSelector{ + MatchLabels: vars.Labels, + }, + Template: &k8s.PodTemplateSpec{ + Metadata: &k8s.ObjectMeta{ + Labels: vars.Labels, + }, + Spec: &k8s.PodSpec{ + ServiceAccountName: a.Str("default"), + Containers: &[]*k8s.Container{ + container(vars), + }, + }, + }, + }, + }) +} + +func container(vars vars) *k8s.Container { + return &k8s.Container{ + Name: a.Str(vars.BaseName), + Image: a.Str("public.ecr.aws/chainlink/goc:latest"), + ImagePullPolicy: a.Str("Always"), + Ports: &[]*k8s.ContainerPort{ + { + Name: a.Str("http"), + ContainerPort: a.Num(vars.Port), + }, + }, + ReadinessProbe: &k8s.Probe{ + HttpGet: &k8s.HttpGetAction{ + Port: k8s.IntOrString_FromNumber(a.Num(vars.Port)), + Path: a.Str("/v1/cover/list"), + }, + InitialDelaySeconds: a.Num(20), + PeriodSeconds: a.Num(5), + }, + Env: &[]*k8s.EnvVar{}, + Resources: a.ContainerResources("200m", "512Mi", "200m", "512Mi"), + } +} diff --git a/env/pkg/common.go b/env/pkg/common.go new file mode 100644 index 000000000..e8068ce4d --- /dev/null +++ b/env/pkg/common.go @@ -0,0 +1,23 @@ +package pkg + +import a "github.com/smartcontractkit/chainlink-testing-framework/env/pkg/alias" + +// Common labels for k8s envs +const ( + TTLLabelKey = "janitor/ttl" + NamespaceLabelKey = "namespace" +) + +// Environment types, envs got selected by having a label of that type +const ( + EnvTypeEVM5 = "evm-5-minimal" + EnvTypeEVM5RemoteRunner = "evm-5-remote-runner" +) + +func PGIsReadyCheck() *[]*string { + return &[]*string{ + a.Str("pg_isready"), + a.Str("-U"), + a.Str("postgres"), + } +} diff --git a/env/pkg/helm/chainlink/chainlink.go b/env/pkg/helm/chainlink/chainlink.go new file mode 100644 index 000000000..2358b9ee5 --- /dev/null +++ b/env/pkg/helm/chainlink/chainlink.go @@ -0,0 +1,204 @@ +package chainlink + +import ( + "fmt" + "os" + + "github.com/rs/zerolog/log" + + "github.com/smartcontractkit/chainlink-testing-framework/env/client" + "github.com/smartcontractkit/chainlink-testing-framework/env/config" + "github.com/smartcontractkit/chainlink-testing-framework/env/environment" +) + +const ( + AppName = "chainlink" + NodesLocalURLsKey = "chainlink_local" + NodesInternalURLsKey = "chainlink_internal" + DBsLocalURLsKey = "chainlink_db" +) + +type Props struct { + HasReplicas bool +} + +type Chart struct { + Name string + Index int + Path string + Version string + Props *Props + Values *map[string]any +} + +func (m Chart) IsDeploymentNeeded() bool { + return true +} + +func (m Chart) GetName() string { + return m.Name +} + +func (m Chart) GetPath() string { + return m.Path +} + +func (m Chart) GetVersion() string { + return m.Version +} + +func (m Chart) GetProps() any { + return m.Props +} + +func (m Chart) GetValues() *map[string]any { + return m.Values +} + +func (m Chart) ExportData(e *environment.Environment) error { + // fetching all apps with label app=chainlink-${deploymentIndex}:${instanceIndex} + pods, err := e.Fwd.Client.ListPods(e.Cfg.Namespace, fmt.Sprintf("app=%s", m.Name)) + if err != nil { + return err + } + for i := 0; i < len(pods.Items); i++ { + chainlinkNode := fmt.Sprintf("%s:node-%d", m.Name, i+1) + pgNode := fmt.Sprintf("%s-postgres:node-%d", m.Name, i+1) + internalConnection, err := e.Fwd.FindPort(chainlinkNode, "node", "access").As(client.RemoteConnection, client.HTTP) + if err != nil { + return err + } + if !m.Props.HasReplicas { + services, err := e.Client.ListServices(e.Cfg.Namespace, fmt.Sprintf("app=%s", m.Name)) + if err != nil { + return err + } + if services != nil && len(services.Items) > 0 { + internalConnection = fmt.Sprintf("http://%s:6688", services.Items[0].Name) + } + } + + var localConnection string + if e.Cfg.InsideK8s { + localConnection = internalConnection + } else { + localConnection, err = e.Fwd.FindPort(chainlinkNode, "node", "access").As(client.LocalConnection, client.HTTP) + if err != nil { + return err + } + } + e.URLs[NodesInternalURLsKey] = append(e.URLs[NodesInternalURLsKey], internalConnection) + e.URLs[NodesLocalURLsKey] = append(e.URLs[NodesLocalURLsKey], localConnection) + + dbLocalConnection, err := e.Fwd.FindPort(pgNode, "chainlink-db", "postgres"). + As(client.LocalConnection, client.HTTP) + if err != nil { + return err + } + e.URLs[DBsLocalURLsKey] = append(e.URLs[DBsLocalURLsKey], dbLocalConnection) + log.Debug(). + Str("Chart Name", m.Name). + Str("Local IP", localConnection). + Str("Local DB IP", dbLocalConnection). + Str("K8s Internal Connection", internalConnection). + Msg("Chainlink Node Details") + + nodeDetails := &environment.ChainlinkNodeDetail{ + ChartName: m.Name, + PodName: pods.Items[i].Name, + LocalIP: localConnection, + InternalIP: internalConnection, + DBLocalIP: dbLocalConnection, + } + e.ChainlinkNodeDetails = append(e.ChainlinkNodeDetails, nodeDetails) + } + return nil +} + +func defaultProps() map[string]any { + internalRepo := os.Getenv(config.EnvVarInternalDockerRepo) + chainlinkImage := "public.ecr.aws/chainlink/chainlink" + postgresImage := "postgres" + if internalRepo != "" { + chainlinkImage = fmt.Sprintf("%s/chainlink", internalRepo) + postgresImage = fmt.Sprintf("%s/postgres", internalRepo) + } + env := make(map[string]string) + pyroscopeAuth := os.Getenv(config.EnvVarPyroscopeKey) + if pyroscopeAuth != "" { + env["CL_PYROSCOPE_AUTH_TOKEN"] = pyroscopeAuth + } + return map[string]any{ + "replicas": "1", + "env": env, + "chainlink": map[string]any{ + "image": map[string]any{ + "image": chainlinkImage, + "version": "develop", + }, + "web_port": "6688", + "p2p_port": "6690", + "resources": map[string]any{ + "requests": map[string]any{ + "cpu": "350m", + "memory": "1024Mi", + }, + "limits": map[string]any{ + "cpu": "350m", + "memory": "1024Mi", + }, + }, + }, + "db": map[string]any{ + "image": map[string]any{ + "image": postgresImage, + "version": "11.15", + }, + "stateful": false, + "capacity": "1Gi", + "resources": map[string]any{ + "requests": map[string]any{ + "cpu": "250m", + "memory": "256Mi", + }, + "limits": map[string]any{ + "cpu": "250m", + "memory": "256Mi", + }, + }, + }, + } +} + +func New(index int, props map[string]any) environment.ConnectedChart { + return NewVersioned(index, "", props) +} + +// NewVersioned enables you to select a specific helm chart version +func NewVersioned(index int, helmVersion string, props map[string]any) environment.ConnectedChart { + dp := defaultProps() + config.MustEnvOverrideVersion(&dp) + config.MustMerge(&dp, props) + p := &Props{ + HasReplicas: false, + } + if props["replicas"] != nil && props["replicas"] != "1" { + p.HasReplicas = true + replicas := props["replicas"].(int) + var nodesMap []map[string]any + for i := 0; i < replicas; i++ { + nodesMap = append(nodesMap, map[string]any{ + "name": fmt.Sprintf("node-%d", i+1), + }) + } + dp["nodes"] = nodesMap + } + return Chart{ + Index: index, + Name: fmt.Sprintf("%s-%d", AppName, index), + Path: "chainlink-qa/chainlink", + Version: helmVersion, + Values: &dp, + Props: p, + } +} diff --git a/env/pkg/helm/ethereum/geth.go b/env/pkg/helm/ethereum/geth.go new file mode 100644 index 000000000..5ec398df1 --- /dev/null +++ b/env/pkg/helm/ethereum/geth.go @@ -0,0 +1,160 @@ +package ethereum + +import ( + "fmt" + "os" + + "github.com/rs/zerolog/log" + + "github.com/smartcontractkit/chainlink-testing-framework/env/client" + "github.com/smartcontractkit/chainlink-testing-framework/env/config" + "github.com/smartcontractkit/chainlink-testing-framework/env/environment" +) + +type Props struct { + NetworkName string `envconfig:"network_name"` + Simulated bool `envconfig:"network_simulated"` + HttpURLs []string `envconfig:"http_url"` + WsURLs []string `envconfig:"ws_url"` + Values map[string]interface{} +} + +type HelmProps struct { + Name string + Path string + Version string + Values *map[string]interface{} +} + +type Chart struct { + HelmProps *HelmProps + Props *Props +} + +func (m Chart) IsDeploymentNeeded() bool { + return m.Props.Simulated +} + +func (m Chart) GetProps() interface{} { + return m.Props +} + +func (m Chart) GetName() string { + return m.HelmProps.Name +} + +func (m Chart) GetPath() string { + return m.HelmProps.Path +} + +func (m Chart) GetVersion() string { + return m.HelmProps.Version +} + +func (m Chart) GetValues() *map[string]interface{} { + return m.HelmProps.Values +} + +func (m Chart) ExportData(e *environment.Environment) error { + if m.Props.Simulated { + gethLocalHttp, err := e.Fwd.FindPort("geth:0", "geth-network", "http-rpc").As(client.LocalConnection, client.HTTP) + if err != nil { + return err + } + gethInternalHttp, err := e.Fwd.FindPort("geth:0", "geth-network", "http-rpc").As(client.RemoteConnection, client.HTTP) + if err != nil { + return err + } + gethLocalWs, err := e.Fwd.FindPort("geth:0", "geth-network", "ws-rpc").As(client.LocalConnection, client.WS) + if err != nil { + return err + } + gethInternalWs, err := e.Fwd.FindPort("geth:0", "geth-network", "ws-rpc").As(client.RemoteConnection, client.WS) + if err != nil { + return err + } + if e.Cfg.InsideK8s { + services, err := e.Client.ListServices(e.Cfg.Namespace, fmt.Sprintf("app=%s", m.HelmProps.Name)) + if err != nil { + return err + } + e.URLs[m.Props.NetworkName] = []string{fmt.Sprintf("ws://%s:8546", services.Items[0].Name)} + e.URLs[m.Props.NetworkName+"_http"] = []string{fmt.Sprintf("http://%s:8544", services.Items[0].Name)} + } else { + e.URLs[m.Props.NetworkName] = []string{gethLocalWs} + e.URLs[m.Props.NetworkName+"_http"] = []string{gethLocalHttp} + } + + // For cases like starknet we need the internalHttp address to set up the L1<>L2 interaction + e.URLs[m.Props.NetworkName+"_internal"] = []string{gethInternalWs} + e.URLs[m.Props.NetworkName+"_internal_http"] = []string{gethInternalHttp} + + log.Info().Str("Name", "Geth").Str("URLs", gethLocalWs).Msg("Geth network") + } else { + e.URLs[m.Props.NetworkName] = m.Props.WsURLs + log.Info().Str("Name", m.Props.NetworkName).Strs("URLs", m.Props.WsURLs).Msg("Ethereum network") + } + return nil +} + +func defaultProps() *Props { + internalRepo := os.Getenv(config.EnvVarInternalDockerRepo) + gethImage := "ethereum/client-go" + if internalRepo != "" { + gethImage = fmt.Sprintf("%s/ethereum/client-go", internalRepo) + } + return &Props{ + NetworkName: "Simulated Geth", + Simulated: true, + Values: map[string]interface{}{ + "replicas": "1", + "geth": map[string]interface{}{ + "image": map[string]interface{}{ + "image": gethImage, + "version": "v1.10.25", + }, + }, + "resources": map[string]interface{}{ + "requests": map[string]interface{}{ + "cpu": "1000m", + "memory": "768Mi", + }, + "limits": map[string]interface{}{ + "cpu": "1000m", + "memory": "768Mi", + }, + }, + }, + } +} + +func New(props *Props) environment.ConnectedChart { + return NewVersioned("", props) +} + +// NewVersioned enables choosing a specific helm chart version +func NewVersioned(helmVersion string, props *Props) environment.ConnectedChart { + targetProps := defaultProps() + if props == nil { + props = targetProps + } + config.MustMerge(targetProps, props) + config.MustMerge(&targetProps.Values, props.Values) + targetProps.Simulated = props.Simulated // Mergo has issues with boolean merging for simulated networks + if targetProps.Simulated { + return Chart{ + HelmProps: &HelmProps{ + Name: "geth", + Path: "chainlink-qa/geth", + Values: &targetProps.Values, + }, + Props: targetProps, + } + } + return Chart{ + Props: targetProps, + HelmProps: &HelmProps{ + Version: helmVersion, + }, + } +} diff --git a/env/pkg/helm/grafana/grafana.go b/env/pkg/helm/grafana/grafana.go new file mode 100644 index 000000000..e4426c75b --- /dev/null +++ b/env/pkg/helm/grafana/grafana.go @@ -0,0 +1,82 @@ +package grafana + +import ( + "github.com/smartcontractkit/chainlink-testing-framework/env/config" + "github.com/smartcontractkit/chainlink-testing-framework/env/environment" +) + +type Props struct { +} + +type Chart struct { + Name string + Path string + Version string + Props *Props + Values *map[string]interface{} +} + +func (m Chart) IsDeploymentNeeded() bool { + return true +} + +func (m Chart) GetName() string { + return m.Name +} + +func (m Chart) GetPath() string { + return m.Path +} + +func (m Chart) GetVersion() string { + return m.Version +} + +func (m Chart) GetProps() interface{} { + return m.Props +} + +func (m Chart) GetValues() *map[string]interface{} { + return m.Values +} + +func (m Chart) ExportData(e *environment.Environment) error { + return nil +} + +func defaultProps() map[string]interface{} { + return map[string]interface{}{ + "resources": map[string]interface{}{ + "limits": map[string]interface{}{ + "memory": "1000Mi", + "cpu": "1.5", + }, + "requests": map[string]interface{}{ + "memory": "500Mi", + "cpu": "1.0", + }, + }, + "rbac": map[string]interface{}{ + "create": "false", + }, + "testFramework": map[string]interface{}{ + "enabled": false, + }, + } +} + +func New(props map[string]interface{}) environment.ConnectedChart { + return NewVersioned("", props) +} + +// NewVersioned enables choosing a specific helm chart version +func NewVersioned(helmVersion string, props map[string]interface{}) environment.ConnectedChart { + dp := defaultProps() + config.MustMerge(&dp, props) + return Chart{ + Name: "grafana", + Path: "grafana/grafana", + Values: &dp, + Version: helmVersion, + } +} diff --git a/env/pkg/helm/influxdb/influxdb.go b/env/pkg/helm/influxdb/influxdb.go new file mode 100644 index 000000000..a7cf8fabc --- /dev/null +++ b/env/pkg/helm/influxdb/influxdb.go @@ -0,0 +1,93 @@ +package influxdb + +import ( + "github.com/smartcontractkit/chainlink-testing-framework/env/config" + "github.com/smartcontractkit/chainlink-testing-framework/env/environment" +) + +type Props struct { +} + +type Chart struct { + Name string + Path string + Version string + Props *Props + Values *map[string]interface{} +} + +func (m Chart) IsDeploymentNeeded() bool { + return true +} + +func (m Chart) GetName() string { + return m.Name +} + +func (m Chart) GetPath() string { + return m.Path +} + +func (m Chart) GetVersion() string { + return m.Version +} + +func (m Chart) GetProps() interface{} { + return m.Props +} + +func (m Chart) GetValues() *map[string]interface{} { + return m.Values +} + +func (m Chart) ExportData(e *environment.Environment) error { + return nil +} + +func defaultProps() map[string]interface{} { + return map[string]interface{}{ + "auth": map[string]interface{}{ + "enabled": "false", + }, + "image": map[string]interface{}{ + "tag": "1.7.10", + }, + "influxdb": map[string]interface{}{ + "readinessProbe": map[string]interface{}{ + "enabled": false, + }, + "livenessProbe": map[string]interface{}{ + "enabled": false, + }, + "startupProbe": map[string]interface{}{ + "enabled": false, + }, + "resources": map[string]interface{}{ + "limits": map[string]interface{}{ + "memory": "19000Mi", + "cpu": "6", + }, + "requests": map[string]interface{}{ + "memory": "16000Mi", + "cpu": "5", + }, + }, + }, + } +} + +func New(props map[string]interface{}) environment.ConnectedChart { + return NewVersioned("", props) +} + +// NewVersioned enables choosing a specific helm chart version +func NewVersioned(helmVersion string, props map[string]interface{}) environment.ConnectedChart { + dp := defaultProps() + config.MustMerge(&dp, props) + return Chart{ + Name: "influxdb", + Path: "bitnami/influxdb", + Values: &dp, + Version: helmVersion, + } +} diff --git a/env/pkg/helm/kafka-rest/kafka-rest.go b/env/pkg/helm/kafka-rest/kafka-rest.go new file mode 100644 index 000000000..c02de9072 --- /dev/null +++ b/env/pkg/helm/kafka-rest/kafka-rest.go @@ -0,0 +1,85 @@ +package kafka_rest + +import ( + "github.com/rs/zerolog/log" + + "github.com/smartcontractkit/chainlink-testing-framework/env/client" + "github.com/smartcontractkit/chainlink-testing-framework/env/config" + "github.com/smartcontractkit/chainlink-testing-framework/env/environment" +) + +type Props struct { +} + +type Chart struct { + Name string + Path string + Version string + Props *Props + Values *map[string]interface{} +} + +func (m Chart) IsDeploymentNeeded() bool { + return true +} + +func (m Chart) GetName() string { + return m.Name +} + +func (m Chart) GetPath() string { + return m.Path +} + +func (m Chart) GetVersion() string { + return m.Version +} + +func (m Chart) GetProps() interface{} { + return m.Props +} + +func (m Chart) GetValues() *map[string]interface{} { + return m.Values +} + +func (m Chart) ExportData(e *environment.Environment) error { + urls := make([]string, 0) + local, err := e.Fwd.FindPort("cp-kafka-rest:0", "kafka-rest", "http").As(client.LocalConnection, client.HTTP) + if err != nil { + return err + } + remote, err := e.Fwd.FindPort("cp-kafka-rest:0", "kafka-rest", "http").As(client.RemoteConnection, client.HTTP) + if err != nil { + return err + } + if e.Cfg.InsideK8s { + urls = append(urls, remote, remote) + } else { + urls = append(urls, local, remote) + } + e.URLs["cp-kafka-rest"] = urls + log.Info().Str("URL", local).Msg("KafkaRest local connection") + log.Info().Str("URL", remote).Msg("KafkaRest remote connection") + return nil +} + +func defaultProps() map[string]interface{} { + return map[string]interface{}{} +} + +func New(props map[string]interface{}) environment.ConnectedChart { + return NewVersioned("", props) +} + +// NewVersioned enables choosing a specific helm chart version +func NewVersioned(helmVersion string, props map[string]interface{}) environment.ConnectedChart { + dp := defaultProps() + config.MustMerge(&dp, props) + return Chart{ + Name: "cp-kafka-rest", + Path: "chainlink-qa/kafka-rest", + Values: &dp, + Version: helmVersion, + } +} diff --git a/env/pkg/helm/kafka/kafka.go b/env/pkg/helm/kafka/kafka.go new file mode 100644 index 000000000..6df8d3651 --- /dev/null +++ b/env/pkg/helm/kafka/kafka.go @@ -0,0 +1,126 @@ +package kafka + +import ( + "github.com/smartcontractkit/chainlink-testing-framework/env/config" + "github.com/smartcontractkit/chainlink-testing-framework/env/environment" +) + +type Props struct { +} + +type Chart struct { + Name string + Path string + Version string + Props *Props + Values *map[string]interface{} +} + +func (m Chart) IsDeploymentNeeded() bool { + return true +} + +func (m Chart) GetName() string { + return m.Name +} + +func (m Chart) GetPath() string { + return m.Path +} + +func (m Chart) GetVersion() string { + return m.Version +} + +func (m Chart) GetProps() interface{} { + return m.Props +} + +func (m Chart) GetValues() *map[string]interface{} { + return m.Values +} + +func (m Chart) ExportData(e *environment.Environment) error { + return nil +} + +func defaultProps() map[string]interface{} { + return map[string]interface{}{ + "auth": map[string]interface{}{ + "clientProtocol": "plaintext", + "interBrokerProtocol": "plaintext", + }, + "image": map[string]interface{}{ + "debug": true, + }, + "provisioning": map[string]interface{}{ + "enabled": true, + "resources": map[string]interface{}{ + "limits": map[string]interface{}{ + "cpu": "0.1", + "memory": "500M", + }, + }, + }, + "zookeeper": map[string]interface{}{ + "persistence": map[string]interface{}{ + "enabled": true, + }, + }, + "podSecurityContext": map[string]interface{}{ + "enabled": false, + }, + "containerSecurityContext": map[string]interface{}{ + "enabled": false, + }, + "persistence": map[string]interface{}{ + "enabled": false, + }, + "livenessProbe": map[string]interface{}{ + "enabled": true, + "initialDelaySeconds": 10, + "timeoutSeconds": 5, + "failureThreshold": 3, + "periodSeconds": 10, + "successThreshold": 1, + }, + "readinessProbe": map[string]interface{}{ + "enabled": true, + "initialDelaySeconds": 5, + "failureThreshold": 6, + "timeoutSeconds": 5, + "periodSeconds": 10, + "successThreshold": 1, + }, + "startupProbe": map[string]interface{}{ + "enabled": true, + "initialDelaySeconds": 30, + "periodSeconds": 10, + "timeoutSeconds": 1, + "failureThreshold": 15, + "successThreshold": 1, + }, + "commonLabels": map[string]interface{}{ + "app": "kafka", + }, + "commonAnnotations": map[string]interface{}{ + "app": "kafka", + }, + } +} + +func New(props map[string]interface{}) environment.ConnectedChart { + return NewVersioned("", props) +} + +// NewVersioned enables choosing a specific helm chart version +func NewVersioned(helmVersion string, props map[string]interface{}) environment.ConnectedChart { + dp := defaultProps() + config.MustMerge(&dp, props) + return Chart{ + Name: "kafka", + Path: "bitnami/kafka", + Values: &dp, + Version: helmVersion, + } +} diff --git a/env/pkg/helm/mock-adapter/mock-adapter.go b/env/pkg/helm/mock-adapter/mock-adapter.go new file mode 100644 index 000000000..77ecc9791 --- /dev/null +++ b/env/pkg/helm/mock-adapter/mock-adapter.go @@ -0,0 +1,130 @@ +package mock_adapter + +import ( + "fmt" + "os" + + "github.com/rs/zerolog/log" + + "github.com/smartcontractkit/chainlink-testing-framework/env/client" + "github.com/smartcontractkit/chainlink-testing-framework/env/config" + "github.com/smartcontractkit/chainlink-testing-framework/env/environment" +) + +const ( + LocalURLsKey = "qa_mock_adapter_local" // #nosec G101 + InternalURLsKey = "qa_mock_adapter_internal" // #nosec G101 +) + +type Props struct { +} + +type Chart struct { + Name string + Path string + Version string + Props *Props + Values *map[string]interface{} +} + +func (m Chart) IsDeploymentNeeded() bool { + return true +} + +func (m Chart) GetName() string { + return m.Name +} + +func (m Chart) GetPath() string { + return m.Path +} + +func (m Chart) GetVersion() string { + return m.Version +} + +func (m Chart) GetProps() interface{} { + return m.Props +} + +func (m Chart) GetValues() *map[string]interface{} { + return m.Values +} + +func (m Chart) ExportData(e *environment.Environment) error { + mockLocal, err := e.Fwd.FindPort("qa-mock-adapter:0", "qa-mock-adapter", "serviceport").As(client.LocalConnection, client.HTTP) + if err != nil { + return err + } + services, err := e.Client.ListServices(e.Cfg.Namespace, fmt.Sprintf("app=%s", m.Name)) + if err != nil { + return err + } + var mockInternal string + if services != nil && len(services.Items) != 0 { + mockInternal = fmt.Sprintf("http://%s:6060", services.Items[0].Name) + } else { + mockInternal, err = e.Fwd.FindPort("qa-mock-adapter:0", "qa-mock-adapter", "serviceport").As(client.RemoteConnection, client.HTTP) + if err != nil { + return err + } + } + if e.Cfg.InsideK8s { + mockLocal = mockInternal + } + + e.URLs[LocalURLsKey] = []string{mockLocal} + e.URLs[InternalURLsKey] = []string{mockInternal} + log.Info().Str("Local Connection", mockLocal).Str("Internal Connection", mockInternal).Msg("QA Mock Adapter") + return nil +} + +func defaultProps() map[string]interface{} { + internalRepo := os.Getenv(config.EnvVarInternalDockerRepo) + qaMockAdapterRepo := "qa-mock-adapter" + if internalRepo != "" { + qaMockAdapterRepo = internalRepo + } + + return map[string]interface{}{ + "replicaCount": "1", + "service": map[string]interface{}{ + "type": "NodePort", + "port": "6060", + }, + "app": map[string]interface{}{ + "serverPort": "6060", + "resources": map[string]interface{}{ + "requests": map[string]interface{}{ + "cpu": "200m", + "memory": "256Mi", + }, + "limits": map[string]interface{}{ + "cpu": "200m", + "memory": "256Mi", + }, + }, + }, + "image": map[string]interface{}{ + "repository": qaMockAdapterRepo, + "snapshot": false, + "pullPolicy": "IfNotPresent", + }, + } +} + +func New(props map[string]interface{}) environment.ConnectedChart { + return NewVersioned("", props) +} + +// NewVersioned enables choosing a specific helm chart version +func NewVersioned(helmVersion string, props map[string]interface{}) environment.ConnectedChart { + dp := defaultProps() + config.MustMerge(&dp, props) + return Chart{ + Name: "qa-mock-adapter", + Path: "chainlink-qa/qa-mock-adapter", + Values: &dp, + Version: helmVersion, + } +} diff --git a/env/pkg/helm/mockserver-cfg/mockserver-cfg.go b/env/pkg/helm/mockserver-cfg/mockserver-cfg.go new file mode 100644 index 000000000..d33f261d1 --- /dev/null +++ b/env/pkg/helm/mockserver-cfg/mockserver-cfg.go @@ -0,0 +1,58 @@ +package mockserver_cfg + +import ( + "github.com/smartcontractkit/chainlink-testing-framework/env/environment" +) + +type Props struct { +} + +type Chart struct { + Name string + Path string + Version string + Props *Props + Values *map[string]interface{} +} + +func (m Chart) IsDeploymentNeeded() bool { + return true +} + +func (m Chart) GetName() string { + return m.Name +} + +func (m Chart) GetProps() interface{} { + return m.Props +} + +func (m Chart) GetPath() string { + return m.Path +} + +func (m Chart) GetVersion() string { + return m.Version +} + +func (m Chart) GetValues() *map[string]interface{} { + return m.Values +} + +func (m Chart) ExportData(e *environment.Environment) error { + return nil +} + +func New(props map[string]interface{}) environment.ConnectedChart { + return NewVersioned("", props) +} + +// NewVersioned enables choosing a specific helm chart version +func NewVersioned(helmVersion string, props map[string]interface{}) environment.ConnectedChart { + return Chart{ + Name: "mockserver-cfg", + Path: "chainlink-qa/mockserver-config", + Values: &props, + Version: helmVersion, + } +} diff --git a/env/pkg/helm/mockserver/mockserver.go b/env/pkg/helm/mockserver/mockserver.go new file mode 100644 index 000000000..ff547c0d8 --- /dev/null +++ b/env/pkg/helm/mockserver/mockserver.go @@ -0,0 +1,134 @@ +package mockserver + +import ( + "fmt" + "os" + + "github.com/rs/zerolog/log" + + "github.com/smartcontractkit/chainlink-testing-framework/env/client" + "github.com/smartcontractkit/chainlink-testing-framework/env/config" + "github.com/smartcontractkit/chainlink-testing-framework/env/environment" +) + +const ( + LocalURLsKey = "mockserver_local" + InternalURLsKey = "mockserver_internal" +) + +type Props struct { +} + +type Chart struct { + Name string + Path string + Version string + Props *Props + Values *map[string]interface{} +} + +func (m Chart) IsDeploymentNeeded() bool { + return true +} + +func (m Chart) GetName() string { + return m.Name +} + +func (m Chart) GetPath() string { + return m.Path +} + +func (m Chart) GetVersion() string { + return m.Version +} + +func (m Chart) GetProps() interface{} { + return m.Props +} + +func (m Chart) GetValues() *map[string]interface{} { + return m.Values +} + +func (m Chart) ExportData(e *environment.Environment) error { + mockLocal, err := e.Fwd.FindPort("mockserver:0", "mockserver", "serviceport").As(client.LocalConnection, client.HTTP) + if err != nil { + return err + } + services, err := e.Client.ListServices(e.Cfg.Namespace, fmt.Sprintf("app=%s", m.Name)) + if err != nil { + return err + } + var mockInternal string + if services != nil && len(services.Items) != 0 { + mockInternal = fmt.Sprintf("http://%s:1080", services.Items[0].Name) + } else { + mockInternal, err = e.Fwd.FindPort("mockserver:0", "mockserver", "serviceport").As(client.RemoteConnection, client.HTTP) + if err != nil { + return err + } + } + if e.Cfg.InsideK8s { + mockLocal = mockInternal + } + + e.URLs[LocalURLsKey] = []string{mockLocal} + e.URLs[InternalURLsKey] = []string{mockInternal} + log.Info().Str("Local Connection", mockLocal).Str("Internal Connection", mockInternal).Msg("Mockserver") + return nil +} + +func defaultProps() map[string]interface{} { + internalRepo := os.Getenv(config.EnvVarInternalDockerRepo) + mockserverRepo := "mockserver" + if internalRepo != "" { + mockserverRepo = fmt.Sprintf("%s/mockserver", internalRepo) + } + + return map[string]interface{}{ + "replicaCount": "1", + "service": map[string]interface{}{ + "type": "NodePort", + "port": "1080", + }, + "app": map[string]interface{}{ + "logLevel": "INFO", + "serverPort": "1080", + "mountedConfigMapName": "mockserver-config", + "propertiesFileName": "mockserver.properties", + "readOnlyRootFilesystem": "false", + "resources": map[string]interface{}{ + "requests": map[string]interface{}{ + "cpu": "200m", + "memory": "256Mi", + }, + "limits": map[string]interface{}{ + "cpu": "200m", + "memory": "256Mi", + }, + }, + }, + "image": map[string]interface{}{ + "repository": mockserverRepo, + "snapshot": false, + "pullPolicy": "IfNotPresent", + }, + } +} + +func New(props map[string]interface{}) environment.ConnectedChart { + return NewVersioned("", props) +} + +// NewVersioned enables choosing a specific helm chart version +func NewVersioned(helmVersion string, props map[string]interface{}) environment.ConnectedChart { + dp := defaultProps() + config.MustMerge(&dp, props) + return Chart{ + Name: "mockserver", + Path: "chainlink-qa/mockserver", + Values: &dp, + Version: helmVersion, + } +} diff --git a/env/pkg/helm/polygon-edge/edge.go b/env/pkg/helm/polygon-edge/edge.go new file mode 100644 index 000000000..5cdabe31b --- /dev/null +++ b/env/pkg/helm/polygon-edge/edge.go @@ -0,0 +1,117 @@ +package polygon_edge + +import ( + "github.com/rs/zerolog/log" + + "github.com/smartcontractkit/chainlink-testing-framework/env/client" + "github.com/smartcontractkit/chainlink-testing-framework/env/config" + "github.com/smartcontractkit/chainlink-testing-framework/env/environment" +) + +type Props struct { + NetworkName string `envconfig:"network_name"` + Simulated bool `envconfig:"network_simulated"` + HttpURLs []string `envconfig:"http_url"` + WsURLs []string `envconfig:"ws_url"` + Values map[string]interface{} +} + +type HelmProps struct { + Name string + Path string + Version string + Values *map[string]interface{} +} + +type Chart struct { + HelmProps *HelmProps + Props *Props +} + +func (m Chart) IsDeploymentNeeded() bool { + return m.Props.Simulated +} + +func (m Chart) GetProps() interface{} { + return m.Props +} + +func (m Chart) GetName() string { + return m.HelmProps.Name +} + +func (m Chart) GetPath() string { + return m.HelmProps.Path +} + +func (m Chart) GetVersion() string { + return m.HelmProps.Version +} + +func (m Chart) GetValues() *map[string]interface{} { + return m.HelmProps.Values +} + +func (m Chart) ExportData(e *environment.Environment) error { + if m.Props.Simulated { + gethLocalWs, err := e.Fwd.FindPort("polygon-edge:0", "polygon-edge", "http").As(client.LocalConnection, client.WSSUFFIX) + if err != nil { + return err + } + gethInternalWs, err := e.Fwd.FindPort("polygon-edge:0", "polygon-edge", "http").As(client.RemoteConnection, client.WS) + if err != nil { + return err + } + if e.Cfg.InsideK8s { + e.URLs[m.Props.NetworkName] = []string{gethInternalWs} + } else { + e.URLs[m.Props.NetworkName] = []string{gethLocalWs} + } + + // For cases like starknet we need the internalHttp address to set up the L1<>L2 interaction + e.URLs[m.Props.NetworkName+"_internal"] = []string{gethInternalWs} + + log.Info().Str("Name", "Edge").Str("URLs", gethLocalWs).Msg("Edge network") + } else { + e.URLs[m.Props.NetworkName] = m.Props.WsURLs + log.Info().Str("Name", m.Props.NetworkName).Strs("URLs", m.Props.WsURLs).Msg("Edge network") + } + return nil +} + +func defaultProps() *Props { + return &Props{ + NetworkName: "edge", + Simulated: true, + Values: map[string]interface{}{}, + } +} + +func New(props *Props) environment.ConnectedChart { + return NewVersioned("", props) +} + +// NewVersioned enables choosing a specific helm chart version +func NewVersioned(helmVersion string, props *Props) environment.ConnectedChart { + targetProps := defaultProps() + if props == nil { + props = targetProps + } + config.MustMerge(targetProps, props) + config.MustMerge(&targetProps.Values, props.Values) + targetProps.Simulated = props.Simulated // Mergo has issues with boolean merging for simulated networks + if targetProps.Simulated { + return Chart{ + HelmProps: &HelmProps{ + Name: "edge", + Path: "chainlink-qa/polygon-edge", + Values: &targetProps.Values, + Version: helmVersion, + }, + Props: targetProps, + } + } + return Chart{ + Props: targetProps, + } +} diff --git a/env/pkg/helm/reorg/reorg.go b/env/pkg/helm/reorg/reorg.go new file mode 100644 index 000000000..e613592f3 --- /dev/null +++ b/env/pkg/helm/reorg/reorg.go @@ -0,0 +1,202 @@ +package reorg + +import ( + "fmt" + "os" + + "github.com/rs/zerolog/log" + + "github.com/smartcontractkit/chainlink-testing-framework/env/client" + "github.com/smartcontractkit/chainlink-testing-framework/env/config" + "github.com/smartcontractkit/chainlink-testing-framework/env/environment" +) + +const ( + URLsKey = "geth" + TXNodesAppLabel = "geth-ethereum-geth" + MinerNodesAppLabel = "geth-ethereum-miner-node" // #nosec G101 +) + +type Props struct { + NetworkName string `envconfig:"network_name"` + NetworkType string `envconfig:"network_type"` + Values map[string]interface{} +} + +type Chart struct { + Name string + Path string + Version string + Props *Props + Values *map[string]interface{} +} + +func (m Chart) IsDeploymentNeeded() bool { + return true +} + +func (m Chart) GetName() string { + return m.Name +} + +func (m Chart) GetProps() interface{} { + return m.Props +} + +func (m Chart) GetPath() string { + return m.Path +} + +func (m Chart) GetVersion() string { + return m.Version +} + +func (m Chart) GetValues() *map[string]interface{} { + return m.Values +} + +func (m Chart) ExportData(e *environment.Environment) error { + urls := make([]string, 0) + minerPods, err := e.Client.ListPods(e.Cfg.Namespace, fmt.Sprintf("app=%s-ethereum-miner-node", m.Props.NetworkName)) + if err != nil { + return err + } + txPods, err := e.Client.ListPods(e.Cfg.Namespace, fmt.Sprintf("app=%s-ethereum-geth", m.Props.NetworkName)) + if err != nil { + return err + } + if len(txPods.Items) > 0 { + for i := range txPods.Items { + podName := fmt.Sprintf("%s-ethereum-geth:%d", m.Props.NetworkName, i) + txNodeLocalWS, err := e.Fwd.FindPort(podName, "geth", "ws-rpc").As(client.LocalConnection, client.WS) + if err != nil { + return err + } + txNodeInternalWs, err := e.Fwd.FindPort(podName, "geth", "ws-rpc").As(client.RemoteConnection, client.WS) + if err != nil { + return err + } + if e.Cfg.InsideK8s { + urls = append(urls, txNodeInternalWs) + log.Info().Str("URL", txNodeInternalWs).Msgf("Geth network (TX Node) - %d", i) + } else { + urls = append(urls, txNodeLocalWS) + log.Info().Str("URL", txNodeLocalWS).Msgf("Geth network (TX Node) - %d", i) + } + } + } + + if len(minerPods.Items) > 0 { + for i := range minerPods.Items { + podName := fmt.Sprintf("%s-ethereum-miner-node:%d", m.Props.NetworkName, i) + minerNodeLocalWS, err := e.Fwd.FindPort(podName, "geth-miner", "ws-rpc-miner").As(client.LocalConnection, client.WS) + if err != nil { + return err + } + minerNodeInternalWs, err := e.Fwd.FindPort(podName, "geth-miner", "ws-rpc-miner").As(client.RemoteConnection, client.WS) + if err != nil { + return err + } + if e.Cfg.InsideK8s { + urls = append(urls, minerNodeInternalWs) + log.Info().Str("URL", minerNodeInternalWs).Msgf("Geth network (Miner Node) - %d", i) + } else { + urls = append(urls, minerNodeLocalWS) + log.Info().Str("URL", minerNodeLocalWS).Msgf("Geth network (Miner Node) - %d", i) + } + } + } + + e.URLs[m.Props.NetworkName] = urls + return nil +} + +func defaultProps() *Props { + internalRepo := os.Getenv(config.EnvVarInternalDockerRepo) + gethRepo := "ethereum/client-go" + bootnodeRepo := "jpoon/bootnode-registrar" + if internalRepo != "" { + gethRepo = fmt.Sprintf("%s/ethereum/client-go", internalRepo) + bootnodeRepo = fmt.Sprintf("%s/jpoon/bootnode-registrar", internalRepo) + } + return &Props{ + NetworkName: "geth", + NetworkType: "geth-reorg", + Values: map[string]interface{}{ + "imagePullPolicy": "IfNotPresent", + "bootnode": map[string]interface{}{ + "replicas": "2", + "image": map[string]interface{}{ + "repository": gethRepo, + "tag": "alltools-v1.10.25", + }, + }, + "bootnodeRegistrar": map[string]interface{}{ + "replicas": "1", + "image": map[string]interface{}{ + "repository": bootnodeRepo, + "tag": "v1.0.0", + }, + }, + "geth": map[string]interface{}{ + "image": map[string]interface{}{ + "repository": gethRepo, + "tag": "v1.10.25", + }, + "tx": map[string]interface{}{ + "replicas": "1", + "service": map[string]interface{}{ + "type": "ClusterIP", + }, + "resources": map[string]interface{}{ + "requests": map[string]interface{}{ + "cpu": "2", + "memory": "2Gi", + }, + "limits": map[string]interface{}{ + "cpu": "2", + "memory": "2Gi", + }, + }, + }, + "miner": map[string]interface{}{ + "replicas": "2", + "account": map[string]interface{}{ + "secret": "", + }, + "resources": map[string]interface{}{ + "requests": map[string]interface{}{ + "cpu": "2", + "memory": "2Gi", + }, + "limits": map[string]interface{}{ + "cpu": "2", + "memory": "2Gi", + }, + }, + }, + "genesis": map[string]interface{}{ + "networkId": "1337", + }, + }, + }, + } +} + +func New(props *Props) environment.ConnectedChart { + return NewVersioned("", props) +} + +// NewVersioned enables choosing a specific helm chart version +func NewVersioned(helmVersion string, props *Props) environment.ConnectedChart { + targetProps := defaultProps() + config.MustMerge(targetProps, props) + config.MustMerge(&targetProps.Values, props.Values) + return Chart{ + Name: targetProps.NetworkName, + Path: "chainlink-qa/ethereum", + Values: &targetProps.Values, + Props: targetProps, + Version: helmVersion, + } +} diff --git a/env/pkg/helm/schema-registry/schema-registry.go b/env/pkg/helm/schema-registry/schema-registry.go new file mode 100644 index 000000000..c4f1b114b --- /dev/null +++ b/env/pkg/helm/schema-registry/schema-registry.go @@ -0,0 +1,65 @@ +package schema_registry + +import ( + "github.com/smartcontractkit/chainlink-testing-framework/env/config" + "github.com/smartcontractkit/chainlink-testing-framework/env/environment" +) + +type Props struct { +} + +type Chart struct { + Name string + Path string + Version string + Props *Props + Values *map[string]interface{} +} + +func (m Chart) IsDeploymentNeeded() bool { + return true +} + +func (m Chart) GetName() string { + return m.Name +} + +func (m Chart) GetPath() string { + return m.Path +} + +func (m Chart) GetVersion() string { + return m.Version +} + +func (m Chart) GetProps() interface{} { + return m.Props +} + +func (m Chart) GetValues() *map[string]interface{} { + return m.Values +} + +func (m Chart) ExportData(e *environment.Environment) error { + return nil +} + +func defaultProps() map[string]interface{} { + return map[string]interface{}{} +} + +func New(props map[string]interface{}) environment.ConnectedChart { + return NewVersioned("", props) +} + +// NewVersioned enables choosing a specific helm chart version +func NewVersioned(helmVersion string, props map[string]interface{}) environment.ConnectedChart { + dp := defaultProps() + config.MustMerge(&dp, props) + return Chart{ + Name: "cp-schema-registry", + Path: "chainlink-qa/schema-registry", + Values: &dp, + Version: helmVersion, + } +} diff --git a/env/pkg/helm/sol/sol.go b/env/pkg/helm/sol/sol.go new file mode 100644 index 000000000..5025e2e0b --- /dev/null +++ b/env/pkg/helm/sol/sol.go @@ -0,0 +1,121 @@ +package sol + +import ( + "github.com/rs/zerolog/log" + + "github.com/smartcontractkit/chainlink-testing-framework/env/client" + "github.com/smartcontractkit/chainlink-testing-framework/env/environment" +) + +type Props struct { + NetworkName string `envconfig:"network_name"` + HttpURLs []string `envconfig:"http_url"` + WsURLs []string `envconfig:"ws_url"` + Values map[string]interface{} +} + +type HelmProps struct { + Name string + Path string + Version string + Values *map[string]interface{} +} + +type Chart struct { + HelmProps *HelmProps + Props *Props +} + +func (m Chart) IsDeploymentNeeded() bool { + return true +} + +func (m Chart) GetProps() interface{} { + return m.Props +} + +func (m Chart) GetName() string { + return m.HelmProps.Name +} + +func (m Chart) GetPath() string { + return m.HelmProps.Path +} + +func (m Chart) GetVersion() string { + return m.HelmProps.Version +} + +func (m Chart) GetValues() *map[string]interface{} { + return m.HelmProps.Values +} + +func (m Chart) ExportData(e *environment.Environment) error { + netLocal, err := e.Fwd.FindPort("sol:0", "sol-val", "http-rpc").As(client.LocalConnection, client.HTTP) + if err != nil { + return err + } + netLocalWS, err := e.Fwd.FindPort("sol:0", "sol-val", "ws-rpc").As(client.LocalConnection, client.WS) + if err != nil { + return err + } + netInternal, err := e.Fwd.FindPort("sol:0", "sol-val", "http-rpc").As(client.RemoteConnection, client.HTTP) + if err != nil { + return err + } + netInternalWS, err := e.Fwd.FindPort("sol:0", "sol-val", "ws-rpc").As(client.RemoteConnection, client.WS) + if err != nil { + return err + } + e.URLs[m.Props.NetworkName] = []string{netLocal, netLocalWS} + if e.Cfg.InsideK8s { + e.URLs[m.Props.NetworkName] = []string{netInternal, netInternalWS} + } + log.Info().Str("Name", m.Props.NetworkName).Str("URLs", netLocal).Msg("Solana network") + return nil +} + +func defaultProps() *Props { + return &Props{ + NetworkName: "sol", + Values: map[string]interface{}{ + "replicas": "1", + "sol": map[string]interface{}{ + "image": map[string]interface{}{ + "image": "solanalabs/solana", + "version": "v1.13.3", + }, + "resources": map[string]interface{}{ + "requests": map[string]interface{}{ + "cpu": "2000m", + "memory": "4000Mi", + }, + "limits": map[string]interface{}{ + "cpu": "2000m", + "memory": "4000Mi", + }, + }, + }, + }, + } +} + +func New(props *Props) environment.ConnectedChart { + return NewVersioned("", props) +} + +// NewVersioned enables choosing a specific helm chart version +func NewVersioned(helmVersion string, props *Props) environment.ConnectedChart { + if props == nil { + props = defaultProps() + } + return Chart{ + HelmProps: &HelmProps{ + Name: "sol", + Path: "chainlink-qa/solana-validator", + Values: &props.Values, + Version: helmVersion, + }, + Props: props, + } +} diff --git a/env/pkg/helm/starknet/starknet.go b/env/pkg/helm/starknet/starknet.go new file mode 100644 index 000000000..62443d5cb --- /dev/null +++ b/env/pkg/helm/starknet/starknet.go @@ -0,0 +1,112 @@ +package starknet + +import ( + "github.com/rs/zerolog/log" + + "github.com/smartcontractkit/chainlink-testing-framework/env/client" + "github.com/smartcontractkit/chainlink-testing-framework/env/environment" +) + +type Props struct { + NetworkName string `envconfig:"network_name"` + HttpURLs []string `envconfig:"http_url"` + WsURLs []string `envconfig:"ws_url"` + Values map[string]interface{} +} + +type HelmProps struct { + Name string + Path string + Version string + Values *map[string]interface{} +} + +type Chart struct { + HelmProps *HelmProps + Props *Props +} + +func (m Chart) IsDeploymentNeeded() bool { + return true +} + +func (m Chart) GetProps() interface{} { + return m.Props +} + +func (m Chart) GetName() string { + return m.HelmProps.Name +} + +func (m Chart) GetPath() string { + return m.HelmProps.Path +} + +func (m Chart) GetVersion() string { + return m.HelmProps.Version +} + +func (m Chart) GetValues() *map[string]interface{} { + return m.HelmProps.Values +} + +func (m Chart) ExportData(e *environment.Environment) error { + devnetLocalHttp, err := e.Fwd.FindPort("starknet-dev:0", "starknetdev", "http").As(client.LocalConnection, client.HTTP) + if err != nil { + return err + } + devnetInternalHttp, err := e.Fwd.FindPort("starknet-dev:0", "starknetdev", "http").As(client.RemoteConnection, client.HTTP) + if err != nil { + return err + } + e.URLs[m.Props.NetworkName] = append(e.URLs[m.Props.NetworkName], devnetLocalHttp) + e.URLs[m.Props.NetworkName] = append(e.URLs[m.Props.NetworkName], devnetInternalHttp) + log.Info().Str("Name", "Devnet").Str("URLs", devnetLocalHttp).Msg("Devnet network") + return nil +} + +func defaultProps() *Props { + return &Props{ + NetworkName: "starknet-dev", + Values: map[string]interface{}{ + "replicas": "1", + "starknet-dev": map[string]interface{}{ + "image": map[string]interface{}{ + "image": "shardlabs/starknet-devnet", + "version": "v0.2.6", + }, + "resources": map[string]interface{}{ + "requests": map[string]interface{}{ + "cpu": "1000m", + "memory": "1024Mi", + }, + "limits": map[string]interface{}{ + "cpu": "1000m", + "memory": "1024Mi", + }, + }, + "seed": "123", + "real_node": "false", + }, + }, + } +} + +func New(props *Props) environment.ConnectedChart { + return NewVersioned("", props) +} + +func NewVersioned(helmVersion string, props *Props) environment.ConnectedChart { + if props == nil { + props = defaultProps() + } + return Chart{ + HelmProps: &HelmProps{ + Name: "starknet-dev", + Path: "chainlink-qa/starknet", + Values: &props.Values, + Version: helmVersion, + }, + Props: props, + } +} diff --git a/env/presets/presets.go b/env/presets/presets.go new file mode 100644 index 000000000..e411a6523 --- /dev/null +++ b/env/presets/presets.go @@ -0,0 +1,185 @@ +package presets + +import ( + "github.com/smartcontractkit/chainlink-testing-framework/env/environment" + "github.com/smartcontractkit/chainlink-testing-framework/env/pkg/cdk8s/blockscout" + "github.com/smartcontractkit/chainlink-testing-framework/env/pkg/helm/chainlink" + "github.com/smartcontractkit/chainlink-testing-framework/env/pkg/helm/ethereum" + "github.com/smartcontractkit/chainlink-testing-framework/env/pkg/helm/mockserver" + mockservercfg "github.com/smartcontractkit/chainlink-testing-framework/env/pkg/helm/mockserver-cfg" + "github.com/smartcontractkit/chainlink-testing-framework/env/pkg/helm/reorg" +) + +// EVMOneNode local development Chainlink deployment +func EVMOneNode(config *environment.Config) (*environment.Environment, error) { + c := chainlink.New(0, nil) + + return environment.New(config). + AddHelm(mockservercfg.New(nil)). + AddHelm(mockserver.New(nil)). + AddHelm(ethereum.New(nil)). + AddHelm(c), nil +} + +// EVMMinimalLocalBS local development Chainlink deployment, +// 1 bootstrap + 4 oracles (minimal requirements for OCR) + Blockscout +func EVMMinimalLocalBS(config *environment.Config) (*environment.Environment, error) { + c := chainlink.New(0, map[string]any{ + "replicas": 5, + }) + return environment.New(config). + AddChart(blockscout.New(&blockscout.Props{})). + AddHelm(mockservercfg.New(nil)). + AddHelm(mockserver.New(nil)). + AddHelm(ethereum.New(nil)). + AddHelm(c), nil +} + +// EVMMinimalLocal local development Chainlink deployment, +// 1 bootstrap + 4 oracles (minimal requirements for OCR) +func EVMMinimalLocal(config *environment.Config) *environment.Environment { + return environment.New(config). + AddHelm(mockservercfg.New(nil)). + AddHelm(mockserver.New(nil)). + AddHelm(ethereum.New(nil)). + AddHelm(chainlink.New(0, map[string]interface{}{ + "replicas": 5, + })) +} + +// EVMMinimalLocal local development Chainlink deployment, +// 1 bootstrap + 4 oracles (minimal requirements for OCR) +func EVMMultipleNodesWithDiffDBVersion(config *environment.Config) *environment.Environment { + return environment.New(config). + AddHelm(mockservercfg.New(nil)). + AddHelm(mockserver.New(nil)). + AddHelm(ethereum.New(nil)). + AddHelm(chainlink.New(0, map[string]interface{}{ + "nodes": []map[string]any{ + { + "name": "node-1", + "db": map[string]any{ + "image": map[string]any{ + "image": "postgres", + "version": "13.12", + }, + }, + }, + { + "name": "node-2", + "db": map[string]any{ + "image": map[string]any{ + "image": "postgres", + "version": "14.9", + }, + }, + }, + { + "name": "node-3", + "db": map[string]any{ + "image": map[string]any{ + "image": "postgres", + "version": "15.4", + }, + }, + }, + }, + })) +} + +// EVMReorg deployment for two Ethereum networks re-org test +func EVMReorg(config *environment.Config) (*environment.Environment, error) { + var clToml = `[[EVM]] +ChainID = '1337' +FinalityDepth = 200 + +[[EVM.Nodes]] +Name = 'geth' +WSURL = 'ws://geth-ethereum-geth:8546' +HTTPURL = 'http://geth-ethereum-geth:8544' + +[EVM.HeadTracker] +HistoryDepth = 400` + c := chainlink.New(0, map[string]interface{}{ + "replicas": 5, + "toml": clToml, + }) + + return environment.New(config). + AddHelm(mockservercfg.New(nil)). + AddHelm(mockserver.New(nil)). + AddHelm(reorg.New(&reorg.Props{ + NetworkName: "geth", + NetworkType: "geth-reorg", + Values: map[string]interface{}{ + "geth": map[string]interface{}{ + "genesis": map[string]interface{}{ + "networkId": "1337", + }, + }, + }, + })). + AddHelm(reorg.New(&reorg.Props{ + NetworkName: "geth-2", + NetworkType: "geth-reorg", + Values: map[string]interface{}{ + "geth": map[string]interface{}{ + "genesis": map[string]interface{}{ + "networkId": "2337", + }, + }, + }, + })). + AddHelm(c), nil +} + +// EVMSoak deployment for a long running soak tests +func EVMSoak(config *environment.Config) *environment.Environment { + return environment.New(config). + AddHelm(mockservercfg.New(nil)). + AddHelm(mockserver.New(nil)). + AddHelm(ethereum.New(ðereum.Props{ + Simulated: true, + Values: map[string]interface{}{ + "resources": map[string]interface{}{ + "requests": map[string]interface{}{ + "cpu": "1000m", + "memory": "2048Mi", + }, + "limits": map[string]interface{}{ + "cpu": "1000m", + "memory": "2048Mi", + }, + }, + }, + })). + AddHelm(chainlink.New(0, map[string]interface{}{ + "replicas": 5, + "db": map[string]interface{}{ + "stateful": true, + "capacity": "1Gi", + "resources": map[string]interface{}{ + "requests": map[string]interface{}{ + "cpu": "250m", + "memory": "256Mi", + }, + "limits": map[string]interface{}{ + "cpu": "250m", + "memory": "256Mi", + }, + }, + }, + "chainlink": map[string]interface{}{ + "resources": map[string]interface{}{ + "requests": map[string]interface{}{ + "cpu": "1000m", + "memory": "2048Mi", + }, + "limits": map[string]interface{}{ + "cpu": "1000m", + "memory": "2048Mi", + }, + }, + }, + })) +} diff --git a/env/scripts/buildBaseImage b/env/scripts/buildBaseImage new file mode 100755 index 000000000..ccb491472 --- /dev/null +++ b/env/scripts/buildBaseImage @@ -0,0 +1,13 @@ +#!/usr/bin/env bash + +# Runs compiled go executables and specificies the test to run +# Builds executable go test binaries for this repos tests + +set -e + +SCRIPT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd) + +cd "$SCRIPT_DIR"/../ || exit 1 +source ./scripts/buildImageHelper + +buildImage "${1}" "test-base-image" "Dockerfile.base" diff --git a/env/scripts/buildImageHelper b/env/scripts/buildImageHelper new file mode 100755 index 000000000..b6267d23c --- /dev/null +++ b/env/scripts/buildImageHelper @@ -0,0 +1,39 @@ +#!/usr/bin/env bash + +# Runs compiled go executables and specificies the test to run +# Builds executable go test binaries for this repos tests + +set -ex + +buildImage() { + SCRIPT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd) + + cd "$SCRIPT_DIR"/../ || exit 1 + + local TAG_VERSION="${1}" + local REPO="${2}" + local DOCKER_FILE="${3}" + local ARGS=$4 + local ACCOUNT=$(aws sts get-caller-identity | jq -r .Account) + local TAG="${ACCOUNT}".dkr.ecr.us-west-2.amazonaws.com/"${REPO}":"${TAG_VERSION}" + + if [ "${TAG_VERSION}" = "" ]; then + echo "Need an argument for the image tag version in argument 1" + exit 1 + fi + + if [ "${REPO}" = "" ]; then + echo "Need an argument for the ecr name" + exit 1 + fi + + if [ "${DOCKER_FILE}" = "" ]; then + echo "Need an argument for the Dockerfile location" + exit 1 + fi + + + docker build -t "${TAG}" -f "${DOCKER_FILE}" $ARGS . + aws ecr get-login-password --region us-west-2 | docker login --username AWS --password-stdin "${ACCOUNT}".dkr.ecr.us-west-2.amazonaws.com + docker push "${TAG}" +} diff --git a/env/scripts/buildTestImage b/env/scripts/buildTestImage new file mode 100755 index 000000000..d0dfc9e17 --- /dev/null +++ b/env/scripts/buildTestImage @@ -0,0 +1,24 @@ +#!/usr/bin/env bash + +# Runs compiled go executables and specificies the test to run +# Builds executable go test binaries for this repos tests + +set -ex + +SCRIPT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd) + +cd "$SCRIPT_DIR"/../ || exit 1 +source ./scripts/buildImageHelper + +# get account and region +REGION= +TEST_BASE_VERSION="${2}" +TEST_BASE_VERSION_DEFAULT=latest +ACCOUNT=$(aws sts get-caller-identity | jq -r .Account) + +if [ "${TEST_BASE_VERSION}" = "" ]; then + echo "No test-base-image version supplied in argument 3 so using the default of ${TEST_BASE_VERSION_DEFAULT}" + TEST_BASE_VERSION="${TEST_BASE_VERSION_DEFAULT}" +fi + +buildImage "${1}" "chainlink-testing-framework-tests" "Dockerfile" "--build-arg BASE_IMAGE=${ACCOUNT}.dkr.ecr.us-west-2.amazonaws.com/test-base-image --build-arg IMAGE_VERSION=${TEST_BASE_VERSION}" diff --git a/env/scripts/buildTests b/env/scripts/buildTests new file mode 100755 index 000000000..aa79fb5ac --- /dev/null +++ b/env/scripts/buildTests @@ -0,0 +1,24 @@ +#!/usr/bin/env bash + +# Runs compiled go executables and specificies the test to run +# Builds executable go test binaries for this repos tests + +set -ex + +SCRIPT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd) + +cd "$SCRIPT_DIR"/../ || exit 1 + +# parse out quotes if they exist in the string +suites="local-runner remote-runner" +temp="${suites%\"}" +tosplit="${temp#\"}" + +# find the suite name +OIFS=$IFS +IFS=' ' +for x in $tosplit +do + go test -c ./e2e/"${x}" +done +IFS=$OIFS diff --git a/env/scripts/entrypoint b/env/scripts/entrypoint new file mode 100755 index 000000000..fe296c56c --- /dev/null +++ b/env/scripts/entrypoint @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Runs compiled go executables and specificies the test to run + +set -ex + +SCRIPT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd) + +cd "$SCRIPT_DIR"/../ || exit 1 + +./${SUITE}.test -test.v -test.count 1 -test.timeout 1h -test.run ^${TEST_NAME}$ diff --git a/go.mod b/go.mod index 9c27e20ed..e0680884a 100644 --- a/go.mod +++ b/go.mod @@ -4,20 +4,22 @@ go 1.21 require ( github.com/avast/retry-go v3.0.0+incompatible + github.com/chaos-mesh/chaos-mesh/api/v1alpha1 v0.0.0-20220226050744-799408773657 github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc github.com/docker/go-connections v0.4.0 github.com/ethereum/go-ethereum v1.12.0 github.com/go-resty/resty/v2 v2.7.0 github.com/google/uuid v1.3.1 + github.com/imdario/mergo v0.3.16 github.com/jmoiron/sqlx v1.3.5 github.com/kelseyhightower/envconfig v1.4.0 github.com/lib/pq v1.10.9 + github.com/onsi/gomega v1.27.8 github.com/pkg/errors v0.9.1 github.com/prometheus/client_golang v1.17.0 github.com/prometheus/common v0.44.0 github.com/rs/zerolog v1.30.0 github.com/slack-go/slack v0.12.2 - github.com/smartcontractkit/chainlink-env v0.38.3 github.com/smartcontractkit/wasp v0.3.0 github.com/stretchr/testify v1.8.4 github.com/testcontainers/testcontainers-go v0.23.0 @@ -33,10 +35,9 @@ require ( github.com/google/pprof v0.0.0-20230705174524-200ffdc848b8 // indirect github.com/hashicorp/go-version v1.6.0 // indirect github.com/mattn/go-sqlite3 v2.0.3+incompatible // indirect - github.com/onsi/ginkgo/v2 v2.9.7 // indirect - github.com/onsi/gomega v1.27.8 // indirect github.com/pyroscope-io/client v0.7.1 // indirect github.com/rs/cors v1.8.3 // indirect + github.com/sergi/go-diff v1.2.0 // indirect github.com/yusufpapurcu/wmi v1.2.3 // indirect ) @@ -69,17 +70,16 @@ require ( github.com/armon/go-metrics v0.4.1 // indirect github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect github.com/aws/aws-sdk-go v1.44.302 // indirect - github.com/aws/constructs-go/constructs/v10 v10.1.255 // indirect - github.com/aws/jsii-runtime-go v1.75.0 // indirect + github.com/aws/constructs-go/constructs/v10 v10.1.255 + github.com/aws/jsii-runtime-go v1.75.0 github.com/beorn7/perks v1.0.1 // indirect github.com/btcsuite/btcd/btcec/v2 v2.3.2 // indirect github.com/bytedance/sonic v1.9.1 // indirect github.com/c2h5oh/datasize v0.0.0-20200112174442-28bbd4740fee // indirect - github.com/cdk8s-team/cdk8s-core-go/cdk8s/v2 v2.7.5 // indirect + github.com/cdk8s-team/cdk8s-core-go/cdk8s/v2 v2.7.5 github.com/cenkalti/backoff/v4 v4.2.1 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/chai2010/gettext-go v1.0.2 // indirect - github.com/chaos-mesh/chaos-mesh/api/v1alpha1 v0.0.0-20220226050744-799408773657 // indirect github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 // indirect github.com/cockroachdb/errors v1.9.1 // indirect github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect @@ -166,7 +166,6 @@ require ( github.com/hashicorp/serf v0.10.1 // indirect github.com/holiman/bloomfilter/v2 v2.0.3 // indirect github.com/holiman/uint256 v1.2.3 // indirect - github.com/imdario/mergo v0.3.16 github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/josharian/intern v1.0.0 // indirect @@ -274,15 +273,15 @@ require ( gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - k8s.io/api v0.27.3 // indirect + k8s.io/api v0.27.3 k8s.io/apiextensions-apiserver v0.25.3 // indirect - k8s.io/apimachinery v0.27.3 // indirect - k8s.io/cli-runtime v0.25.11 // indirect - k8s.io/client-go v0.27.3 // indirect + k8s.io/apimachinery v0.27.3 + k8s.io/cli-runtime v0.25.11 + k8s.io/client-go v0.27.3 k8s.io/component-base v0.26.2 // indirect k8s.io/klog/v2 v2.100.1 // indirect k8s.io/kube-openapi v0.0.0-20230525220651-2546d827e515 // indirect - k8s.io/kubectl v0.25.11 // indirect + k8s.io/kubectl v0.25.11 k8s.io/utils v0.0.0-20230711102312-30195339c3c7 // indirect nhooyr.io/websocket v1.8.7 // indirect sigs.k8s.io/controller-runtime v0.13.0 // indirect diff --git a/go.sum b/go.sum index 42ebd2dcc..c1eab9707 100644 --- a/go.sum +++ b/go.sum @@ -1555,8 +1555,6 @@ github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/slack-go/slack v0.12.2 h1:x3OppyMyGIbbiyFhsBmpf9pwkUzMhthJMRNmNlA4LaQ= github.com/slack-go/slack v0.12.2/go.mod h1:hlGi5oXA+Gt+yWTPP0plCdRKmjsDxecdHxYQdlMQKOw= -github.com/smartcontractkit/chainlink-env v0.38.3 h1:ZtOnwkG622R0VCTxL5V09AnT/QXhlFwkGTjd0Lsfpfg= -github.com/smartcontractkit/chainlink-env v0.38.3/go.mod h1:7z4sw/hN8TxioQCLwFqQdhK3vaOV0a22Qe99z4bRUcg= github.com/smartcontractkit/wasp v0.3.0 h1:mueeLvpb6HyGNwILxCOKShDR6q18plQn7Gb1j3G/Qkk= github.com/smartcontractkit/wasp v0.3.0/go.mod h1:skquNdMbKxIrHi5O8Kyukf66AaaXuEpEEaSTxfHbhak= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= diff --git a/logging/log.go b/logging/log.go index c8cc644f7..ad7cdf60e 100644 --- a/logging/log.go +++ b/logging/log.go @@ -9,8 +9,9 @@ import ( "github.com/rs/zerolog" "github.com/rs/zerolog/log" - "github.com/smartcontractkit/chainlink-env/config" "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/chainlink-testing-framework/env/config" ) const afterTestEndedMsg = "LOG AFTER TEST ENDED" diff --git a/sonar-project.properties b/sonar-project.properties index c03707297..2fd2f090a 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -8,3 +8,12 @@ sonar.exclusions=**/docs/**/*, **/*.pb.go, **/*report.xml **/*.txt, **/*.abi, ** sonar.coverage.exclusions=**/*, **/*.* # Duplication exclusions sonar.cpd.exclusions=**/contracts/**/*.sol + +# we cannot ignore multiple files in single exclusion +sonar.issue.ignore.multicriteria=test_db_pass_1 +sonar.issue.ignore.multicriteria.test_db_pass_1.ruleKey=secrets:S6698 +sonar.issue.ignore.multicriteria.test_db_pass_1.resourceKey=env/config/overrides.go + +sonar.issue.ignore.multicriteria=test_db_pass_2 +sonar.issue.ignore.multicriteria.test_db_pass_2.ruleKey=secrets:S6698 +sonar.issue.ignore.multicriteria.test_db_pass_2.resourceKey=env/config/overrides_test.go \ No newline at end of file diff --git a/testreporters/reporter_model.go b/testreporters/reporter_model.go index a81d22f2e..1f6b155fc 100644 --- a/testreporters/reporter_model.go +++ b/testreporters/reporter_model.go @@ -13,10 +13,11 @@ import ( "github.com/rs/zerolog/log" "github.com/slack-go/slack" - "github.com/smartcontractkit/chainlink-env/environment" "github.com/stretchr/testify/assert" "go.uber.org/zap/zapcore" "golang.org/x/sync/errgroup" + + "github.com/smartcontractkit/chainlink-testing-framework/env/environment" ) // TestReporter is a general interface for all test reporters diff --git a/testreporters/slack_notification.go b/testreporters/slack_notification.go index d79744174..ffd2d1919 100644 --- a/testreporters/slack_notification.go +++ b/testreporters/slack_notification.go @@ -8,7 +8,8 @@ import ( "github.com/pkg/errors" "github.com/rs/zerolog/log" "github.com/slack-go/slack" - "github.com/smartcontractkit/chainlink-env/config" + + "github.com/smartcontractkit/chainlink-testing-framework/env/config" ) // Common Slack Notification Helpers diff --git a/testsetups/migration.go b/testsetups/migration.go index 4d5432428..edc499d66 100644 --- a/testsetups/migration.go +++ b/testsetups/migration.go @@ -4,9 +4,10 @@ import ( "time" "github.com/pkg/errors" - "github.com/smartcontractkit/chainlink-env/environment" - "github.com/smartcontractkit/chainlink-env/pkg/helm/chainlink" - "github.com/smartcontractkit/chainlink-env/pkg/helm/ethereum" + + "github.com/smartcontractkit/chainlink-testing-framework/env/environment" + "github.com/smartcontractkit/chainlink-testing-framework/env/pkg/helm/chainlink" + "github.com/smartcontractkit/chainlink-testing-framework/env/pkg/helm/ethereum" ) type FromVersionSpec struct { diff --git a/utils/os_env.go b/utils/os_env.go index c2313dfaf..df99247a1 100644 --- a/utils/os_env.go +++ b/utils/os_env.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - "github.com/smartcontractkit/chainlink-env/config" + "github.com/smartcontractkit/chainlink-testing-framework/env/config" ) // GetEnv returns the value of the environment variable named by the key